The algebraic distance of a point to a circle is simply . Thus, we have a simple procedure to estimate the parameters: find the parameters that minimizes
Define the design matrix:
The least square solution is the eigenvector of the smallest eigenvalue of the matrix .
Some matlab code for the fit is here
and for conversion to standard form is here.