将pcl::PointCloudpcl::PointXYZRGB::Ptr xiang(new pcl::PointCloudpcl::PointXYZRGB);内的点全部表示的方法有多种,以下是一种简单的示例:

for (int i = 0; i < xiang->size(); ++i) {
    pcl::PointXYZRGB point = xiang->at(i);
    std::cout << "Point " << i << ": (" << point.x << ", " << point.y << ", " << point.z << ")" << std::endl;
}

上述代码使用for循环遍历了xiang指针所指向的点云中的每个点,并将其坐标打印输出。具体的表示方式可以根据实际需要进行调整,例如可以将点的颜色信息也一并输出。

将pclPointCloudpclPointXYZRGBPtr xiangnew pclPointCloudpclPointXYZRGB;内的点全部表示

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

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