Class EightPointsFundamentalMatrixEstimator
java.lang.Object
com.irurueta.ar.epipolar.estimators.FundamentalMatrixEstimator
com.irurueta.ar.epipolar.estimators.EightPointsFundamentalMatrixEstimator
Non-robust fundamental matrix estimator that uses 8 matched 2D points on
left and right views.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Indicates whether an LMSE (the Least Mean Square Error) solution is allowed or not.static final boolean
Constant indicating that by default an LMSE solution is not allowed.static final boolean
Indicates if by default provided point correspondences are normalized to increase the accuracy of the estimation.static final int
Minimum number of matched 2D points to start the estimation.private boolean
Indicates whether provided matched 2D points must be normalized to increase the accuracy of the estimation.Fields inherited from class com.irurueta.ar.epipolar.estimators.FundamentalMatrixEstimator
DEFAULT_METHOD, leftPoints, listener, locked, rightPoints
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.EightPointsFundamentalMatrixEstimator
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Constructor with matched 2D points. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether provided matched 2D points must be normalized to increase the accuracy of the estimation.estimate()
Estimates a fundamental matrix using provided lists of matched points on left and right views.Returns method of non-robust fundamental matrix estimator.int
Returns minimum number of matched pair of points required to start the estimation.boolean
Returns boolean indicating whether an LMSE (the Least Mean Square Error) solution is allowed or not.boolean
isReady()
Returns boolean indicating whether estimator is ready to start the fundamental matrix estimation.void
setLMSESolutionAllowed
(boolean allowed) Sets boolean indicating whether an LMSE (the LEast Mean Square Error) solution is allowed or not.void
setPointsNormalized
(boolean normalizePoints) Sets boolean indicating whether provided matched 2D points must be normalized to increase the accuracy of the estimation.Methods inherited from class com.irurueta.ar.epipolar.estimators.FundamentalMatrixEstimator
create, create, create, create, getLeftPoints, getListener, getRightPoints, isLocked, setListener, setPoints
-
Field Details
-
DEFAULT_ALLOW_LMSE_SOLUTION
public static final boolean DEFAULT_ALLOW_LMSE_SOLUTIONConstant indicating that by default an LMSE solution is not allowed.- See Also:
-
MIN_REQUIRED_POINTS
public static final int MIN_REQUIRED_POINTSMinimum number of matched 2D points to start the estimation.- See Also:
-
DEFAULT_NORMALIZE_POINT_CORRESPONDENCES
public static final boolean DEFAULT_NORMALIZE_POINT_CORRESPONDENCESIndicates if by default provided point correspondences are normalized to increase the accuracy of the estimation.- See Also:
-
allowLMSESolution
private boolean allowLMSESolutionIndicates whether an LMSE (the Least Mean Square Error) solution is allowed or not. When an LMSE solution is allowed, more than 8 matched points can be used for fundamental matrix estimation. If LMSE solution is not allowed then only the 8 former matched points will be taken into account. -
normalizePoints
private boolean normalizePointsIndicates whether provided matched 2D points must be normalized to increase the accuracy of the estimation.
-
-
Constructor Details
-
EightPointsFundamentalMatrixEstimator
public EightPointsFundamentalMatrixEstimator()Constructor. -
EightPointsFundamentalMatrixEstimator
public EightPointsFundamentalMatrixEstimator(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Constructor with matched 2D points.- Parameters:
leftPoints
- 2D points on left view.rightPoints
- 2D points on right view.- Throws:
IllegalArgumentException
- if provided list of points do not have the same length.
-
-
Method Details
-
isLMSESolutionAllowed
public boolean isLMSESolutionAllowed()Returns boolean indicating whether an LMSE (the Least Mean Square Error) solution is allowed or not. When an LMSE solution is allowed, more than 8 matched points can be used for fundamental matrix estimation. If LMSE solution is not allowed then only the 8 former matched points will be taken into account.- Returns:
- true if an LMSE solution is allowed, false otherwise.
-
setLMSESolutionAllowed
public void setLMSESolutionAllowed(boolean allowed) throws com.irurueta.geometry.estimators.LockedException Sets boolean indicating whether an LMSE (the LEast Mean Square Error) solution is allowed or not. When an LMSE solution is allowed, more than 8 matched points can be used for fundamental matrix estimation. If LMSE solution is not allowed then only the 8 former matched points will be taken into account.- Parameters:
allowed
- true if an LMSE solution is allowed, false otherwise.- Throws:
com.irurueta.geometry.estimators.LockedException
- if this instance is locked because an estimation is in progress.
-
arePointsNormalized
public boolean arePointsNormalized()Indicates whether provided matched 2D points must be normalized to increase the accuracy of the estimation.- Returns:
- true if points must be normalized, false otherwise.
-
setPointsNormalized
public void setPointsNormalized(boolean normalizePoints) throws com.irurueta.geometry.estimators.LockedException Sets boolean indicating whether provided matched 2D points must be normalized to increase the accuracy of the estimation.- Parameters:
normalizePoints
- true if points must be normalized, false otherwise.- Throws:
com.irurueta.geometry.estimators.LockedException
- if this instance is locked because an estimation is in progress.
-
isReady
public boolean isReady()Returns boolean indicating whether estimator is ready to start the fundamental matrix estimation. This is true when the required minimum number of matched points is provided to obtain a solution and both left and right views have the same number of matched points.- Specified by:
isReady
in classFundamentalMatrixEstimator
- Returns:
- true if estimator is ready to start the fundamental matrix estimation, false otherwise.
-
estimate
public FundamentalMatrix estimate() throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, FundamentalMatrixEstimatorExceptionEstimates a fundamental matrix using provided lists of matched points on left and right views.- Specified by:
estimate
in classFundamentalMatrixEstimator
- Returns:
- a fundamental matrix.
- Throws:
com.irurueta.geometry.estimators.LockedException
- if estimator is locked doing an estimation.com.irurueta.geometry.estimators.NotReadyException
- if estimator is not ready because required input points have not already been provided.FundamentalMatrixEstimatorException
- if configuration of provided 2D points is degenerate and fundamental matrix estimation fails.
-
getMethod
Returns method of non-robust fundamental matrix estimator.- Specified by:
getMethod
in classFundamentalMatrixEstimator
- Returns:
- method of fundamental matrix estimator.
-
getMinRequiredPoints
public int getMinRequiredPoints()Returns minimum number of matched pair of points required to start the estimation. This implementation requires a minimum of 8 points- Specified by:
getMinRequiredPoints
in classFundamentalMatrixEstimator
- Returns:
- minimum number of matched pair of points required to start the estimation. Always returns 8.
-