PointCloudLibrary / pcl

Point Cloud Library (PCL)
https://pointclouds.org/
Other
9.89k stars 4.61k forks source link

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

Closed ufrhaidar closed 4 months ago

ufrhaidar commented 7 months ago

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.

mvieth commented 7 months ago

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

ufrhaidar commented 7 months ago

Thanks for the comments.

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