PointCloudLibrary / PointCloudLibrary/pcl
Visualizer: color coding of multiple point clouds
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
I noticed the following behavior of the PCLvisualizer when using PointCloudColorHandlerGenericField for color coding. This is used, for example, to color the points according to a specific scalar feature. Example:
PointCloud<PointXYZI>::Ptr cloud;
/*
Fill the cloud somehow. Write the feature value to the intensity-field of the points.
*/
pcl::visualization::PCLVisualizer viewer;
pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZI> handler(cloud,"intensity");
string cloud_id = "My cloud";
viewer.addPointCloud<PointXYZI>(cloud,handler,cloud_id);
When you add multiple point clouds, each point cloud is colored according to its own range of intensity. If you display the legend (color bar) in the visualizer, it makes little sense, as you don't even know, to which cloud it belongs. But what you, probably, want, is that all clouds are colored according to the same range, and the color scale is the same for all clouds.
There are, of course, different ways to get the expected behavior. IMHO, the easiest one is to add a method in the PCLvisualizer class, something like
PCLVisualizer::alignColorScales(string field, int viewport = 0);
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
Start by tracing PCLVisualizer and PointCloudColorHandlerGenericField, then inspect how the visualizer builds its legend and color ranges for multiple clouds. Determine how a shared field range should apply across clouds in a viewport. Done means multiple point clouds use one consistent color scale and the legend clearly represents that shared range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100