PCL 학습 노트--PCl::PointCloud 및 pcl::PointCloud::Ptr 유형의 변환

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);

좋은 웹페이지 즐겨찾기