Package com.irurueta.ar.epipolar
Class AlgebraicFundamentalMatrixComparator
java.lang.Object
com.irurueta.ar.epipolar.FundamentalMatrixComparator
com.irurueta.ar.epipolar.AlgebraicFundamentalMatrixComparator
Compares two fundamental matrices using a pure algebraic difference to
determine how similar they are.
This class simply computes the norm of the difference of both fundamental
matrices. The smaller the value the more similar the fundamental matrices
will be from a pure algebraic point of view.
It must be notice that although there is a tendency to be more similar
as the algebraic distance decreases, the value returned by this
implementation has no geometric meaning at all.
-
Field Summary
Fields inherited from class com.irurueta.ar.epipolar.FundamentalMatrixComparator
groundTruthFundamentalMatrix, listener, locked, otherFundamentalMatrix -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor.AlgebraicFundamentalMatrixComparator(FundamentalMatrix groundTruthFundamentalMatrix, FundamentalMatrix otherFundamentalMatrix) Constructor.AlgebraicFundamentalMatrixComparator(FundamentalMatrix groundTruthFundamentalMatrix, FundamentalMatrix otherFundamentalMatrix, FundamentalMatrixComparatorListener listener) Constructor. -
Method Summary
Methods inherited from class com.irurueta.ar.epipolar.FundamentalMatrixComparator
getGroundTruthFundamentalMatrix, getListener, getOtherFundamentalMatrix, isLocked, isReady, setGroundTruthFundamentalMatrix, setListener, setOtherFundamentalMatrix
-
Constructor Details
-
AlgebraicFundamentalMatrixComparator
public AlgebraicFundamentalMatrixComparator()Constructor. -
AlgebraicFundamentalMatrixComparator
public AlgebraicFundamentalMatrixComparator(FundamentalMatrix groundTruthFundamentalMatrix, FundamentalMatrix otherFundamentalMatrix) Constructor.- Parameters:
groundTruthFundamentalMatrix- fundamental matrix to be considered as ground truth to compare against.otherFundamentalMatrix- other fundamental matrix being compared.
-
AlgebraicFundamentalMatrixComparator
Constructor.- Parameters:
listener- listener to handle events generated by this class.
-
AlgebraicFundamentalMatrixComparator
public AlgebraicFundamentalMatrixComparator(FundamentalMatrix groundTruthFundamentalMatrix, FundamentalMatrix otherFundamentalMatrix, FundamentalMatrixComparatorListener listener) Constructor.- Parameters:
groundTruthFundamentalMatrix- fundamental matrix to be considered as ground truth to compare against.otherFundamentalMatrix- other fundamental matrix being compared.listener- listener to handle events generated by this class.
-
-
Method Details
-
compare
public double compare() throws com.irurueta.geometry.estimators.NotReadyException, com.irurueta.geometry.estimators.LockedException, FundamentalMatrixComparatorExceptionCompares two fundamental matrices and returns the comparison value. Comparison value will depend on the method implemented to compare both fundamental matrices.- Specified by:
comparein classFundamentalMatrixComparator- Returns:
- comparison value. Typically, the smaller the absolute value the more similar the fundamental matrices are.
- Throws:
com.irurueta.geometry.estimators.NotReadyException- if this comparator is not yet ready to start the comparison.com.irurueta.geometry.estimators.LockedException- if this instance is locked.FundamentalMatrixComparatorException- if comparison fails due to some other reason.
-
getType
Returns type of comparator- Specified by:
getTypein classFundamentalMatrixComparator- Returns:
- type of comparator
-