Class LMSERadialDistortionEstimator

java.lang.Object
com.irurueta.ar.calibration.estimators.RadialDistortionEstimator
com.irurueta.ar.calibration.estimators.LMSERadialDistortionEstimator

public class LMSERadialDistortionEstimator extends RadialDistortionEstimator
This class defines an LMSE (the Least Mean Square Error) estimator of radial distortion. Equations to determine a RadialDistortion instance for a single point are linear dependent, for that reason, at least 2 points are required for the estimation. Even though x and y equations are linear dependent, both equations are taken into account in case that sampled data contains errors, so that an LMSE error can be obtained.
  • 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 correspondences 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 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

    • LMSERadialDistortionEstimator

      public LMSERadialDistortionEstimator()
      Constructor.
    • LMSERadialDistortionEstimator

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

      public LMSERadialDistortionEstimator(List<com.irurueta.geometry.Point2D> distortedPoints, List<com.irurueta.geometry.Point2D> undistortedPoints)
      Constructor.
      Parameters:
      distortedPoints - list of distorted points. Distorted points are obtained after radial distortion is applied to an undistorted point.
      undistortedPoints - list of undistorted points.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size.
    • LMSERadialDistortionEstimator

      public LMSERadialDistortionEstimator(List<com.irurueta.geometry.Point2D> distortedPoints, List<com.irurueta.geometry.Point2D> undistortedPoints, RadialDistortionEstimatorListener listener)
      Constructor.
      Parameters:
      distortedPoints - list of distorted points. Distorted points are obtained after radial distortion is applied to an undistorted point.
      undistortedPoints - list of undistorted points.
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size.
    • LMSERadialDistortionEstimator

      public LMSERadialDistortionEstimator(com.irurueta.geometry.Point2D distortionCenter)
      Constructor with distortion center.
      Parameters:
      distortionCenter - Distortion center. This is usually equal to the principal point of an estimated camera. If not set it is assumed to be at the origin of coordinates (0,0).
    • LMSERadialDistortionEstimator

      public LMSERadialDistortionEstimator(com.irurueta.geometry.Point2D distortionCenter, RadialDistortionEstimatorListener listener)
      Constructor with listener and distortion center.
      Parameters:
      distortionCenter - Distortion center. This is usually equal to the principal point of an estimated camera. If not set it is assumed to be at the origin of coordinates (0,0).
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
    • LMSERadialDistortionEstimator

      public LMSERadialDistortionEstimator(List<com.irurueta.geometry.Point2D> distortedPoints, List<com.irurueta.geometry.Point2D> undistortedPoints, com.irurueta.geometry.Point2D distortionCenter)
      Constructor with points and distortion center.
      Parameters:
      distortedPoints - list of distorted points. Distorted points are obtained after radial distortion is applied to an undistorted point.
      undistortedPoints - list of undistorted points.
      distortionCenter - Distortion center. This is usually equal to the principal point of an estimated camera. If not set it is assumed to be at the origin of coordinates (0,0).
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size.
    • LMSERadialDistortionEstimator

      public LMSERadialDistortionEstimator(List<com.irurueta.geometry.Point2D> distortedPoints, List<com.irurueta.geometry.Point2D> undistortedPoints, com.irurueta.geometry.Point2D distortionCenter, RadialDistortionEstimatorListener listener)
      Constructor
      Parameters:
      distortedPoints - list of distorted points. Distorted points are obtained after radial distortion is applied to an undistorted point.
      undistortedPoints - list of undistorted points.
      distortionCenter - Distortion center. This is usually equal to the principal point of an estimated camera. If not set it is assumed to be at the origin of coordinates (0,0).
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Throws:
      IllegalArgumentException - if provided lists of points don't have the same size.
  • Method Details

    • isLMSESolutionAllowed

      public boolean isLMSESolutionAllowed()
      Indicates if an LMSE (the 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 com.irurueta.geometry.estimators.LockedException
      Specifies if an LMSE (the 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:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • estimate

      public RadialDistortion estimate() throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, RadialDistortionEstimatorException
      Estimates a radial distortion.
      Specified by:
      estimate in class RadialDistortionEstimator
      Returns:
      estimated radial distortion.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is loked.
      com.irurueta.geometry.estimators.NotReadyException - if input has not yet been provided.
      RadialDistortionEstimatorException - if an error occurs during estimation, usually because input data is not valid.
    • getType

      Returns type of radial distortion estimator.
      Specified by:
      getType in class RadialDistortionEstimator
      Returns:
      type of radial distortion estimator.