Very Small Coefficients in Ellipse Curve Fitting Problem with Image Indices

1 vue (au cours des 30 derniers jours)
Rafi Ahmed
Rafi Ahmed le 18 Avr 2021
Modifié(e) : Rafi Ahmed le 18 Avr 2021
I was trying to use the the concept with general equation of ellipse but it yields very small values for coefficients. Can someone explain? These coefficients should be larger than the results found by the lsqnonlin function. I tried to normalize them. Nevertheless, the coefficients are very small. How can I make them larger so that, semi-major axis of the ellipse can be found correctly?
load('mat_xy.mat');
x = mat_xy(:,1); y = mat_xy(:,2);
a0 = [2 2 2 2 2 2];
options = optimset('Display','iter');
% Due to the image coordinates, x and y indices are swapped
f = @(a) a(1).*y.^2 + a(2).*x.*y + a(3).*x.^2+ a(4).*y +a(5).*x + a(6);
af = lsqnonlin(f, a0, [], [], options);
here af vector is the list of coefficients. It yields,
af = [-1.6825e-08 -3.9741e-08 -2.4193e-08 1.2096e-05 1.4502e-05 -0.0022];
N.B. ezplot of the above coefficients yields an ellipse.

Réponses (0)

Catégories

En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by