MATLAB: Extract planes from point cloud

pcfitplanepointcloud

I have a point cloud and I want to extract series of planes through which the data passes. for each such plane, one can identify the points from scan data which belong to the plane.
how i do that?

Best Answer

Here is my attempt
Here is what it produces:
See the attached script