PCL 학습 노트--PCl::PointCloud 및 pcl::PointCloud::Ptr 유형의 변환
1.PointCloud::Ptr—>PointCloud
pcl::PointCloud<:pointxyz> cloud;
pcl::PointCloud<:pointxyz>::Ptr cloud_ptr(new pcl::PointCloud<:pointxyz>);
cloud=*cloud_ptr;
2.PointCloud—>PointCloud::Ptr
pcl::PointCloud<:pointxyz>::Ptr cloud_ptr(new pcl::PointCloud<:pointxyz>);
pcl::PointCloud<:pointxyz> cloud;
cloud_ptr=cloud.makeShared();
example:
1.
pcl::PointCloud<:pointxyz> cloudA;
pcl::octree::OctreePointCloudSearch<:pointxyz> octree(resolution);
octree.setInputCloud(cloudA.makeShared());
2.
pcl::PointCloud<:pointxyz>::Ptr cloudA(new pcl::PointCloud<:pointxyz>);
pcl::octree::OctreePointCloudSearch<:pointxyz> octree(resolution);
octree.setInputCloud(cloudA);