Normal Visualization Setting

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

Normal Visualization Setting

Mauro Bellone
Hi everyone,
I'm trying to visualize the normal vectors in a point cloud, everything work. BTW the vectors appear as white lines, I would like to visualize the vectors like colored arrows.
I checked in the documentation of pcl but I didn't find a way for setting the properties of the vectors like color or shape.

Someone know how is it possible to do it?

Cheers
Mauro
Reply | Threaded
Open this post in threaded view
|

Re: Normal Visualization Setting

Radu B Rusu
Administrator
Mauro,

Good question. It shouldn't be too hard to change that. Did you try the obvious setShapeRenderingProperties ?

Cheers,
Radu.

On 05/09/2012 07:58 AM, Mauro Bellone wrote:

> Hi everyone,
> I'm trying to visualize the normal vectors in a point cloud, everything
> work. BTW the vectors appear as white lines, I would like to visualize the
> vectors like colored arrows.
> I checked in the documentation of pcl but I didn't find a way for setting
> the properties of the vectors like color or shape.
>
> Someone know how is it possible to do it?
>
> Cheers
> Mauro
>
> --
> View this message in context: http://www.pcl-users.org/Normal-Visualization-Setting-tp3974363.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [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: Normal Visualization Setting

Mauro Bellone
Thank Radu,

i tried this:

      viewer->addPointCloudNormals <pcl::PointXYZRGBA, pcl::Normal> (image_cloud1, normals, 30, 0.1, "normals1", v3);
      viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_COLOR, 1.0, 0.0, 0.0, "normals1");
      viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, 3, "normals1");

and I have the normals as red lines but no arrows.

I could try something like the follows:

      viewer->setShapeRenderingProperties(property, value, id, viewport);

Where "property" can be only:
      pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
      pcl::visualization::PCL_VISUALIZER_OPACITY,
      pcl::visualization::PCL_VISUALIZER_LINE_WIDTH,
      pcl::visualization::PCL_VISUALIZER_FONT_SIZE,
      pcl::visualization::PCL_VISUALIZER_COLOR

"value" is a double and depend on the property

"id" can be line, sphere, polygon ecc....  ................. can id is "normals1" my cloud id ?

"viewport" in my case v3.

so i don't know and I found nothing about which property I should use. Are there other possible properties?

Thanks!
Mauro
Reply | Threaded
Open this post in threaded view
|

Re: Normal Visualization Setting

Radu B Rusu
Administrator
Mauro,

I see. If you want to display them as arrows instead of lines, you need to overload addPointCloudNormals or create a
separate method in your own code. We decided to use lines instead of arrows with tips as they are simpler and eat up
less resources when rendered.

Cheers,
Radu.

On 05/31/2012 07:11 AM, Mauro Bellone wrote:

> Thank Radu,
>
> i tried this:
>
>        viewer->addPointCloudNormals<pcl::PointXYZRGBA, pcl::Normal>
> (image_cloud1, normals, 30, 0.1, "normals1", v3);
>        viewer->setPointCloudRenderingProperties
> (pcl::visualization::PCL_VISUALIZER_COLOR, 1.0, 0.0, 0.0, "normals1");
>        viewer->setPointCloudRenderingProperties
> (pcl::visualization::PCL_VISUALIZER_LINE_WIDTH, 3, "normals1");
>
> and I have the normals as red lines but no arrows.
>
> I could try something like the follows:
>
>        viewer->setShapeRenderingProperties(property, value, id, viewport);
>
> Where "property" can be only:
>        pcl::visualization::PCL_VISUALIZER_POINT_SIZE,
>        pcl::visualization::PCL_VISUALIZER_OPACITY,
>        pcl::visualization::PCL_VISUALIZER_LINE_WIDTH,
>        pcl::visualization::PCL_VISUALIZER_FONT_SIZE,
>        pcl::visualization::PCL_VISUALIZER_COLOR
>
> "value" is a double and depend on the property
>
> "id" can be line, sphere, polygon ecc....  ................. can id is
> "normals1" my cloud id ?
>
> "viewport" in my case v3.
>
> so i don't know and I found nothing about which property I should use. Are
> there other possible properties?
>
> Thanks!
> Mauro
>
> --
> View this message in context: http://www.pcl-users.org/Normal-Visualization-Setting-tp3974363p4018785.html
> Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com.
> _______________________________________________
> [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: Normal Visualization Setting

Ivan
This post has NOT been accepted by the mailing list yet.
This post was updated on .
HI Radu,
This is a quiet old post but there is a very important idea I would like to highlight, which I think can improve the overall architecture of PCL library. Certainly, I have also seen some other posts which are exactly discussing the similar ideas about PCL functions implementation. For example, as you said that you have decided to stick with the lines instead of arrows for normals because it could take less processing power but why?
I think, it is the user choice to use a function or not, depending on their requirements and processing power. A library like PCL must have all the possible overloads of functions, especially if overloads can be integrated easily. But there is no point to exclude some overloads intentionally from the main library.

Sincerely yours,

Ivan
Reply | Threaded
Open this post in threaded view
|

Re: Normal Visualization Setting

TrinhTUHH
In reply to this post by Mauro Bellone
Hi,
Have you found the solution for this @Mauro?



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