无法从“boost::shared_ptr<pcl::RangeImage>”转换为“const std::shared_ptr<const pcl::PointCloud<pcl::PointWit

无法从“boost::shared_ptrpcl::RangeImage”转换为“const std::shared_ptr

5.2可视化深度图像
报错:
无法从“boost::shared_ptr<pcl::RangeImage>”转换为“const std::shared_ptr<const pcl::PointCloud<pcl::PointWit_第1张图片
源码:

  pcl::visualization::PointCloudColorHandlerCustom<pcl::PointWithRange> range_image_color_handler(range_image_ptr, 0, 0, 0);
    
    viewer.addPointCloud(range_image_ptr, range_image_color_handler, "range image");
    viewer.setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "range image");

解决方法:

    pcl::visualization::PointCloudColorHandlerCustom<PointType> point_cloud_color_handler(point_cloud_ptr, 0, 0, 0);
    //pcl::visualization::PointCloudColorHandlerCustom range_image_color_handler(range_image_ptr, 0, 0, 0);
    //
    //viewer.addPointCloud(range_image_ptr, range_image_color_handler, "range image");
    //viewer.setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "range image");

参考链接:https://www.cnblogs.com/WTSRUVF/p/15427948.html

你可能感兴趣的:(pcl点云库学习记录,c++,visual,studio)