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

public class CircleFitKasaB extends Object implements CircleFitAlgebraic
This is an implementation of the modified Kåsa [1] circle fitting algorithm described in [2, Sec. 5.1]. A description of the concrete algorithm can be found in [3, Alg. 11.1]. See CircleFitKasaA for the original version.

Compared to the original Kåsa algorithm, this variant also solves a 3x3 linear system but uses a slightly different setup of the scatter matrix (using only powers of 2 instead of 3). A numerical solver is used for this purpose. The algorithm is fast but shares the same numerical instabilities and bias when sample points are taken from a small circle segment. It fails when matrix M becomes singular. Fits to exactly 3 (non-collinear) points are handled properly. Data centering is used to improve numerical stability (alternatively, a reference point can be specified).

[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).

See Also:
  • Constructor Details

    • CircleFitKasaB

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

      public CircleFitKasaB(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