Least squares with three quadratic constraints (Ellipse fitting based on algebraic distance)

168 Views Asked by At

I would like to fit an ellipse to a given set of scattered data in $\mathcal{R}^2$. The fitting problem is in form least squares, minimizing the sum of squared algebraic distances \begin{equation} \min_{\mathbf{a}} \sum_i f(\mathbf{x}_i,\mathbf{a})^2 \end{equation} or \begin{equation} \min_{\mathbf{a}}||\mathbf{D}\mathbf{a}||^2 = \min_{\mathbf{a}}\ \mathbf{a}^T\mathbf{D}^T\mathbf{D}\mathbf{a} = \min_{\mathbf{a}} \ \mathbf{a}^T\mathbf{S}\mathbf{a} \end{equation} \begin{equation} \end{equation} subject to the ellipse specificity constraint \begin{equation} 4ac - b^2 = 1 \end{equation} or \begin{equation} \mathbf{a}^T\mathbf{C}\mathbf{a} = 1 \end{equation} Here $\mathbf{D} \in \mathcal{R}^{n\times 6}$ is the design matrix and $\mathbf{C} \in \mathcal{R}^{6\times 6}$ is the symmetric constraint matrix.

Introducing the Lagrange multiplier $\lambda$ and differentiating, this problem has the closed form solution obtained by generalized eigenvectors:

$\mathbf{S}\mathbf{a} = \lambda \mathbf{C}\mathbf{a}$ subject to $\mathbf{a}^T\mathbf{C}\mathbf{a}$

Could I add two more quadratic constraints similar to the ellipse specificity , $\mathbf{a}^T\mathbf{C_1}\mathbf{a} = k_1$ and $\mathbf{a}^T\mathbf{C_2}\mathbf{a} = k_2$ , and still have a closed form solution?

Thanks