How to determine the general equation of an ellipse using lsqnonlin
Show older comments
Hello.
Given a set of points (xk,yk) how to determine de general equation of an ellipse: P(x,y) = Ax + Bxy + Cy^2 + Dx + Ey + F = 0
I've tried a few methods (direct least square, Kanatani's hypernormalization, Ellipse fitting with sampson distance). However, this time, I am trying to use de lsqnonlin command. The main difficulty is to guarantee that the coefficients really represent an ellipse, i.e., how do I add the condition: B^2-4*A*C<0 to the lsqnonlin ?
Thank you in advance.
Accepted Answer
More Answers (0)
Categories
Find more on Choose a Solver 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!