Class LMSEDualAbsoluteQuadricEstimator

java.lang.Object
com.irurueta.ar.calibration.estimators.DualAbsoluteQuadricEstimator
com.irurueta.ar.calibration.estimators.LMSEDualAbsoluteQuadricEstimator

public class LMSEDualAbsoluteQuadricEstimator extends DualAbsoluteQuadricEstimator
Implementation of a Dual Absolute Quadric estimator using an LMSE (Least Mean Squared Error) solution for provided pinhole cameras. This implementation assumes that: - cameras are arbitrary (usually the initial camera is the identity and must be discarded) as it creates a numerical degeneracy. - all provided cameras have the same intrinsic parameters. - it is assumed that skewness is zero, the principal point is at the center of the image plane (zero), and both horizontal and vertical focal planes are equal.
  • Field Details

    • DEFAULT_ALLOW_LMSE_SOLUTION

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

      private boolean allowLMSESolution
      Indicates if by default an LMSE (the Least Mean Square Error) solution is allowed if more pinhole cameras than the minimum are provided.
  • Constructor Details

    • LMSEDualAbsoluteQuadricEstimator

      public LMSEDualAbsoluteQuadricEstimator()
      Constructor.
    • LMSEDualAbsoluteQuadricEstimator

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

      public LMSEDualAbsoluteQuadricEstimator(List<com.irurueta.geometry.PinholeCamera> cameras)
      Constructor.
      Parameters:
      cameras - list of cameras used to estimate the Dual Absolute Quadric (DAQ).
      Throws:
      IllegalArgumentException - if list of cameras is null or invalid for default constraints.
    • LMSEDualAbsoluteQuadricEstimator

      public LMSEDualAbsoluteQuadricEstimator(List<com.irurueta.geometry.PinholeCamera> cameras, DualAbsoluteQuadricEstimatorListener listener)
      Constructor.
      Parameters:
      cameras - list of cameras used to estimate the Dual Absolute Quadric (DAQ).
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Throws:
      IllegalArgumentException - if list of cameras is null or invalid for default constraints.
  • Method Details

    • isLMSESolutionAllowed

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

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

      public boolean areValidConstraints()
      Indicates whether current constraints are enough to start the estimation. In order to obtain a linear solution for the DAQ estimation, we need at least the principal point at origin constraint.
      Overrides:
      areValidConstraints in class DualAbsoluteQuadricEstimator
      Returns:
      true if constraints are valid, false otherwise.
    • estimate

      public void estimate(DualAbsoluteQuadric result) throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, DualAbsoluteQuadricEstimatorException
      Estimates the Dual Absolute Quadric using provided cameras.
      Specified by:
      estimate in class DualAbsoluteQuadricEstimator
      Parameters:
      result - instance where estimated Dual Absolute Quadric (DAQ) will be stored.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
      com.irurueta.geometry.estimators.NotReadyException - if no valid input data has already been provided.
      DualAbsoluteQuadricEstimatorException - if an error occurs during estimation, usually because input data is not valid or numerically unstable.
    • getType

      Returns type of Dual Absolute Quadric estimator.
      Specified by:
      getType in class DualAbsoluteQuadricEstimator
      Returns:
      type of DAQ estimator.
    • getMinRequiredEquations

      private int getMinRequiredEquations()
      Gets minimum number of equations required to find a solution.
      Returns:
      minimum number of equations required to find a solution.
    • estimateZeroSkewnessPrincipalPointAtOriginAndKnownFocalDistanceAspectRatio

      private void estimateZeroSkewnessPrincipalPointAtOriginAndKnownFocalDistanceAspectRatio(DualAbsoluteQuadric result) throws DualAbsoluteQuadricEstimatorException
      Estimates Dual Absolute Quadric (DAQ) assuming that skewness is zero, principal point is located at origin of coordinates and that aspect ratio of focal distances is known.
      Parameters:
      result - instance where resulting estimated Dual Absolute Quadric will be stored.
      Throws:
      DualAbsoluteQuadricEstimatorException - if an error occurs during estimation, usually because repeated cameras are provided, or cameras corresponding to critical motion sequences such as pure parallel translations are provided, where no additional data is really provided.
    • estimateZeroSkewnessAndPrincipalPointAtOrigin

      private void estimateZeroSkewnessAndPrincipalPointAtOrigin(DualAbsoluteQuadric result) throws DualAbsoluteQuadricEstimatorException
      Estimates Dual Absolute Quadric (DAQ) assuming that skewness is zero, and principal point is located at origin of coordinates.
      Parameters:
      result - instance where resulting estimated Dual Absolute Quadric will be stored.
      Throws:
      DualAbsoluteQuadricEstimatorException - if an error occurs during estimation, usually because repeated cameras are provided, or cameras corresponding to critical motion sequences such as pure parallel translations are provided, where no additional data is really provided.
    • estimatePrincipalPointAtOrigin

      private void estimatePrincipalPointAtOrigin(DualAbsoluteQuadric result) throws DualAbsoluteQuadricEstimatorException
      Estimates Dual Absolute Quadric (DAQ) assuming that principal point is zero.
      Parameters:
      result - instance where resulting estimated Dual Absolute Quadric will be stored.
      Throws:
      DualAbsoluteQuadricEstimatorException - if an error occurs during estimation, usually because repeated cameras are provided, or cameras corresponding to critical motion sequences such as pure parallel translations are provided, where no additional data is really provided.