Class CircleFitHyperStable

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

public class CircleFitHyperStable extends Object implements CircleFitAlgebraic

This is an implementation of the "hyperaccurate" algebraic circle fit proposed by Al-Sharadqah and Chernov in [1], also described in [2] (Sec. 7.5, Eq. 744). This method combines the Pratt and Taubin fits to eliminate the essential bias. This version is "optimized for stability, not for speed" (see https://people.cas.uab.edu/~mosya/cl/HyperSVD.m). Singular-value decomposition is used for testing singularity of the data matrix and finding a solution in the singular case. 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] A. Al-Sharadqah and N. Chernov. "Error analysis for circle fitting algorithms". Electronic Journal of Statistics, 3:886–911 (2009).
[2] N. Chernov. "Circular and Linear Regression: Fitting Circles and Lines by Least Squares". Monographs on Statistics and Applied Probability. Taylor & Francis (2011).

  • Constructor Details

    • CircleFitHyperStable

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

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