std::vector<pcl::PointCloudpcl::PointXYZRGB::Ptr>::iterator it; // 迭代器 for (it = clouds.begin(); it != clouds.end(); ++it) { pcl::PointCloudpcl::PointXYZRGB::Ptr cloudV = *it; // 获取当前指针指向的点云数据 // 在当前点云数据中查找并删除点P1 for (size_t i = 0; i < cloudV->size(); ++i) { if (cloudV->at(i).equals(P1)) { cloudV->erase(cloudV->begin() + i); // 删除点P1 break; // 找到并删除点P1后跳出循环 } } }

将下面代码改写为使用使用pclPointXYZ或pclPointXYZRGB类型的equals函数来判断点是否相同的c++代码首先去骨架点然后去点云数据				stdvectorpclPointCloudpclPointXYZRGBPtriterator it; 迭代器				for it = cloudsbegin; it != cloudsend; ++it 									pclPoin

原文地址: https://www.cveoy.top/t/topic/iHxu 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录