您的位置:首页 > 其它

《PCL点云库学习&VS2010(X64)》Part 33 循环中的多个点云ID处理技巧

2017-04-21 16:58 471 查看
《PCL点云库学习&VS2010(X64)》Part 33 循环中的多个点云ID处理技巧

在局部拟合过程中,会产生多个局部点云数据,可视化过程中会出现PointCloudID的处理问题:

SetPointCloudRenderingProperty()函数会有警告:

couldn't find the point cloud id ...

解决方法:

#include <string>
...
for(int k=0;k<cloud->size();++k)
{
....
string cloud_name;
cloud_name = "pointcloud_"+k;
viewer.removePointCloud(cloud_name );
viewer->addPointCloud(point, red_handle, cloud_name );
viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 4, cloud_name );
...
}


注:主要是removePointCloud这个函数,可以移除之前的id,避免警告的出现。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐