In this repository PCL library is used to segment the planer structures from a pointcloud. In my case I was trying to segment the table under the object.
The planar segmentation with RANSAC is used from PCL to detect the indices which represents the plane. Later on the ExtractIndices object is generated to extract the indices which represent the plane from the input point cloud.
Here are the steps of RANSAC plane detection method.
- Select three random points from your point cloud that will form a plane.
- Find the parameters of the plane.
- Then using point to plane equation calculate the distance between the points in the point cloud to this plane
- If the distance is within the specified threshold then these points will be considered as inliners.
- Repeat the process max_iterations time.
Lastly the points which represents the plane and the object of interest is visualized using a PCL viewer.
PCL library is required to be able to use this repo.
Cheers :)