Interface CircleFitAlgebraic

All Known Implementing Classes:
CircleFit3Points, CircleFitHyperSimple, CircleFitHyperStable, CircleFitKasaA, CircleFitKasaB, CircleFitKasaC, CircleFitPratt, CircleFitTaubin

public interface CircleFitAlgebraic
Common interface for all algebraic circle fits.
  • Method Details

    • getFit

      Creates and returns a new circle fit instance of the specified type for the given sample points.
      Parameters:
      type - the circle fit type
      points - an array of 2D sample points
      Returns:
      a new circle fit instance
      See Also:
    • getParameters

      double[] getParameters()
      Returns parameters (A, B, C, D) of the AlgebraicCircle or null if the fit was unsuccessful. Parameters are not normalized.
      Returns:
      the algebraic circle parameters or null
    • getAlgebraicCircle

      Returns a AlgebraicCircle instance for this fit or null if the fit was unsuccessful.
      Returns:
      a AlgebraicCircle instance or null
    • getGeometricCircle

      Returns a GeometricCircle instance for this fit or null if the fit was unsuccessful.
      Returns:
      a GeometricCircle instance or null
    • getDecenteringMatrix

      static RealMatrix getDecenteringMatrix(double xr, double yr)
      Used to transform the algebraic parameter vector for sample data shifted to the reference point specified. If qq is the parameter vector for the data centered at (xr, yr), the original parameters q are obtained as
      q = M * qq
      Parameters:
      xr - reference point (x)
      yr - reference point (y)
      Returns:
      the transformation matrix
    • normalizeP

      default double[] normalizeP(double[] q)
      Normalize parameter vector q=(A,B,C,D) by enforcing the constraint B^2 + C^2 - 4 A D = 1.
      Parameters:
      q - original parameter vector
      Returns:
      normalized parameter vector