TITLE: How to find an ellipse, given five points?
QUESTION [12 upvotes]: Is there a way to find the parameters 
$$A, B, \alpha, x_0, y_0$$ 
for the ellipse formula 
$$\frac{(x \cos\alpha+y\sin\alpha-x_0\cos\alpha-y_0\sin\alpha)^2}{A^2}+\frac{(-x \sin\alpha+y\cos\alpha+x_0\sin\alpha-y_0\cos\alpha)^2}{B^2}=1$$
given five points of the ellipse?

REPLY [10 votes]: What about using the DLT : http://en.wikipedia.org/wiki/Direct_linear_transformation ?
The solution is the null-space of the matrix
$$\left(\begin{array}
 &
 p_1^2 & p_1q_1 & q_1^2 & p_1 & q_1 & 1
\\
 p_2^2 & p_2q_2 & q_2^2 & p_2 & q_2 & 1
\\
 p_3^2 & p_3q_3 & q_3^2 & p_3 & q_3 & 1
\\
 p_4^2 & p_4q_4 & q_4^2 & p_4 & q_4 & 1
\\
 p_5^2 & p_5q_5 & q_5^2 & p_5 & q_5 & 1
\end{array}\right)$$
which can be found using SVD decomposition.