Class CircleFitHyperSimple
- All Implemented Interfaces:
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 speed, not for stability" (see https://people.cas.uab.edu/~mosya/cl/Hyper.m),
also referred to as "simple" version. 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). Note that this algorithm
may fail on certain critical point constellations, see CircleFitHyperStable
for a superior implementation.
[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).
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.geometry.fitting.circle.algebraic.CircleFitAlgebraic
CircleFitAlgebraic.FitType
-
Constructor Summary
ConstructorsConstructorDescriptionCircleFitHyperSimple
(Pnt2d[] points) Constructor.CircleFitHyperSimple
(Pnt2d[] points, Pnt2d xref) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble[]
Returns parameters (A, B, C, D) of theAlgebraicCircle
ornull
if the fit was unsuccessful.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.common.geometry.fitting.circle.algebraic.CircleFitAlgebraic
getAlgebraicCircle, getGeometricCircle, normalizeP
-
Constructor Details
-
CircleFitHyperSimple
Constructor. The centroid of the sample points is used as the reference point.- Parameters:
points
- sample points
-
CircleFitHyperSimple
Constructor. The centroid of the sample points is used as the reference point for data centering ifnull
is passed forxref
.- Parameters:
points
- sample pointsxref
- reference point ornull
-
-
Method Details
-
getParameters
Description copied from interface:CircleFitAlgebraic
Returns parameters (A, B, C, D) of theAlgebraicCircle
ornull
if the fit was unsuccessful. Parameters are not normalized.- Specified by:
getParameters
in interfaceCircleFitAlgebraic
- Returns:
- the algebraic circle parameters or
null
-