PointCloudLibrary / PointCloudLibrary/pcl
Remove warning from VoxelGrid
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
When I use VoxelGrid with a small grid size on a large point cloud, it sometimes gives the warning message " [pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow".
VoxelGrid then returns the original point cloud.
IMO, this is nonsense. The number of points in the downsampled point cloud cannot be larger than in the original point cloud, just by definition of the voxel grid filter. And the implementation of voxel grid is such that indices never exceed the number of points in the original point cloud. Empty voxels are ignored.
My suggestion is to remove this warning. I commented out the warning in my application, and it runs just fine. The change would affect the files voxel_grid.hpp, voxel_grid.cpp, voxel_grid_label.cpp.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the warning path and its call sites in voxel_grid.hpp, voxel_grid.cpp, and voxel_grid_label.cpp. Reproduce the small-grid, large-point-cloud case, then verify that removing the warning does not change VoxelGrid's returned point cloud behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100