Class PairMatchesAndInliersDataRefiner<T,S1,S2>

java.lang.Object
com.irurueta.geometry.refiners.Refiner<T>
com.irurueta.geometry.refiners.InliersDataRefiner<T>
com.irurueta.geometry.refiners.PairMatchesAndInliersDataRefiner<T,S1,S2>
Type Parameters:
T - type of instance to be refined.
S1 - type of matched samples in 1st set.
S2 - type of matched samples in 2nd set.
Direct Known Subclasses:
AffineTransformation2DRefiner, AffineTransformation3DRefiner, EuclideanTransformation2DRefiner, EuclideanTransformation3DRefiner, MetricTransformation2DRefiner, MetricTransformation3DRefiner, PinholeCameraRefiner, ProjectiveTransformation2DRefiner, ProjectiveTransformation3DRefiner

public abstract class PairMatchesAndInliersDataRefiner<T,S1,S2> extends InliersDataRefiner<T>
Refines an instance of type T by taking into account an initial estimation, inlier matches, their residuals and pairs of matches samples. This class can be used to find a solution that minimizes error of inliers in LMSE terms. Typically, a refiner is used by a robust estimator, however it can also be useful in some other situations.
  • Field Details

    • samples1

      protected List<S1> samples1
      1st set of paired samples.
    • samples2

      protected List<S2> samples2
      2nd set of paired samples.
  • Constructor Details

    • PairMatchesAndInliersDataRefiner

      protected PairMatchesAndInliersDataRefiner()
      Constructor.
    • PairMatchesAndInliersDataRefiner

      protected PairMatchesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S1> samples1, List<S2> samples2)
      Constructor.
      Parameters:
      initialEstimation - initial estimation to be set.
      keepCovariance - true if covariance of estimation must be kept after refinement, false otherwise.
      inliers - set indicating which of the provided matches are inliers.
      residuals - residuals for matched samples.
      numInliers - number of inliers on initial estimation.
      samples1 - 1st set of paired samples.
      samples2 - 2nd set of paired samples.
    • PairMatchesAndInliersDataRefiner

      protected PairMatchesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S1> samples1, List<S2> samples2)
      Constructor.
      Parameters:
      initialEstimation - initial estimation to be set.
      keepCovariance - true if covariance of estimation must be kept after refinement, false otherwise.
      inliersData - inlier data, typically obtained from a robust estimator.
      samples1 - 1st set of paired samples.
      samples2 - 2nd set of paired samples.
  • Method Details

    • getSamples1

      public List<S1> getSamples1()
      Gets 1st set of paired samples.
      Returns:
      1st set of paired samples.
    • setSamples1

      public void setSamples1(List<S1> samples1) throws LockedException
      Sets 1st set of paired samples.
      Parameters:
      samples1 - 1st set of paired samples.
      Throws:
      LockedException - if estimator is locked.
    • getSamples2

      public List<S2> getSamples2()
      Gets 2nd set of paired samples.
      Returns:
      2nd set of paired samples.
    • setSamples2

      public void setSamples2(List<S2> samples2) throws LockedException
      Sets 2nd set of paired samples.
      Parameters:
      samples2 - 2nd set of paired samples.
      Throws:
      LockedException - if estimator is locked.
    • isReady

      public boolean isReady()
      Indicates whether this refiner is ready to start refinement computation.
      Specified by:
      isReady in class Refiner<T>
      Returns:
      true if refiner is ready, false otherwise.