Class FundamentalMatrixEstimator
java.lang.Object
com.irurueta.ar.epipolar.estimators.FundamentalMatrixEstimator
- Direct Known Subclasses:
AffineFundamentalMatrixEstimator
,EightPointsFundamentalMatrixEstimator
,SevenPointsFundamentalMatrixEstimator
Base class for a non-robust fundamental matrix estimator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FundamentalMatrixEstimatorMethod
Default method for non-robust fundamental matrix estimation.protected List<com.irurueta.geometry.Point2D>
List of 2D points corresponding to left view.protected FundamentalMatrixEstimatorListener
Listener to be notified of events generated by this fundamental matrix estimator.protected boolean
Indicates whether this instance is locked because estimation is being computed.protected List<com.irurueta.geometry.Point2D>
List of 2D points corresponding to right view. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor.protected
FundamentalMatrixEstimator
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Constructor with matched 2D points. -
Method Summary
Modifier and TypeMethodDescriptionstatic FundamentalMatrixEstimator
create()
Creates an instance of a fundamental matrix estimator using default method.static FundamentalMatrixEstimator
Creates an instance of a fundamental matrix estimator using provided method.static FundamentalMatrixEstimator
create
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Creates an instance of a fundamental matrix estimator using provided matched 2D points on left and right views and default method.static FundamentalMatrixEstimator
create
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, FundamentalMatrixEstimatorMethod method) Creates an instance of a fundamental matrix estimator using provided matched 2D points on left and right views and provided method.abstract FundamentalMatrix
estimate()
Estimates a fundamental matrix using provided lists of matched points on left and right views.List<com.irurueta.geometry.Point2D>
Returns matched 2D points on left view.Returns listener to be notified of events generated by this fundamental matrix estimator.abstract FundamentalMatrixEstimatorMethod
Returns method of non-robust fundamental matrix estimator.abstract int
Returns minimum number of matched pair of points required to start the estimation.List<com.irurueta.geometry.Point2D>
Returns matched 2D points on right view.private void
internalSetPoints
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Sets matched 2D points on left and right views.boolean
isLocked()
Returns boolean indicating if estimator is locked because estimation is under progress.abstract boolean
isReady()
Returns boolean indicating whether estimator is ready to start the fundamental matrix estimation.void
Sets listener to be notified of events generated by this fundamental matrix estimator.void
setPoints
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Sets matched 2D points on both left and right views.
-
Field Details
-
DEFAULT_METHOD
Default method for non-robust fundamental matrix estimation. -
listener
Listener to be notified of events generated by this fundamental matrix estimator. -
leftPoints
List of 2D points corresponding to left view. -
rightPoints
List of 2D points corresponding to right view. -
locked
protected boolean lockedIndicates whether this instance is locked because estimation is being computed.
-
-
Constructor Details
-
FundamentalMatrixEstimator
protected FundamentalMatrixEstimator()Constructor. -
FundamentalMatrixEstimator
protected FundamentalMatrixEstimator(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
-
getLeftPoints
Returns matched 2D points on left view.- Returns:
- 2D points on left view.
-
getRightPoints
Returns matched 2D points on right view.- Returns:
- 2D points on right view.
-
setPoints
public void setPoints(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) throws com.irurueta.geometry.estimators.LockedException Sets matched 2D points on both left and right views.- Parameters:
leftPoints
- matched 2D points on left view.rightPoints
- matched 2D points on right view.- Throws:
com.irurueta.geometry.estimators.LockedException
- if this fundamental matrix estimator is locked.IllegalArgumentException
- if provided matched points on left and right views do not have the same length.
-
getListener
Returns listener to be notified of events generated by this fundamental matrix estimator.- Returns:
- listener to be notified of events generated by this fundamental matrix estimator.
-
setListener
public void setListener(FundamentalMatrixEstimatorListener listener) throws com.irurueta.geometry.estimators.LockedException Sets listener to be notified of events generated by this fundamental matrix estimator.- Parameters:
listener
- listener to be notified of events generated by this fundamental matrix estimator.- Throws:
com.irurueta.geometry.estimators.LockedException
- if this estimator is locked.
-
isLocked
public boolean isLocked()Returns boolean indicating if estimator is locked because estimation is under progress.- Returns:
- true if estimator is locked, false otherwise.
-
isReady
public abstract boolean isReady()Returns boolean indicating whether estimator is ready to start the fundamental matrix estimation. This is true when the required number of matched points is provided to obtain a solution.- Returns:
- true if estimator is ready to start the fundamental matrix estimation, false otherwise.
-
estimate
public abstract 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.- 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.- Returns:
- method of fundamental matrix estimator.
-
getMinRequiredPoints
public abstract int getMinRequiredPoints()Returns minimum number of matched pair of points required to start the estimation.- Returns:
- minimum number of matched pair of points required to start the estimation.
-
create
Creates an instance of a fundamental matrix estimator using provided method.- Parameters:
method
- a fundamental matrix estimator method.- Returns:
- an instance of a fundamental matrix estimator.
-
create
public static FundamentalMatrixEstimator create(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, FundamentalMatrixEstimatorMethod method) Creates an instance of a fundamental matrix estimator using provided matched 2D points on left and right views and provided method.- Parameters:
leftPoints
- matched 2D points on left view.rightPoints
- matched 2D points on right view.method
- a fundamental matrix estimator method.- Returns:
- an instance of a fundamental matrix estimator.
- Throws:
IllegalArgumentException
- if provided list of points do not have the same length.
-
create
Creates an instance of a fundamental matrix estimator using default method.- Returns:
- an instance of a fundamental matrix estimator.
-
create
public static FundamentalMatrixEstimator create(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Creates an instance of a fundamental matrix estimator using provided matched 2D points on left and right views and default method.- Parameters:
leftPoints
- matched 2D points on left view.rightPoints
- matched 2D points on right view.- Returns:
- an instance of a fundamental matrix estimator.
- Throws:
IllegalArgumentException
- if provided list of points do not have the same length.
-
internalSetPoints
private void internalSetPoints(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Sets matched 2D points on left and right views. This method does not check whether instance is locked or not.- Parameters:
leftPoints
- matched 2D points on left view.rightPoints
- matched 2D points on right view.- Throws:
IllegalArgumentException
- if provided lists of points don't have the same size.
-