Class LMSEImageOfAbsoluteConicEstimator

java.lang.Object
com.irurueta.ar.calibration.estimators.ImageOfAbsoluteConicEstimator
com.irurueta.ar.calibration.estimators.LMSEImageOfAbsoluteConicEstimator

public class LMSEImageOfAbsoluteConicEstimator extends ImageOfAbsoluteConicEstimator
This class defines an LMSE (the Least Mean Square Error) estimator of Image of Absolute Conic (IAC). Aside from enabling constraints whenever possible to obtain more stable and accurate results, it is also discouraged to enable LMSE solutions, or at least if LMSE must be used, the minimum possible number of homographies should be provided in order to introduce the least amount of rounding errors possible. If a large number of homographies is available (assuming constant IAC), instead a robust estimation method should be chosen to discard outliers and obtain the most accurate and stable solution possible.
  • 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 homographies than the minimum are provided.
      See Also:
    • allowLMSESolution

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

    • LMSEImageOfAbsoluteConicEstimator

      public LMSEImageOfAbsoluteConicEstimator()
      Constructor.
    • LMSEImageOfAbsoluteConicEstimator

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

      public LMSEImageOfAbsoluteConicEstimator(List<com.irurueta.geometry.Transformation2D> homographies)
      Constructor
      Parameters:
      homographies - list of homographies (2D transformations) used to estimate the image of absolute conic (IAC), which can be used to obtain pinhole camera intrinsic parameters.
      Throws:
      IllegalArgumentException - if not enough homographies are provided for default IAC estimation constraints.
    • LMSEImageOfAbsoluteConicEstimator

      public LMSEImageOfAbsoluteConicEstimator(List<com.irurueta.geometry.Transformation2D> homographies, ImageOfAbsoluteConicEstimatorListener listener)
      Constructor
      Parameters:
      homographies - list of homographies (2D transformations) used to estimate the image of absolute conic (IAC), which can be used to obtain pinhole camera intrinsic parameters.
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Throws:
      IllegalArgumentException - if not enough homographies are provided for default IAC estimation constraints.
  • Method Details

    • isLMSESolutionAllowed

      public boolean isLMSESolutionAllowed()
      Indicates if an LMSE (the Least Mean Square Error) solution is allowed if more homographies than the minimum are provided. If false, the exceeding homographies will be ignored and only the first required correspondences 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 homographies than the minimum are provided. If false, the exceeding homographies will be ignored and only the first required ones will be used.
      Parameters:
      allowed - true if LMSE solution is allowed, false otherwise.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • estimate

      public ImageOfAbsoluteConic estimate() throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC).
      Specified by:
      estimate in class ImageOfAbsoluteConicEstimator
      Returns:
      estimated IAC.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
      com.irurueta.geometry.estimators.NotReadyException - if input has not yet been provided.
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided. Indeed, if provided homographies belong to the group of affine transformations (or other groups contained within such as metric or Euclidean ones), this exception will raise because camera movements will be degenerate. To avoid this exception, homographies must be purely projective.
    • getType

      Returns type of IAC estimator.
      Specified by:
      getType in class ImageOfAbsoluteConicEstimator
      Returns:
      type of IAC estimator.
    • estimateNoConstraints

      private ImageOfAbsoluteConic estimateNoConstraints() throws ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC) without constraints.
      Returns:
      estimated IAC.
      Throws:
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided.
    • estimateZeroSkewness

      private ImageOfAbsoluteConic estimateZeroSkewness() throws ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC) assuming that skewness is zero.
      Returns:
      estimated IAC
      Throws:
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided
    • estimatePrincipalPointAtOrigin

      private ImageOfAbsoluteConic estimatePrincipalPointAtOrigin() throws ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC) assuming that principal point is located at origin of coordinates.
      Returns:
      estimated IAC
      Throws:
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided
    • estimateZeroSkewnessAndPrincipalPointAtOrigin

      private ImageOfAbsoluteConic estimateZeroSkewnessAndPrincipalPointAtOrigin() throws ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC) assuming that skewness is zero and that principal point is located at origin of coordinates.
      Returns:
      estimated IAC
      Throws:
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided
    • estimateZeroSkewnessAndKnownFocalDistanceAspectRatio

      private ImageOfAbsoluteConic estimateZeroSkewnessAndKnownFocalDistanceAspectRatio() throws ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC) assuming that skewness is zero and that aspect ratio of focal distances is known.
      Returns:
      estimated IAC
      Throws:
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided
    • estimateZeroSkewnessPrincipalPointAtOriginAndKnownFocalDistanceAspectRatio

      private ImageOfAbsoluteConic estimateZeroSkewnessPrincipalPointAtOriginAndKnownFocalDistanceAspectRatio() throws ImageOfAbsoluteConicEstimatorException
      Estimates Image of Absolute Conic (IAC) assuming that skewness is zero, principal point is located at origin of coordinates and that aspect ratio of focal distances is known.
      Returns:
      estimated IAC
      Throws:
      ImageOfAbsoluteConicEstimatorException - if an error occurs during estimation, usually because repeated homographies are provided, or homographies corresponding to degenerate camera movements such as pure parallel translations where no additional data is really provided