3D ellipsoid closest fit estimation (as a way to characterize lens rolloff)

11 views (last 30 days)
I am currently working with a number of lenses and need to be able to calculate and correct for the rolloff in an arbitrary part of the field. I have observed that the rolloff appears (by inspection) to be in the shape of a cropped ellipsoid with arbitrary position and orientation.
Does anyone know how to establish the equation for a closest fit ellipsoid to a set of data in the form of a 3D matrix of: data(y-dim, x-dim, luma-dim)?
I have spent time considering how to extrapolate the parameters by inspecting plane slices through the data, but I haven't come up with a way to get the general equation parameters.
Thanks in advance, Sean

Answers (1)

Image Analyst
Image Analyst on 23 Dec 2011
You might try gridfit: http://www.mathworks.com/matlabcentral/fileexchange/8998-surface-fitting-using-gridfit I used to use John's other fitting routine but he has unfortunately removed it. You might try this alternative: http://www.mathworks.com/matlabcentral/fileexchange/13719-2d-weighted-polynomial-fitting-and-evaluation Take a blank shot (a uniform background) and then fit that to a quadratic in both directions. It makes a nice smooth model for background correcting the vignetting your lens caused.

Categories

Find more on Computational Geometry in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!