Page 1 of 2

Tools>Fit>Plane and RANSAC

Posted: Sat Mar 28, 2015 10:26 am
by ripo
Hello Daniel,
I’m using cloudcompare for my thesis and I have a problem. I have to find the best plane to fit a point cloud. The software allows you to use two methods (at least I think so): tools> fit> plane and RANSAC.
My questions are: what is the difference between two commands? what criteria the two commands inserts the fit plane? which command inserts a better plane?
Thank You!!!

Re: Tools>Fit>Plane and RANSAC

Posted: Sat Mar 28, 2015 10:46 am
by daniel
In fact the 'Fit' method uses all the points of the selected cloud and fit a single plane.

The 'Ransac Shape Detection' plugin fits one or several planes (and other primitives) by randomly selecting some points in the input cloud. You can set their number with the plugin parameters dialog. But as it's a random process. It's better suited if you are looking for many planes and you don't need a reproducible process with full control.

Re: Tools>Fit>Plane and RANSAC

Posted: Mon Mar 30, 2015 8:16 am
by ripo
Thanks for the answer!
I would like to know how the software inserts the plane with "Fit" method. It uses a linear regression for example?

Re: Tools>Fit>Plane and RANSAC

Posted: Mon Mar 30, 2015 8:50 am
by daniel
Indeed, it's a standard least square fitting (based on the eigenvalues and vectors of the covariance matrix to be precise ;).

Re: Tools>Fit>Plane and RANSAC

Posted: Tue Mar 31, 2015 1:11 pm
by ripo
I try to set the parameters of RANSAC method in plugin parameters dialog. Each point cloud selected has a different set of parameters. For example a point cloud has automatically the parameter e=0.053 and another point cloud has e=0.045. Why are there different values? What causes different parameters?
Thank you very much for your support!

Re: Tools>Fit>Plane and RANSAC

Posted: Tue Mar 31, 2015 2:09 pm
by daniel
Because it's a default guess based on the cloud bounding-box. If you have a good value you should use it instead.

Re: Tools>Fit>Plane and RANSAC

Posted: Tue Mar 31, 2015 3:05 pm
by ripo
This is the problem. If I can understand which parameters are good, the problem is solved otherwise I have to change them. What do you mean by "good value"?

Re: Tools>Fit>Plane and RANSAC

Posted: Tue Mar 31, 2015 3:28 pm
by daniel
In truth the parameter 'e' depends on the units of your cloud, the level of noise, etc. Only the user can determine it correctly. But I didn't say it's easy ;)

Re: Tools>Fit>Plane and RANSAC

Posted: Wed Apr 01, 2015 1:50 pm
by ripo
I read some articles on RANSAC method. It is based on two kind of points: inliers and outliers. I have a question on the parameter "e" in plugin parameters dialog. Is the parameter "e" the size of "inliers box"? Or includes it outliers point so and in a second moment make the division from this two data?

Re: Tools>Fit>Plane and RANSAC

Posted: Wed Apr 01, 2015 2:48 pm
by daniel
It would be best to look at the "Ransac Shape Detection" article:
http://cg.cs.uni-bonn.de/en/publication ... efficient/

In the article 'e' corresponds to the 'epsilon' symbol (and it's the 'max distance to primitive' as recalled in the tool dialog... so basically the max distance to consider a point as being an 'inlier' point).