Path: Imaging/ImageMatching
% Fit an ellipse to point data.
The ellipse is ax^2 + bxy + cy^2 + dx + ey + f = 0;
The output vector is [a;b;c;d;e;f];
The output vector is good to within a scale factor.
If r is entered it will do an additional minimization using a as the
starting vector using fminsearch.
--------------------------------------------------------------------------
Form:
EllipseImageFit;
aR = EllipseImageFit( x, y )
[aR, a, err] = EllipseImageFit( x, y, r )
--------------------------------------------------------------------------
------
Inputs
------
x (1,:) x values
y (1,:) y values
r (1,1) If entered fit using downhill simplex
-------
Outputs
-------
aR (1,6) [a;b;c;d;e;f] robust fit
a (1,6) [a;b;c;d;e;f] regular fit
err (1,1) Error
--------------------------------------------------------------------------
Reference: Trucco, E. and A. Verri, "Introductory Techniques for 3-D
Computer Vision, Prentice-Hall, 1998, p. 103-107.
--------------------------------------------------------------------------
Back to the Imaging Module page