I'm trying to detect squares using Point cloud library. I have pcl data from a 3D lidar in which I need to find squares. Ransac doesn't have a model for square. I wish to know what can be the most efficient method for square detection.

1

There are 1 best solutions below

0
On

If you are looking for a filled square, the SACMODEL_PLANE should be able to find it. You may need to cluster the inliers of the plane model, and filter the clusters to find the location of the square.

If you are looking for the outline of a square, the SACMODEL_LINE should be able to find the 4 sides separately. You will then need some logic to filter out lines that do not belong, as well as to combine the inliners of the correct lines.