Class FundamentalMatrixComparator

java.lang.Object
com.irurueta.ar.epipolar.FundamentalMatrixComparator
Direct Known Subclasses:
AlgebraicFundamentalMatrixComparator, EpipolarDistanceFundamentalMatrixComparator

public abstract class FundamentalMatrixComparator extends Object
Compares two fundamental matrices to determine how similar they are. This is an abstract class, subclasses of this class will implement different methods to compare fundamental matrices. This class will typically be used for testing or quality assessment purposes.
  • Field Details

    • groundTruthFundamentalMatrix

      protected FundamentalMatrix groundTruthFundamentalMatrix
      Fundamental matrix to be considered as ground truth to compare against.
    • otherFundamentalMatrix

      protected FundamentalMatrix otherFundamentalMatrix
      Other fundamental matrix being compared.
    • listener

      Listener to handle events generated by this class.
    • locked

      protected boolean locked
      Indicates whether this instance is busy doing computations.
  • Constructor Details

    • FundamentalMatrixComparator

      protected FundamentalMatrixComparator()
      Constructor.
    • FundamentalMatrixComparator

      protected FundamentalMatrixComparator(FundamentalMatrix groundTruthFundamentalMatrix, FundamentalMatrix otherFundamentalMatrix)
      Constructor.
      Parameters:
      groundTruthFundamentalMatrix - fundamental matrix to be considered as ground truth to compare against.
      otherFundamentalMatrix - other fundamental matrix being compared.
    • FundamentalMatrixComparator

      protected FundamentalMatrixComparator(FundamentalMatrixComparatorListener listener)
      Constructor.
      Parameters:
      listener - listener to handle events generated by this class.
    • FundamentalMatrixComparator

      protected FundamentalMatrixComparator(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

    • getGroundTruthFundamentalMatrix

      public FundamentalMatrix getGroundTruthFundamentalMatrix()
      Obtains fundamental matrix to be considered as ground truth to compare against.
      Returns:
      fundamental matrix to be considered as ground truth.
    • setGroundTruthFundamentalMatrix

      public void setGroundTruthFundamentalMatrix(FundamentalMatrix groundTruthFundamentalMatrix) throws com.irurueta.geometry.estimators.LockedException
      Sets fundamental matrix to be considered as ground truth to compare against.
      Parameters:
      groundTruthFundamentalMatrix - fundamental matrix to be considered as ground truth.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if this instance is locked.
    • getOtherFundamentalMatrix

      public FundamentalMatrix getOtherFundamentalMatrix()
      Obtains other fundamental matrix being compared.
      Returns:
      other fundamental matrix being compared.
    • setOtherFundamentalMatrix

      public void setOtherFundamentalMatrix(FundamentalMatrix otherFundamentalMatrix) throws com.irurueta.geometry.estimators.LockedException
      Sets other fundamental matrix being compared.
      Parameters:
      otherFundamentalMatrix - other fundamental matrix being compared.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if this instance is locked.
    • getListener

      Returns listener to handle events generated by instances of this class.
      Returns:
      listener to handle events generated by instances of this class.
    • setListener

      public void setListener(FundamentalMatrixComparatorListener listener) throws com.irurueta.geometry.estimators.LockedException
      Sets listener to handle events generated by instances of this class.
      Parameters:
      listener - listener to handle events generated by instances of this class.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if this instance is locked.
    • isLocked

      public boolean isLocked()
      Returns boolean indicating whether an instance of this class is busy doing computations.
      Returns:
      true if this instance is locked, false otherwise.
    • isReady

      public boolean isReady()
      Indicates whether this comparator is ready to start the comparison of two fundamental matrices. This is true when both ground truth and the other fundamental matrix has been provided and both have their internal matrices defined.
      Returns:
      true if this comparator is ready, false otherwise.
    • compare

      public abstract double compare() throws com.irurueta.geometry.estimators.NotReadyException, com.irurueta.geometry.estimators.LockedException, FundamentalMatrixComparatorException
      Compares two fundamental matrices and returns the comparison value. Comparison value will depend on the method implemented to compare both fundamental matrices.
      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

      public abstract FundamentalMatrixComparatorType getType()
      Returns type of comparator.
      Returns:
      type of comparator.