PCL中对象和共享指针的转化pcl::PointIndices::Ptr和pcl::PointIndices、PointCloud::Ptr和PointCloud

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lch_vison/article/details/80806464

1、pcl::PointIndices-->pcl::PointIndices::Ptr的转化

pcl::PointIndices inliers;
pcl::PointIndices::Ptr inliers_ptr(new pcl::PointIndices(inliers));

2、pcl::PointIndices::Ptr-->pcl::PointIndices的转化

pcl::PointIndices inliers;
pcl::PointIndices::Ptr inliers_ptr;
inliers=*inliers_ptr;

3、PointCloud<PointT>::Ptr-->PointCloud<PointT>的转化

PointCloud<PointT>::Ptr cloud_ptr(new pcl::PointCloud<PointT>);
PointCloud<PointT> cloud;
cloud=*cloud_ptr;
4、PointCloud<PointT>->PointCloud<PointT>::Ptr-的转化
PointCloud<PointT>::Ptr cloud_ptr(new pcl::PointCloud<PointT>);
PointCloud<PointT> cloud;
cloud_ptr=cloud.makeShared();

猜你喜欢

转载自blog.csdn.net/lch_vison/article/details/80806464