Package com.irurueta.ar.epipolar
Class SampsonCorrector
java.lang.Object
com.irurueta.ar.epipolar.Corrector
com.irurueta.ar.epipolar.SampsonCorrector
Fixes matched pairs of points so that they perfectly follow a given epipolar
geometry.
When matching points typically the matching precision is about 1 pixel,
however this makes that matched points under a given epipolar geometry (i.e.
fundamental or essential matrix), do not lie perfectly on the corresponding
epipolar plane or epipolar lines.
The consequence is that triangularization of these matches will fail or
produce inaccurate results.
By fixing matched points using a corrector following a given epipolar
geometry, this effect is alleviated.
This corrector uses the Sampson approximation which is capable to remove
small errors when matches are close to their real epipolar lines. This method
is faster than the Gold Standard method, but can only correct small errors
(1 or 2 pixels).
-
Field Summary
Fields inherited from class com.irurueta.ar.epipolar.Corrector
DEFAULT_PROGRESS_DELTA, DEFAULT_TYPE, fundamentalMatrix, leftCorrectedPoints, leftPoints, listener, locked, MAX_PROGRESS_DELTA, MIN_PROGRESS_DELTA, progressDelta, rightCorrectedPoints, rightPoints
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.SampsonCorrector
(CorrectorListener listener) Constructor.SampsonCorrector
(FundamentalMatrix fundamentalMatrix) Constructor.SampsonCorrector
(FundamentalMatrix fundamentalMatrix, CorrectorListener listener) Constructor.SampsonCorrector
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Constructor.SampsonCorrector
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, CorrectorListener listener) Constructor.SampsonCorrector
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, FundamentalMatrix fundamentalMatrix) Constructor.SampsonCorrector
(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, FundamentalMatrix fundamentalMatrix, CorrectorListener listener) Constructor. -
Method Summary
Methods inherited from class com.irurueta.ar.epipolar.Corrector
areValidPoints, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getFundamentalMatrix, getLeftCorrectedPoints, getLeftPoints, getListener, getProgressDelta, getRightCorrectedPoints, getRightPoints, isLocked, isReady, setFundamentalMatrix, setLeftAndRightPoints, setListener, setPointsAndFundamentalMatrix, setProgressDelta
-
Constructor Details
-
SampsonCorrector
public SampsonCorrector()Constructor. -
SampsonCorrector
Constructor.- Parameters:
fundamentalMatrix
- fundamental matrix to be set.
-
SampsonCorrector
public SampsonCorrector(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints) Constructor.- Parameters:
leftPoints
- points to be corrected on left view.rightPoints
- points to be corrected on right view.- Throws:
IllegalArgumentException
- if provided lists of points don't have the same size.
-
SampsonCorrector
public SampsonCorrector(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, FundamentalMatrix fundamentalMatrix) Constructor.- Parameters:
leftPoints
- points to be corrected on left view.rightPoints
- points to be corrected on right view.fundamentalMatrix
- fundamental matrix to be set.- Throws:
IllegalArgumentException
- if provided lists of points don't have the same size.
-
SampsonCorrector
Constructor.- Parameters:
listener
- listener to handle events generated by this class.
-
SampsonCorrector
Constructor.- Parameters:
fundamentalMatrix
- fundamental matrix to be set.listener
- listener to handle events generated by this class.
-
SampsonCorrector
public SampsonCorrector(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, CorrectorListener listener) Constructor.- Parameters:
leftPoints
- points to be corrected on left view.rightPoints
- points to be corrected on right view.listener
- listener to handle events generated by this class.- Throws:
IllegalArgumentException
- if provided lists of points don't have the same size.
-
SampsonCorrector
public SampsonCorrector(List<com.irurueta.geometry.Point2D> leftPoints, List<com.irurueta.geometry.Point2D> rightPoints, FundamentalMatrix fundamentalMatrix, CorrectorListener listener) Constructor.- Parameters:
leftPoints
- points to be corrected on left view.rightPoints
- points to be corrected on right view.fundamentalMatrix
- fundamental matrix to be set.listener
- listener to handle events generated by this class.- Throws:
IllegalArgumentException
- if provided lists of points don't have the same size.
-
-
Method Details
-
correct
public void correct() throws com.irurueta.geometry.estimators.NotReadyException, com.irurueta.geometry.estimators.LockedExceptionCorrects the lists of provided matched points to be corrected. -
getType
Gets type of correction being used.
-