pcl icon indicating copy to clipboard operation
pcl copied to clipboard

UniformSampling Filter | add a minimum number of points required for a voxel option

Open ufrhaidar opened this issue 1 year ago • 2 comments
trafficstars

Description

This pull request modifies the UniformSampling filter to include a min_points_per_voxel_ filter. This allows users to specify a minimum number of points that a voxel must contain to be included in the output.

These changes allow users to filter out voxels that contain too few points, which can be useful in situations where such voxels are likely to be noise.

ufrhaidar avatar Feb 20 '24 05:02 ufrhaidar

Hi, this sounds like an interesting and useful addition to UniformSampling. However, I have a few comments:

  • please use unsigned int for count in Leaf
  • in the end, output has to be resized again based on how many points are actually added. Otherwise, output may have some uninitialized points at the end
  • maybe slightly adjust the documentation of min_points_per_voxel_ because no centroid is computed

mvieth avatar Feb 20 '24 12:02 mvieth

Thanks for the comments.

The output.width = output.size (); i removed wasn't necessary as the output.resize() function was already doing that here

ufrhaidar avatar Feb 21 '24 02:02 ufrhaidar