1

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

5
  • (In standart eucdiean space with the standart distance-function) You can't, Either the spheres overlap or there is space left out between them. en.wikipedia.org/wiki/Sphere_packing
    – MrSmith42
    Commented Dec 21, 2023 at 15:30
  • 1
    The goal of the operation is to remove points, so it's okay to "miss some space"
    – Stef
    Commented Dec 21, 2023 at 18:52
  • @Stef Why not use cubes?​ Cubes won't miss information, don't they? Commented Dec 22, 2023 at 1:40
  • @Wenllshapion You'd have to read the documentation in detail, they probably explain the difference somewhere. I'm guessing the sphere sampling is equivalent to a dodecahedron sampling, and the voxel sampling is equivalent to cubic sampling, but I can't say for sure.
    – Stef
    Commented Dec 22, 2023 at 10:55
  • There's also the question of how efficient the sampling algorithm is depending on how the pointcloud is stored in memory; "find points within radius R of centre C" is maybe more efficient than "find points within square S" depending on the pointcloud data structure (which could be a simple unordered list of points, or a list of points in some logical spatial order, or a mesh, or an octree, etc).
    – Stef
    Commented Dec 22, 2023 at 10:55

1 Answer 1

1

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.

2
  • I am not really sure. I did not read the source code but I found that one of the parameters is setRadiusSearch. Radius are usually used to describe spheres, so I have this question. Commented Dec 24, 2023 at 6:58
  • @Wenllshapion If you haven't read the source code, please read the source code, there is no reference to sphere/ball at all github.com/PointCloudLibrary/pcl/blob/master/filters/include/…
    – Ardiya
    Commented Oct 29 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.