point cloud library - Visualizing a (XYZRGBL) .pcd file -
i have 'xyzrgbl' point cloud in .pcd file. want visualize it, used code:
boost::shared_ptr<pcl::visualization::pclvisualizer> viewer (new pcl::visualization::pclvisualizer ("3d viewer")); viewer->setbackgroundcolor (0, 0, 0); viewer->addpointcloud<pcl::pointxyzrgb> (cloud1, "sample cloud"); viewer->setpointcloudrenderingproperties (pcl::visualization::pcl_visualizer_point_size, 1, "sample cloud"); viewer->addcoordinatesystem (1.0); viewer->initcameraparameters ();
but received error:
no matching function call ‘pcl::visualization::pclvisualizer::addpointcloud(pcl::pointcloud::ptr&, const char [13])
i tried:
viewer->addpointcloud<pcl::pointxyzrgbl>
instead of
viewer->addpointcloud<pcl::pointxyzrgb>
but still same problem. 1 know fault? in advance
at end have add:
while (!viewer->wasstopped ()) { viewer->spinonce (100); boost::this_thread::sleep (boost::posix_time::microseconds (100000)); }
this show point cloud.
Comments
Post a Comment