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

来源:互联网 发布:Tensorflow 字符识别 编辑:程序博客网 时间:2024/06/08 18:48

《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,避免警告的出现。

0 0