Hello:
I'm using CloudCompare 2.6.1 and I need to fix a cloud to a sphere using the Tools->Fit->Sphere option. If I apply the option several times to the same cloud, I obtain at each try a different solution (radius), so I can imagine that the option does not use all the points in the cloud (my cloud has approx. 80000 points). Does not use this option all the points? Which criteria uses for the selection?
About the Tools->Fit->Sphere option
Re: About the Tools->Fit->Sphere option
The method uses a 'RANSAC' algorithm. It's a random process (a certain number of points is picked several times and the best match is returned - the number of points and the number of trials is given by some magical statistics formula ;). This way the process is relatively robust to noise.
Daniel, CloudCompare admin
Re: About the Tools->Fit->Sphere option
I suggest an option in order to select between RANSAC and using all pointsdaniel wrote:The method uses a 'RANSAC' algorithm. It's a random process (a certain number of points is picked several times and the best match is returned - the number of points and the number of trials is given by some magical statistics formula ;). This way the process is relatively robust to noise.
Re: About the Tools->Fit->Sphere option
Hello, Daniel,daniel wrote: ↑Thu Jul 16, 2015 1:41 pm The method uses a 'RANSAC' algorithm. It's a random process (a certain number of points is picked several times and the best match is returned - the number of points and the number of trials is given by some magical statistics formula ;). This way the process is relatively robust to noise.
I go through the forum to seek the algorithm used in CC for Tools->Fit->Sphere function, as you said essentially, it's a RANSAC function. However, I am wondering if a least-square solver has been implemented in CC for a plane or sphere fitting, or anywhere else? If not, do you intend to implement such a function, for exemple using Ceres Solver (http://ceres-solver.org/) for Non-linear Least Squares problems?
Thanks in advance for your reply.
Zilong S
Re: About the Tools->Fit->Sphere option
We use here and there some conjugate gradient or Levenberg Marquardt algorithms (with Eigen).
Daniel, CloudCompare admin
Re: About the Tools->Fit->Sphere option
Conjugate gradient is very simple and actually used for a linear system A.X = b (sorry): https://github.com/CloudCompare/CloudCo ... Gradient.h
And for the Levenberg Marquardt algorithm, it's not in a public plugin... But the code can be found easily on the net: https://stackoverflow.com/questions/185 ... ementation
And for the Levenberg Marquardt algorithm, it's not in a public plugin... But the code can be found easily on the net: https://stackoverflow.com/questions/185 ... ementation
Daniel, CloudCompare admin