What's the principle of uniform_sampling in PCL?

149 Views Asked by At

Uniform sampling algorithm: The uniform sampling filters the point cloud by constructing a sphere with a specified radius, and the point closest to the center of the sphere in each sphere is output as the point after downsampling. Voxel filtering is to build a cube, uniform sampling is to build a ball. My question is how to divide space by building balls? This will cause some space to be missed.

https://pointclouds.org/documentation/classpcl_1_1_uniform_sampling.html#details

1

There are 1 best solutions below

1
IBitMyBytes On

I am not sure from where you get idea with the sphere/ball. PCL's UniformSampling, just like the VoxelGrid filter, constructs a 3D grid of cubes/voxels. No space is missed. The main difference between UniformSampling and VoxelGrid is that the UniformSampling represents all points in a voxel with the point that is closest to the voxel center, while VoxelGrid computes the mean of all points in a voxel.