Ask Your Question

What does setOptimizeCoefficients do in SACSegmentation

asked 2013-02-14 05:58:01 -0500

kalectro gravatar image

updated 2014-01-28 17:15:14 -0500

ngrennan gravatar image

I followed the tutorial about Segmentation in PCL and wondered what setOptimizeCoefficients does. In the tutorial the only comment is that it is optional and in the documentation I am told to set this parameter if a coefficient refinement is required. I am still not really what that is supposed to mean. Can anybody explain that to me?

Thanks in advance


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-25 13:42:55 -0500

astaranowicz gravatar image

I'll try to explain using an example from my experience.

The plane's parameters is the normal and the distance to the plane from a fixed reference frame. The model's (plane) coefficients, in this case, are the normal vector (x,y,z) and the offset.

The model's coefficients are estimated using a least-squares method inside RANSAC to find the best-fit model. Once those coefficients are found; an optimization is performed over the estimated coefficients to minimize or reduce the mean-squared-error with respect the all of the 3D points.

The optimization a bit longer and can fail if you have a large percentage of outliers.

This method is optional due to the fact that if you know you have no outliers and no noise, then the least-squares solution will be the same as the optimized (refined) solution. (Saves computational time)

However, if you know that your points are affected by noise and you had to remove outliers, then optimizing the model's coefficients will give a better solution with respect to the least-squares solution. (More time, but better solution)

Its a trade-off between time and quality of the solution.

edit flag offensive delete link more


thank you for this great explanation. I was hoping that this option would perform something like that.

kalectro gravatar image kalectro  ( 2013-02-25 15:31:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-02-14 05:58:01 -0500

Seen: 2,077 times

Last updated: Feb 25 '13