Pcl::PointCloud 및 pcl::PointCloud::Ptr 유형 변환

1118 단어 pclvs
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);
--------------------- 

참조 자료:https://blog.csdn.net/qq_39707351/article/details/83828242

좋은 웹페이지 즐겨찾기