Class SamplesAndInliersDataRefiner<T,S>

java.lang.Object
com.irurueta.geometry.refiners.Refiner<T>
com.irurueta.geometry.refiners.InliersDataRefiner<T>
com.irurueta.geometry.refiners.SamplesAndInliersDataRefiner<T,S>
Type Parameters:
T - type of instance to be refined.
S - type of samples.
Direct Known Subclasses:
Point2DRefiner, Point3DRefiner

public abstract class SamplesAndInliersDataRefiner<T,S> extends InliersDataRefiner<T>
Refines an instance of type T by taking into account an initial estimation, inlier samples, their residuals and a collection of 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

    • samples

      protected List<S> samples
      Collection of samples.
  • Constructor Details

    • SamplesAndInliersDataRefiner

      protected SamplesAndInliersDataRefiner()
      Constructor.
    • SamplesAndInliersDataRefiner

      protected SamplesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S> samples)
      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.
      samples - collection of samples.
    • SamplesAndInliersDataRefiner

      protected SamplesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S> samples)
      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.
      samples - collection of samples.
  • Method Details

    • getSamples

      public List<S> getSamples()
      Gets collection of samples.
      Returns:
      collection of samples.
    • setSamples

      public void setSamples(List<S> samples) throws LockedException
      Sets collection of samples.
      Parameters:
      samples - collection of 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.