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

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::Ptr-->PointCloud的转化

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

 

你可能感兴趣的:(PCL)