PointCloudLibrary / PointCloudLibrary/pcl

A question about UniformSampling

Open
#4,327 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind: todo module: docs module: filters
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Hello, thank you for your code about point cloud processing.
I have a question about UniformSampling. It's described in the official documentation.

The UniformSampling class creates a 3D voxel grid (think about a voxel grid as a set of tiny 3D boxes in space) over the input point cloud data. Then, in each voxel (i.e., 3D box), all the points present will be approximated (i.e., downsampled) with their centroid. This approach is a bit slower than approximating them with the center of the voxel, but it represents the underlying surface more accurately.

It is my understanding is to use the points' centroid in every voxel as the sampling point. Do I have a exact understanding?
But in the source code, it looks like using the point closest to the voxel center as the sampling point.
https://github.com/PointCloudLibrary/pcl/blob/3cb0cf4a2120a16c8527abcb366b76372fcf54ba/filters/include/pcl/filters/impl/uniform_sampling.hpp#L115
Which is the correct explanation? Thank you for your reply.

Regards,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the UniformSampling documentation and the linked implementation in filters/include/pcl/filters/impl/uniform_sampling.hpp around line 115. Compare the documented centroid behavior with the point selected by the implementation, then determine which description matches the current code. Done means resolving the discrepancy in the documentation or source explanation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-vision
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.