Class PointCorrespondenceAffineTransformation3DRobustEstimator

java.lang.Object
com.irurueta.geometry.estimators.AffineTransformation3DRobustEstimator
com.irurueta.geometry.estimators.PointCorrespondenceAffineTransformation3DRobustEstimator
Direct Known Subclasses:
LMedSPointCorrespondenceAffineTransformation3DRobustEstimator, MSACPointCorrespondenceAffineTransformation3DRobustEstimator, PROMedSPointCorrespondenceAffineTransformation3DRobustEstimator, PROSACPointCorrespondenceAffineTransformation3DRobustEstimator, RANSACPointCorrespondenceAffineTransformation3DRobustEstimator

public abstract class PointCorrespondenceAffineTransformation3DRobustEstimator extends AffineTransformation3DRobustEstimator
This is an abstract class for algorithms to robustly find the best affine 3D transformation for collections of matching 3D points. Implementations of this class should be able to detect and discard outliers in order to find the best solution.
  • Field Details

    • DEFAULT_ROBUST_METHOD

      public static final com.irurueta.numerical.robust.RobustEstimatorMethod DEFAULT_ROBUST_METHOD
      Default robust estimator method when none is provided.
    • inputPoints

      protected List<Point3D> inputPoints
      List of points to be used to estimate an affine 3D transformation. Each point in the list of input points must be matched with the corresponding point in the list of output points located at the same position. Hence, both input points and output points must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
    • outputPoints

      protected List<Point3D> outputPoints
      List of points to be used to estimate an affine 3D transformation. Each point in the list of output points must be matched with the corresponding point in the list of input points located at the same position. Hence, both input points and output points must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
  • Constructor Details

    • PointCorrespondenceAffineTransformation3DRobustEstimator

      protected PointCorrespondenceAffineTransformation3DRobustEstimator()
      Constructor.
    • PointCorrespondenceAffineTransformation3DRobustEstimator

      protected PointCorrespondenceAffineTransformation3DRobustEstimator(List<Point3D> inputPoints, List<Point3D> outputPoints)
      Constructor with lists of points to be used to estimate an affine 3D transformation. Points in the list located at the same position are considered to be matched. Hence, both lists must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • PointCorrespondenceAffineTransformation3DRobustEstimator

      protected PointCorrespondenceAffineTransformation3DRobustEstimator(AffineTransformation3DRobustEstimatorListener listener)
      Constructor.
      Parameters:
      listener - listener to be notified of events such as when estimation stars, ends or its progress significantly changes.
    • PointCorrespondenceAffineTransformation3DRobustEstimator

      protected PointCorrespondenceAffineTransformation3DRobustEstimator(AffineTransformation3DRobustEstimatorListener listener, List<Point3D> inputPoints, List<Point3D> outputPoints)
      Constructor with listener and lists of points to be used to estimate an affine 3D transformation. Points in the list located at the same position are considered to be matched. Hence, both lists must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
  • Method Details

    • getInputPoints

      public List<Point3D> getInputPoints()
      Returns list of input points to be used to estimate an affine 3D transformation. Each point in the list of input points must be matched with the corresponding point in the list of output points located at the same position. Hence, both input points and output points must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
      Returns:
      list of input points to be used to estimate an affine 3D transformation.
    • getOutputPoints

      public List<Point3D> getOutputPoints()
      Returns list of output points to be used to estimate an affine 3D transformation. Each point in the list of output points must be matched with the corresponding point in the list of input points located at the same position. Hence, both input points and output points must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
      Returns:
      list of output points to be used to estimate an affine 2D transformation.
    • setPoints

      public final void setPoints(List<Point3D> inputPoints, List<Point3D> outputPoints) throws LockedException
      Sets lists of points to be used to estimate an affine 3D transformation. Points in the list located at the same position are considered to be matched. Hence, both lists must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
      LockedException - if estimator is locked because a computation is already in progress.
    • isReady

      public boolean isReady()
      Indicates if estimator is ready to start the affine 3D transformation estimation. This is true when input data (i.e. lists of matched points) are provided and a minimum of MINIMUM_SIZE points are available.
      Returns:
      true if estimator is ready, false otherwise.
    • getQualityScores

      public double[] getQualityScores()
      Returns quality scores corresponding to each pair of matched points. The larger the score value the better the quality of the matching. This implementation always returns null. Subclasses using quality scores must implement proper behaviour.
      Returns:
      quality scores corresponding to each pair of matched points.
    • setQualityScores

      public void setQualityScores(double[] qualityScores) throws LockedException
      Sets quality scores corresponding to each pair of matched points. The larger the score value the better the quality of the matching. This implementation makes no action. Subclasses using quality scores must implement proper behaviour.
      Parameters:
      qualityScores - quality scores corresponding to each pair of matched points.
      Throws:
      LockedException - if robust estimator is locked because an estimation is already in progress.
      IllegalArgumentException - if provided quality scores length is smaller than MINIMUM_SIZE (i.e. 3 samples).
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 2D point correspondences and using provided robust estimator method.
      Parameters:
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(List<Point3D> inputPoints, List<Point3D> outputPoints, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(AffineTransformation3DRobustEstimatorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(AffineTransformation3DRobustEstimatorListener listener, List<Point3D> inputPoints, List<Point3D> outputPoints, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      qualityScores - quality scores corresponding to each pair of matched points.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(List<Point3D> inputPoints, List<Point3D> outputPoints, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      qualityScores - quality scores corresponding to each pair of matched points.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(AffineTransformation3DRobustEstimatorListener listener, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      qualityScores - quality scores corresponding to each pair of matched points.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(AffineTransformation3DRobustEstimatorListener listener, List<Point3D> inputPoints, List<Point3D> outputPoints, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using provided robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      qualityScores - quality scores corresponding to each pair of matched points.
      method - method of a robust estimator algorithm to estimate the best affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(List<Point3D> inputPoints, List<Point3D> outputPoints)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(double[] qualityScores)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      qualityScores - quality scores corresponding to each pair of matched points.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(List<Point3D> inputPoints, List<Point3D> outputPoints, double[] qualityScores)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      qualityScores - quality scores corresponding to each pair of matched points.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • create

      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      qualityScores - quality scores corresponding to each pair of matched points.
      Returns:
      an instance of affine 3D transformation estimator.
    • create

      public static PointCorrespondenceAffineTransformation3DRobustEstimator create(AffineTransformation3DRobustEstimatorListener listener, List<Point3D> inputPoints, List<Point3D> outputPoints, double[] qualityScores)
      Creates an affine 3D transformation estimator based on 3D point correspondences and using default robust estimator method.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      qualityScores - quality scores corresponding to each pair of matched points.
      Returns:
      an instance of affine 3D transformation estimator.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.
    • attemptRefine

      protected AffineTransformation3D attemptRefine(AffineTransformation3D transformation)
      Attempts to refine provided solution if refinement is requested. This method returns a refined solution of the same provided solution if refinement is not requested or has failed. If refinement is enabled, and it is requested to keep covariance, this method will also keep covariance of refined transformation.
      Parameters:
      transformation - transformation estimated by a robust estimator without refinement.
      Returns:
      solution after refinement (if requested) or the provided non-refined solution if not requested or refinement failed.
    • internalSetPoints

      private void internalSetPoints(List<Point3D> inputPoints, List<Point3D> outputPoints)
      Internal method to set lists of points to be used to estimate an affine 3D transformation. This method does not check whether estimator is locked or not.
      Parameters:
      inputPoints - list of input points to be used to estimate an affine 3D transformation.
      outputPoints - list of output points to be used to estimate an affine 3D transformation.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size or their size is smaller than MINIMUM_SIZE.