Line's color

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

Line's color

termin
This post has NOT been accepted by the mailing list yet.
I saw an example in http://pointclouds.org/documentation/tutorials/pcl_visualizer.php.
My question is how can i change default white color of a line?

viewer->addLine<pcl::PointXYZ> (cloud->points[0],
                                     cloud->points[cloud->size() - 1], "line");
Reply | Threaded
Open this post in threaded view
|

Re: Line's color

PG1337
Just use the "extented" addline function. So you can set your own RGB values for the line:
bool addLine (const P1 &pt1, const P2 &pt2, double r, double g, double b, const std::string &id="line", int viewport=0)

Documentation link:
http://docs.pointclouds.org/trunk/classpcl_1_1visualization_1_1_p_c_l_visualizer.html#a10864bcc375cad47986a3601fbcd2e51