【发布时间】:2021-07-31 21:10:04
【问题描述】:
我在使用 PCL 库时需要一些帮助。我只是点云的初学者。
我有一个大的点云,我可以从中提取平面。我最终得到了 6 个表面,每个表面分别存储在不同的点云中。我使用 XYZRGB 点。然而,每个点云最终都会有数千个点。The surfaces ploted using matplotlib
pcl::PointCloud<pcl::PointXYZRGB>::Ptr Surfacei
Size of Surface1 before : 216224
Size of Surface2 before : 5407
Size of Surface3 before : 4168
Size of Surface4 before : 7298
Size of Surface5 before : 5621
Size of Surface6 before : 30474
但是,我需要减少这个点数,因为它对我的需要来说确实很大。我最终通过这样做使用了 pcl::ConvexHull 类:
pcl::ConvexHull<pcl::PointXYZRGB> chull;
chull.setInputCloud(Surfacei);
chull.reconstruct(*Surfacei);
点数明显减少:
Size of Surface1 before : 30
Size of Surface2 before : 21
Size of Surface3 before : 127
Size of Surface4 before : 21
Size of Surface5 before : 25
Size of Surface6 before : 17
由于平面是四边形,我只想提取每个平面的顶点坐标,但找不到任何帮助。
有人可以帮我解决这个问题吗?
【问题讨论】:
标签: c++ ros point-cloud-library point-clouds