Module imagingbook.common
Class CircleFitTaubin
java.lang.Object
imagingbook.common.geometry.fitting.circle.algebraic.CircleFitTaubin
- All Implemented Interfaces:
CircleFitAlgebraic
This is an implementation of the algebraic circle fitting algorithm by Taubin [1], following the description in [2]
(Sec. 5.9-5.10).
The algorithm uses singular-value decomposition (SVD). 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] G. Taubin. "Estimation of planar curves, surfaces, and nonplanar space curves defined by implicit equations with
applications to edge and range image segmentation". IEEE Transactions on Pattern Analysis and Machine
Intelligence 13(11), 1115–1138 (1991).
[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
ConstructorsConstructorDescriptionCircleFitTaubin
(Pnt2d[] points) Constructor.CircleFitTaubin
(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
-
CircleFitTaubin
Constructor. The centroid of the sample points is used as the reference point.- Parameters:
points
- sample points
-
CircleFitTaubin
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
-