pcl 凸包ConvexHull
头文件等
#include <pcl/surface/convex_hull.h>
typedef pcl::PointXYZ PointT;
typedef pcl::PointCloud<PointT> CloudT;
typedef CloudT::Ptr CP
代码
CP PSO::tubao(CP cloud) {
pcl::ConvexHull<PointT> hull;
hull.setInputCloud(cloud);
hull.setDimension(3);
std::vector<pcl::Vertices> polygons;
CP surface_hull(new CloudT);
hull.reconstruct(*surface_hull, polygons);
//cout << surface_hull->size() << endl;
return surface_hull;
}
结果
标签:typedef,CloudT,ConvexHull,hull,凸包,pcl,CP From: https://blog.csdn.net/weixin_41674673/article/details/136615570