[scilab-Users] finding polynomials of best fit
Mathieu Dubois
mathieu.dubois at limsi.fr
Wed Aug 17 15:27:09 CEST 2011
Hello,
On 08/16/2011 04:50 PM, beemc2 at aol.com wrote:
> I'm a first-year engineering student working with a professor on
> stereoscopic cameras, and one of my assignments is to determine lens
> distortion in the cameras and put together an algorithm to correct
> it. My basic plan is take photos of a known grid of dots and put
> together a list of their actual positions and their positions as they
> appear in the image, the use some form of statistical regression
> technique to give myself a good approximation of the radial distortion
> as a function of distance from the center. (a perfect camera with no
> distortion should give a linear relation between the real position and
> the position in the image.) Since I don't have much information on
> the geometry of the lenses themselves, i can't solve the problem
> analytically. I want to just get the function as a fourth- or
> fifth-degree Taylor polynomial (I'm told that the fourth term is the
> highest one that will likely be significant).
> So is there a decent function in Scilab that will allow me to find a
> polynomial of best fit for a given set of data? There's something
> similar in Excel but I'd rather not have to go through the hassle of
> exporting and then re-importing the the data, and I also might need it
> later for other applications.
> YMW
Such functions are found in OpenCV so you may look at SIVP:
http://www.scilab.org/products/modules/pem/sivp (I don't know if it's in).
More information about the users
mailing list