Class DualAbsoluteQuadricInitialCamerasEstimator

java.lang.Object
com.irurueta.ar.sfm.InitialCamerasEstimator
com.irurueta.ar.sfm.DualAbsoluteQuadricInitialCamerasEstimator

public class DualAbsoluteQuadricInitialCamerasEstimator extends InitialCamerasEstimator
Estimates an initial pair of cameras in the metric stratum (up to an arbitrary scale) using a given fundamental matrix and assuming zero skewness and principal point at the origin for the intrinsic parameters of estimated cameras. Aspect ratio can be configured but by default it is assumed to be 1.0.
  • Field Details

    • aspectRatio

      private double aspectRatio
      Aspect ratio of intrinsic parameters of cameras. Typically, this value is 1.0 if vertical coordinates increase upwards, or -1.0 if it is the opposite.
  • Constructor Details

    • DualAbsoluteQuadricInitialCamerasEstimator

      public DualAbsoluteQuadricInitialCamerasEstimator()
      Constructor.
    • DualAbsoluteQuadricInitialCamerasEstimator

      public DualAbsoluteQuadricInitialCamerasEstimator(FundamentalMatrix fundamentalMatrix)
      Constructor.
      Parameters:
      fundamentalMatrix - fundamental matrix relating two views.
    • DualAbsoluteQuadricInitialCamerasEstimator

      public DualAbsoluteQuadricInitialCamerasEstimator(InitialCamerasEstimatorListener listener)
      Constructor.
      Parameters:
      listener - listener to handle events raised by this instance.
    • DualAbsoluteQuadricInitialCamerasEstimator

      public DualAbsoluteQuadricInitialCamerasEstimator(FundamentalMatrix fundamentalMatrix, InitialCamerasEstimatorListener listener)
      Constructor.
      Parameters:
      fundamentalMatrix - fundamental matrix relating two views.
      listener - listener to handle events raised by this instance.
  • Method Details

    • getMethod

      public InitialCamerasEstimatorMethod getMethod()
      Returns method used by this estimator.
      Specified by:
      getMethod in class InitialCamerasEstimator
      Returns:
      method used by this estimator.
    • isReady

      public boolean isReady()
      Indicates if estimator is ready.
      Specified by:
      isReady in class InitialCamerasEstimator
      Returns:
      true if estimator is ready, false otherwise.
    • estimate

      public void estimate() throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, InitialCamerasEstimationFailedException
      Estimates cameras.
      Specified by:
      estimate in class InitialCamerasEstimator
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
      com.irurueta.geometry.estimators.NotReadyException - if estimator is not ready.
      InitialCamerasEstimationFailedException - if estimation of cameras fails for some reason, typically due to numerical instabilities.
    • getAspectRatio

      public double getAspectRatio()
      Gets aspect ratio of intrinsic parameters of cameras. Typically, this value is 1.0 if vertical coordinates increase upwards, or -1.0 if it is the opposite.
      Returns:
      aspect ratio of intrinsic parameters of cameras.
    • setAspectRatio

      public void setAspectRatio(double aspectRatio) throws com.irurueta.geometry.estimators.LockedException
      Sets aspect ratio of intrinsic parameters of cameras. Typically, this value is 1.0 if vertical coordinates increase upwards, or -1.0 if it is the opposite.
      Parameters:
      aspectRatio - aspect ratio of intrinsic parameters of cameras.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • generateInitialMetricCamerasUsingDAQ

      public static void generateInitialMetricCamerasUsingDAQ(FundamentalMatrix fundamentalMatrix, com.irurueta.geometry.PinholeCamera leftCamera, com.irurueta.geometry.PinholeCamera rightCamera) throws InitialCamerasEstimationFailedException
      Generates initial cameras in metric stratum (with arbitrary scale) using provided fundamental matrix by means of estimation of the Dual Absolute Quadric and the required projective to metric transformation.
      Parameters:
      fundamentalMatrix - input fundamental matrix to estimate cameras.
      leftCamera - instance where left camera will be stored.
      rightCamera - instance where right camera will be stored.
      Throws:
      InitialCamerasEstimationFailedException - if estimation fails.
    • generateInitialMetricCamerasUsingDAQ

      public static void generateInitialMetricCamerasUsingDAQ(FundamentalMatrix fundamentalMatrix, double aspectRatio, com.irurueta.geometry.PinholeCamera leftCamera, com.irurueta.geometry.PinholeCamera rightCamera) throws InitialCamerasEstimationFailedException
      Generates initial cameras in metric stratum (with arbitrary scale) using provided fundamental matrix by means of estimation of the Dual Absolute Quadric and the required projective to metric transformation.
      Parameters:
      fundamentalMatrix - input fundamental matrix to estimate cameras.
      aspectRatio - aspect ratio of intrinsic parameters of cameras. Typically, this value is 1.0 if vertical coordinates increase upwards or -1.0 if it is the opposite.
      leftCamera - instance where left camera will be stored.
      rightCamera - instance where right camera will be stored.
      Throws:
      InitialCamerasEstimationFailedException - if estimation fails.