Class SampsonCorrector

java.lang.Object
com.irurueta.ar.epipolar.Corrector
com.irurueta.ar.epipolar.SampsonCorrector

public class SampsonCorrector extends Corrector
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).
  • Constructor Details

    • SampsonCorrector

      public SampsonCorrector()
      Constructor.
    • SampsonCorrector

      public SampsonCorrector(FundamentalMatrix fundamentalMatrix)
      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

      public SampsonCorrector(CorrectorListener listener)
      Constructor.
      Parameters:
      listener - listener to handle events generated by this class.
    • SampsonCorrector

      public SampsonCorrector(FundamentalMatrix fundamentalMatrix, CorrectorListener listener)
      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.LockedException
      Corrects the lists of provided matched points to be corrected.
      Specified by:
      correct in class Corrector
      Throws:
      com.irurueta.geometry.estimators.NotReadyException - if this instance is not ready (either points or fundamental matrix has not been provided yet).
      com.irurueta.geometry.estimators.LockedException - if this instance is locked doing computations.
    • getType

      public CorrectorType getType()
      Gets type of correction being used.
      Specified by:
      getType in class Corrector
      Returns:
      type of correction.