Class DLTPointCorrespondencePinholeCameraEstimator


public class DLTPointCorrespondencePinholeCameraEstimator extends PointCorrespondencePinholeCameraEstimator
This class implements an algorithm to estimate pinhole cameras using the DLT algorithm and point correspondences.
  • Field Details

    • MIN_NUMBER_OF_EQUATIONS

      public static final int MIN_NUMBER_OF_EQUATIONS
      Minimum number of required equations to estimate a pinhole camera.
      See Also:
    • DEFAULT_ALLOW_LMSE_SOLUTION

      public static final boolean DEFAULT_ALLOW_LMSE_SOLUTION
      Indicates if by default an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided.
      See Also:
    • allowLMSESolution

      private boolean allowLMSESolution
      Indicates if an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided. If false, the exceeding correspondences will be ignored and only the 6 first correspondences will be used.
  • Constructor Details

    • DLTPointCorrespondencePinholeCameraEstimator

      public DLTPointCorrespondencePinholeCameraEstimator()
      Constructor.
    • DLTPointCorrespondencePinholeCameraEstimator

      public DLTPointCorrespondencePinholeCameraEstimator(PinholeCameraEstimatorListener listener)
      Constructor with listener.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
    • DLTPointCorrespondencePinholeCameraEstimator

      public DLTPointCorrespondencePinholeCameraEstimator(List<Point3D> points3D, List<Point2D> points2D) throws WrongListSizesException
      Constructor.
      Parameters:
      points3D - list of corresponding 3D points.
      points2D - list of corresponding 2D points.
      Throws:
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of points don't have the same size and enough points.
    • DLTPointCorrespondencePinholeCameraEstimator

      public DLTPointCorrespondencePinholeCameraEstimator(List<Point3D> points3D, List<Point2D> points2D, PinholeCameraEstimatorListener listener) throws WrongListSizesException
      Constructor.
      Parameters:
      points3D - list of corresponding 3D points.
      points2D - list of corresponding 2D points.
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Throws:
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of points don't have the same size and enough points.
  • Method Details

    • isLMSESolutionAllowed

      public boolean isLMSESolutionAllowed()
      Indicates if an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided. If false, the exceeding correspondences will be ignored and only the 6 first correspondences will be used.
      Returns:
      true if LMSE solution is allowed, false otherwise.
    • setLMSESolutionAllowed

      public void setLMSESolutionAllowed(boolean allowed) throws LockedException
      Specifies if an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided. If false, the exceeding correspondences will be ignored and only the 6 first correspondences will be used.
      Parameters:
      allowed - true if LMSE solution is allowed, false otherwise.
      Throws:
      LockedException - if estimator is locked.
    • isReady

      public boolean isReady()
      Indicates if this estimator is ready to start the estimation.
      Specified by:
      isReady in class PinholeCameraEstimator
      Returns:
      true if estimator is ready, false otherwise.
    • internalEstimate

      protected com.irurueta.algebra.Matrix internalEstimate(List<Point3D> points3D, List<Point2D> points2D) throws PinholeCameraEstimatorException
      Internal method that actually computes the normalized pinhole camera internal matrix. Returned matrix must have norm equal to one and might be estimated using any convenient algorithm (i.e. DLT or weighted DLT).
      Specified by:
      internalEstimate in class PointCorrespondencePinholeCameraEstimator
      Parameters:
      points3D - list of 3D points. Points might or might not be normalized.
      points2D - list of 2D points. Points might or might not be normalized.
      Returns:
      matrix of estimated pinhole camera.
      Throws:
      PinholeCameraEstimatorException - if estimation fails for some reason (i.e. numerical instability or geometric degeneracy).
    • getType

      public PinholeCameraEstimatorType getType()
      Returns type of pinhole camera estimator.
      Specified by:
      getType in class PinholeCameraEstimator
      Returns:
      type of pinhole camera estimator.