Module imagingbook.common
Package imagingbook.common.ransac
Class RansacResult<T extends Primitive2d>
java.lang.Object
imagingbook.common.ransac.RansacResult<T>
- Type Parameters:
T
- generic primitive type
- All Implemented Interfaces:
Comparable<RansacResult<T>>
public class RansacResult<T extends Primitive2d>
extends Object
implements Comparable<RansacResult<T>>
Represents a single detection result returned by an implementation of RansacDetector
. Implements the
Comparable
interface for sorting by detection score. See Sec. 12.1 of [1] for additional details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/11/19
-
Constructor Summary
ConstructorsConstructorDescriptionRansacResult
(Pnt2d[] draw, T primitiveInit, T primitiveFinal, double score, Pnt2d[] inliers) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(RansacResult<T> other) Pnt2d[]
getDraw()
Returns the randomly drawn points that lead to this result.Pnt2d[]
Returns the set of inliers (points) associated with this result.Returns the final primitive obtained after fitting numerically to the associated inlier points.Returns the initial primitive (e.g., a circle) obtained from the minimum number of randomly drawn points.double
getScore()
Returns the score (number of inliers) associated with this result.
-
Constructor Details
-
RansacResult
-
-
Method Details
-
getPrimitiveInit
Returns the initial primitive (e.g., a circle) obtained from the minimum number of randomly drawn points.- Returns:
- the initial primitive
-
getPrimitiveFinal
Returns the final primitive obtained after fitting numerically to the associated inlier points.- Returns:
- the final primitive
-
getScore
Returns the score (number of inliers) associated with this result.- Returns:
- the score
-
getDraw
Returns the randomly drawn points that lead to this result.- Returns:
- array of points
-
getInliers
Returns the set of inliers (points) associated with this result.- Returns:
- array of points
-
compareTo
- Specified by:
compareTo
in interfaceComparable<T extends Primitive2d>
-