I need some help using the PCL library. I am just a beginner with point clouds.
I have a large point cloud from which I extract planes. I end up with 6 surfaces stored separately in a different point cloud each. I use XYZRGB points. However, each point cloud ends up coming with thousands of points.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
However, I need to reduce this number of points as it is really big for what I need. I ended up using the pcl::ConvexHull class by doing so :
pcl::ConvexHull<pcl::PointXYZRGB> chull;
chull.setInputCloud(Surfacei);
chull.reconstruct(*Surfacei);
The number of points significantly decreased :
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
As the planes are quadrilaterals I would like to only extract the coordinates of the vertices of each plane but I couldn't find anything to help doing so.
Could someone help me with this please ?