20 lines
559 B
C#
20 lines
559 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
class Program
|
|
{
|
|
static void Main()
|
|
{
|
|
using var cloud = new PclPointCloudXYZ();
|
|
cloud.Load("./dataset/0.pcd");
|
|
Console.WriteLine("加载点云大小为:" + cloud.Size);
|
|
|
|
using var voxel = new PclVoxelGridXYZ();
|
|
voxel.SetLeafSize(0.1f, 0.1f, 0.1f);
|
|
voxel.SetInputCloud(cloud);
|
|
|
|
using var filtered = voxel.Filter();
|
|
Console.WriteLine("体素滤波后点云大小为:" + filtered.Size);
|
|
filtered.Save("output.pcd");
|
|
}
|
|
} |