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

PCL点云库:如何使用迭代器查找并删除点云数据中的指定点

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

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