This python program fits an ellipse through a given set of points. This ellipse is optimal in the least squares sense.
fitEllipse.org
contains the source codefitEllipse.pdf
is the pdf made fromfitEllipse.org
to make the maths readable.fitEllipse.py
contains the algorithm, obtained by tanglingfitEllipse.org
fit_ellipse_example.py
shows an example on how to use the coderun_fit_ellipse.py
makes many test cases.
Before moving this code to github, it was available at http://nicky.vanforeest.com/misc/fitEllipse/fitEllipse.html.