How to reset PCL_VISUALIZER_COLOR PointCloudRenderingProperties?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to reset PCL_VISUALIZER_COLOR PointCloudRenderingProperties?

ToMadoRe
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How to reset PCL_VISUALIZER_COLOR PointCloudRenderingProperties?

Fabien Rozar
Hello,

I experience the same Issue previously, and this to save color properties:
        // Save the property of the picked actor so that we can restore it next time
        this->viewer->getPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR,
                                                        save_property_region_r,
                                                        save_property_region_g,
                                                        save_property_region_b,
                                                        region_id.str ());

Then to restore the color, I use the setter:
        this->viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR,
                                                        save_property_region_r,
                                                        save_property_region_g,
                                                        save_property_region_b,
                                                        region_id.str ());

Hope it helps.

frozar



2018-04-25 11:35 GMT+02:00 ToMadoRe <[hidden email]>:
I would like to visualize a point cloud (PointXYZRGB type) where I can toggle
the visualization between the normal mode and a highlighted mode (points
shown green).

Changing it to the highlighed mode is easy with:

/visuializer.setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_COLOR,
0., 1., 0., "cloud");
/

but how can I visualize it again in color after this?

Can I do this with /PointCloudRenderingProperties/ even or do I need to use
/PointCloudColorHandler/s somehow?



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: How to reset PCL_VISUALIZER_COLOR PointCloudRenderingProperties?

ToMadoRe
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How to reset PCL_VISUALIZER_COLOR PointCloudRenderingProperties?

Fabien Rozar
Hello ToMadoRe,

This issue remember me this previous PR I've done:

I provide this link just to give more information about the color interface 
with the visualisator. But it's not the same.

In your case, I didn't pay attention to the point that you deal with a point
cloud which provide color (PointXYZRGB). So when you use this method:
getPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR,
                                                        save_property_region_r,
                                                        save_property_region_g,
                                                        save_property_region_b,
                                                        "cloud");

The identifier "cloud" stand for a set of points. Let imagine that you have a set of
3 points, one red, one green and one blue. What kind of color will you get in this
situation for the parameters save_property_region_{r,g,b}? An average of three colors?

I don't think that this is what you expect. What should be done is to save the color
of each point... I don't know if there is an easy way (good API) to do that with PCL.

You should check if there is a Issue about that in the repository I think. If not, open
one, you will get closer to the development team I guess.

Cheers,
frozar

2018-04-25 23:04 GMT+02:00 ToMadoRe <[hidden email]>:
Thanks Fabien for your reply. This was actually one of the first things I
tried. But for me the variables save_property_region_r/g/b were always 1
after querying them with getPointCloudRenderingProperties
(pcl::visualization::PCL_VISUALIZER_COLOR,...). I queried them right after
adding the cloud to the visualizer and before doing any kind of
setPointCloudRenderingProperties.

Therefore, the points were rendered as white points afterwards.
                                                       



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users