Class DLTLinePlaneCorrespondencePinholeCameraEstimator


public class DLTLinePlaneCorrespondencePinholeCameraEstimator extends LinePlaneCorrespondencePinholeCameraEstimator
This class implements an algorithm to estimate pinhole camera 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:
    • EPS

      public static final double EPS
      Defines tiny value considered as machine precision.
      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

    • DLTLinePlaneCorrespondencePinholeCameraEstimator

      public DLTLinePlaneCorrespondencePinholeCameraEstimator()
      Constructor.
    • DLTLinePlaneCorrespondencePinholeCameraEstimator

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

      public DLTLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D) throws WrongListSizesException
      Constructor.
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      Throws:
      IllegalArgumentException - if any of the lists are null.
      WrongListSizesException - if provided lists of correspondences don't have the same size and enough correspondences.
    • DLTLinePlaneCorrespondencePinholeCameraEstimator

      public DLTLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D, PinholeCameraEstimatorListener listener) throws WrongListSizesException
      Constructor.
      Parameters:
      planes - list of corresponding 3D planes.
      lines2D - list of corresponding 2D lines.
      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 correspondences don't have the same size and enough correspondences.
  • 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.
    • estimate

      Estimates a pinhole camera.
      Specified by:
      estimate in class PinholeCameraEstimator
      Returns:
      estimated pinhole camera.
      Throws:
      LockedException - if estimator is locked.
      NotReadyException - if input has not yet been provided.
      PinholeCameraEstimatorException - if an error occurs during estimation, usually because input data is not valid.
    • getType

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