java.lang.Object
imagingbook.common.geometry.fitting.circle.algebraic.CircleFitKasaC
All Implemented Interfaces:
CircleFitAlgebraic

public class CircleFitKasaC extends Object implements CircleFitAlgebraic
This is an improved implementation of the Kåsa [1] circle fitting algorithm described in [2, Sec. 5.2] (Eq. 5.12). It is based on the Moore-Penrose pseudo-inverse which is applied to the full data matrix (i.e, no 3x3 scatter matrix is mounted). See also [3, Sec. 11.1.2] and CircleFitKasaA for the original version.

This algorithm is assumed to be numerically more stable than solutions based on solving a 3x3 system. The pseudo-inverse is obtained by singular-value decomposition (SVD). However, the significant bias on points sampled from a small circle segment remains. Fits to exactly 3 (non-collinear) points are handled properly. No data centering (which should improve numerical stability) is used.

[1] I. Kåsa. "A circle fitting procedure and its error analysis", IEEE Transactions on Instrumentation and Measurement 25(1), 8–14 (1976).
[2] N. Chernov. "Circular and Linear Regression: Fitting Circles and Lines by Least Squares". Monographs on Statistics and Applied Probability. Taylor & Francis (2011).
[3] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

  • Constructor Details

    • CircleFitKasaC

      public CircleFitKasaC(Pnt2d[] points)
      Constructor. The centroid of the sample points is used as the reference point.
      Parameters:
      points - sample points
    • CircleFitKasaC

      public CircleFitKasaC(Pnt2d[] points, Pnt2d xref)
      Constructor. The centroid of the sample points is used as the reference point for data centering if null is passed for xref.
      Parameters:
      points - sample points
      xref - reference point or null
  • Method Details