Hi,
I wanted to get the planar parameters of a least squares fit plane from a selection of three points. I am able to select the points into a point picking list but am not able to extract a plane from the points.
Similarly I have some planar parameters for some planes that I have extracted. Is it possible to render the planes in CloudCompare? If yes, what is the procedure? I have started using the software very recently and am not familiar with all the functionalities,
Thank you.
Form least square plane from selected points
Re: Form least square plane from selected points
Hi,
To get a 'plane' from 3 points (I'm not sure we can talk about least squares in this particular case) there's multiple (indirect) ways:
- you can use the 'Point picking' tool and then select the 3rd small icon that appear on the top-right part of the 3D view ("Select 3 points..."). Once you have picked the 3 points, CC will draw the corresponding triangle with a particular label. You can save it by clicking again on the small 'floppy' icon (still in the top-right part of the 3D view). You won't get the plane equation as is, but you'll get the 'plane' normal and 3 points in this plane.
- alternatively, you can use the 'Tools > Other > Plane orientation' tool (this is a true 'least square' fitting)
It reminds me that we should add a simple way to 'manually' add primitives in CC.
To get a 'plane' from 3 points (I'm not sure we can talk about least squares in this particular case) there's multiple (indirect) ways:
- you can use the 'Point picking' tool and then select the 3rd small icon that appear on the top-right part of the 3D view ("Select 3 points..."). Once you have picked the 3 points, CC will draw the corresponding triangle with a particular label. You can save it by clicking again on the small 'floppy' icon (still in the top-right part of the 3D view). You won't get the plane equation as is, but you'll get the 'plane' normal and 3 points in this plane.
- alternatively, you can use the 'Tools > Other > Plane orientation' tool (this is a true 'least square' fitting)
- either on a whole point cloud or a part of it if you segment it manually before, for instance with the interactive segmentation tool (scissors icon)
- or by using the 'Point list picking' tool to pick your 3 points and then export it as new cloud
It reminds me that we should add a simple way to 'manually' add primitives in CC.
Daniel, CloudCompare admin
Re: Form least square plane from selected points
Can I just check that there isn't a direct way of getting the plan equation (from a plane fitted to a point cloud) within the software?
Many thanks
Many thanks
Re: Form least square plane from selected points
Can you be more specific? You want the equation under which form? ax + by + cz + d = 0?
Daniel, CloudCompare admin
Re: Form least square plane from selected points
Yes. I realise it can be derived from exporting the plane, but I was wondering if I can get it in the equation form you've written above.
Re: Form least square plane from selected points
In fact when we compute the plane we actually store the a,b,c and d coefficients. We simply don't display them (would be easy however).
Daniel, CloudCompare admin
Re: Form least square plane from selected points
Just to confirm, there is not a way of exporting those coefficients at the moment?
Re: Form least square plane from selected points
Right now no.
But it's a single line of code to add to the Fit > Plane method (if you can compile the project of course ;).
But it's a single line of code to add to the Fit > Plane method (if you can compile the project of course ;).
Daniel, CloudCompare admin