Module imagingbook.common
Class CircleFit3Points
java.lang.Object
imagingbook.common.geometry.fitting.circle.algebraic.CircleFit3Points
- All Implemented Interfaces:
CircleFitAlgebraic
Performs an exact circle fit to 3 given (non-collinear) points. If the fit is unsuccessful, getParameters()
returns null
. See the Appendix of [1] (Sec. F.2.2) for details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/11/17
-
Nested Class Summary
Nested classes/interfaces inherited from interface imagingbook.common.geometry.fitting.circle.algebraic.CircleFitAlgebraic
CircleFitAlgebraic.FitType
-
Constructor Summary
ConstructorsConstructorDescriptionCircleFit3Points
(Pnt2d[] pts) Constructor.CircleFit3Points
(Pnt2d p0, Pnt2d p1, Pnt2d p2) 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
-
CircleFit3Points
Constructor. Fits a circle to the specified three sample points. If the fit is unsuccessful,getParameters()
returnsnull
.- Parameters:
p0
- sample point 1p1
- sample point 2p2
- sample point 3
-
CircleFit3Points
Constructor. Fits a circle to the specified three sample points, passed as an array of points. Only the first three points are used, additional points are ignored. If the fit is unsuccessful,getParameters()
returnsnull
.- Parameters:
pts
- three or more sample points
-
-
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
-