I am receiving a point cloud from a 3d scanner system which has already had outliers filtered. It is roughly cylindrical and an example looks like this:
Front view
Isometric view
I need to create a C++ algorithm that will maximize a cylinder bounded on the outside by this pointcloud.
It needs to be relatively fast (less than 1 second runtime) but doesn’t have to be perfect.
I have tried using the pcl library to fit a cylinder to the pointcloud which looks interesting and I am able to generate a cylinder then resize it so it fits within the bounds but I would then need to expand it as it is only bound on the outside by one point.
pcl::SACSegmentationFromNormals<pcl::PointXYZ, pcl::Normal> seg;
seg.setOptimizeCoefficients(true);
seg.setModelType(pcl::SACMODEL_CYLINDER);
seg.setMethodType(pcl::SAC_RANSAC);
Could I expand this cylinder generated by pcl until it is fully constrained by multiple points or is there a better way to do this problem.
Cylinder is only touching one point in the pointcloud (pcl)
I have also looked a library called ALGLIB that has some interesting features but I am not sure what the best method to use would be for the library.