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后跳出循环 } } }

使用 pcl::PointXYZRGB 的 equals 函数判断点云数据中点是否相同

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

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