# Least-squares fitting of circles and ellipses

- 2.1k Downloads
- 394 Citations

## Abstract

Fitting circles and ellipses to given points in the plane is a problem that arises in many application areas, e.g., computer graphics, coordinate meteorology, petroleum engineering, statistics. In the past, algorithms have been given which fit circles and ellipses in*some* least-squares sense without minimizing the geometric distance to the given points.

In this paper we present several algorithms which compute the ellipse for which the*sum of the squares of the distances to the given points is minimal*. These algorithms are compared with classical simple and iterative methods.

Circles and ellipses may be represented algebraically, i.e., by an equation of the form*F*(x)=0. If a point is on the curve, then its coordinates x are a zero of the function*F*. Alternatively, curves may be represented in parametric form, which is well suited for minimizing the sum of the squares of the distances.

## AMS subject classifications

65H10 65F20## Key words

Least squares curve fitting singular value decomposition## Preview

Unable to display preview. Download preview PDF.

## References

- 1.V. Pratt,
*Direct Least Squares Fitting of Algebraic Surfaces,*ACM J. Computer Graphics, Volume 21, Number 4, July 1987.Google Scholar - 2.M. G. Cox, A. B. Forbes,
*Strategies for Testing Assessment Software*, Technical Report NPL DITC 211/92, National Physical Laboratory, Teddington, UK., 1992.Google Scholar - 3.G. H. Golub, Ch. Van Loan,
*Matrix Computations*, 2nd ed., The Johns Hopkins University Press, Baltimore, MD., 1989.Google Scholar - 4.D. Sourlier, A. Bucher,
*Normgerechter Best-fit-Algorithms für Freiform-Flächen oder andere nicht-reguläre Ausgleichs-Flächen in Parameter-Form*, Technisches Messen 59 (1992), pp. 293–302.Google Scholar - 5.H. Späth,
*Orthogonal least squares fitting with linear manifolds*, Numer. Math., 48 (1986), pp. 441–445.Google Scholar - 6.L. B. Smith,
*The use of man-machine interaction in data fitting problems*, TR CS 131, Computer Science Department, Stanford University, Stanford, CA, Ph.D. thesis, March 1969.Google Scholar - 7.Y. V. Linnik,
*Method of least squares and principles of the theory of observations*, Pergamon Press, New York, 1961.Google Scholar - 8.C. L. Lawson,
*Contributions to the theory of linear least maximum approximation*, UCLA, Los Angeles, Ph.D. thesis, 1961.Google Scholar - 9.Fred L. Bookstein,
*Fitting conic sections to scattered data*, Computer Graphics and Image Processing 9, (1979), pp. 56–71.Google Scholar - 10.G. H. golub, V. Pereyra,
*The differentiation of pseudo-inverses and nonlinear least squares problems whose variables separate*, SIAM J. Numer. Anal. 10, No. 2, (1973), pp. 413–432.Google Scholar - 11.M. Heidari, P. C. Heigold,
*Determination of Hydraulic Conductivity Tensor Using a Nonlinear Least Squares Estimator,*Water Resources Bulletin, June 1993, pp. 415–424.Google Scholar - 12.W. Gander, U. von Matt,
*Some Least Squares Problems,*in Solving Problems in Scientific Computing Using Maple and Matlab, W. Gander and J. Hřebíček, eds., Springer-Verlag, 1993, pp. 251–266.Google Scholar - 13.Paul T. Boggs, Richard H. Byrd and Robert B. Schnabel,
*A stable and efficient algorithm for nonlinear orthogonal distance regression*, SIAM J. Sci. and Statist. Comput. 8 (1987), pp. 1052–1078.Google Scholar - 14.Paul T. Boggs, Richard H. Byrd, Janet E. Rogers and Robert B. Schnabel,
*User's Reference Guide for ODRPACK Verion 2.01—Software for Weighted Orthogonal Distance Regression*, National Institute of Standards and Technology, Gaithersburg, June 1992.Google Scholar - 15.P. E. Gill, W. Murray and M. H. Wright,
*Practical Optimization*, Academic Press, New York, 1981.Google Scholar - 16.Gene H. Golub, Alan Hoffman, G. W. Stewart,
*A generalization of the Eckart-Young-Mirsky Matrix Approximation Theorem*, Linear Algebra Appl., 88/89 (1987), pp. 317–327.Google Scholar - 17.Walter Gander, Gene H. Golub, and Rolf Strebel,
*Fitting of circles and ellipses—least squares solution,*Technical Report 217, Insitiut für Wisenschaftliches Rechnen, ETH Zürich, June 1994. Available via anonymous ftp from fip.inf.ethz.ch as doc/tech-reports/1994/217.ps.Google Scholar