-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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);