Class DualAbsoluteQuadricEstimator

java.lang.Object
com.irurueta.ar.calibration.estimators.DualAbsoluteQuadricEstimator
Direct Known Subclasses:
LMSEDualAbsoluteQuadricEstimator, WeightedDualAbsoluteQuadricEstimator

public abstract class DualAbsoluteQuadricEstimator extends Object
This class defines the interface for an estimator of the Dual Absolute Quadric (DAQ) assuming equal vertical and horizontal focal length, no skewness and principal point at the center of the image. The projection of the Dual Absolute Quadric through a given pinhole camera P, becomes the Dual Image of Absolute Conic (DIAC). Since the DIAC is directly related to the intrinsic parameters K of the camera P used for projection, then by using a pair of arbitrary cameras, it is possible to solve their corresponding focal length, assuming 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_ZERO_SKEWNESS

      public static final boolean DEFAULT_ZERO_SKEWNESS
      Constant defining whether zero skewness is assumed.
      See Also:
    • DEFAULT_PRINCIPAL_POINT_AT_ORIGIN

      public static final boolean DEFAULT_PRINCIPAL_POINT_AT_ORIGIN
      Constant defining whether principal point is assumed to be at origin of coordinates.
      See Also:
    • DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO_KNOWN

      public static final boolean DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO_KNOWN
      Constant defining whether aspect ratio of focal distance (i.e. vertical focal distance divided by horizontal focal distance) is known or not. Notice that focal distance aspect ratio is not related to image size aspect ratio. Typically, LCD sensor cells are square and hence aspect ratio of focal distances is known and equal to 1.
      See Also:
    • DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO

      public static final double DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO
      Constant defining default aspect ratio of focal distances. This constant takes into account that typically LCD sensor cells are square and hence aspect ratio of focal distances is known and equal to 1.
      See Also:
    • DEFAULT_ENFORCE_SINGULARITY

      public static final boolean DEFAULT_ENFORCE_SINGULARITY
      Constant defining whether rank 3 must be enforced in estimated Dual Absolute Quadric (DAQ), thus making it singular. DAQ is always singular in any arbitrary projective space, however, due to noise in samples, estimation might not be singular. By enforcing singularity an additional constraint is imposed, which might result in less cameras needed for DAQ estimation.
      See Also:
    • DEFAULT_VALIDATE_ENFORCED_SINGULARITY

      public static final boolean DEFAULT_VALIDATE_ENFORCED_SINGULARITY
      Indicates whether enforced singularity will be validated by checking that determinant of estimated Dual Absolute Quadric (DAQ) is below a certain threshold.
      See Also:
    • DEFAULT_DETERMINANT_THRESHOLD

      public static final double DEFAULT_DETERMINANT_THRESHOLD
      Default threshold to determine whether estimated Dual Absolute Quadric (DAQ) has rank 3 or not.
      See Also:
    • MIN_ABS_FOCAL_DISTANCE_ASPECT_RATIO

      public static final double MIN_ABS_FOCAL_DISTANCE_ASPECT_RATIO
      Minimum absolute value allowed for aspect ratio of focal distances.
      See Also:
    • MIN_REQUIRED_EQUATIONS

      protected static final int MIN_REQUIRED_EQUATIONS
      Minimum number of required equations to solve DAQ.
      See Also:
    • DEFAULT_ESTIMATOR_TYPE

      public static final DualAbsoluteQuadricEstimatorType DEFAULT_ESTIMATOR_TYPE
      Default type for a DAQ estimator.
    • zeroSkewness

      protected boolean zeroSkewness
      Indicates whether camera skewness is assumed to be zero or not.
    • principalPointAtOrigin

      protected boolean principalPointAtOrigin
      Indicates whether principal point is assumed to be at origin of coordinates or not. If false, the principal point will be estimated, otherwise it will be assumed to be at image center (i.e. origin of coordinates).
    • focalDistanceAspectRatioKnown

      protected boolean focalDistanceAspectRatioKnown
      Indicates whether aspect ratio of focal distances (i.e. vertical focal distance divided by horizontal focal distance) is known or not. Notice that focal distance aspect ratio is not related to image size aspect ratio. Typically, LCD sensor cells are square and hence aspect ratio of focal distances is known and equal to 1. This value is only taken into account if skewness is assumed to be zero, otherwise it is ignored.
    • focalDistanceAspectRatio

      protected double focalDistanceAspectRatio
      Contains aspect ratio of focal distances (i.e. vertical focal distance divided by horizontal focal distance). This value is only taken into account if skewness is assumed to be zero and focal distance aspect ratio is marked as known, otherwise it is ignored. By default, this is 1.0, since it is taken into account that typically LCD sensor cells are square and hence aspect ratio focal distances is known and equal to 1. Notice that focal distance aspect ratio is not related to image size aspect ratio.
    • singularityEnforced

      protected boolean singularityEnforced
      Indicates whether a singular DAQ is enforced or not. Dual Absolute Quadric is singular (has rank 3) in any projective space, however, due to noise in samples, estimated DAQ might not be fully singular.
    • validateEnforcedSingularity

      protected boolean validateEnforcedSingularity
      Indicates whether enforced singularity will be validated by checking that determinant of estimated Dual Absolute Quadric (DAQ) is below a certain threshold.
    • determinantThreshold

      protected double determinantThreshold
      Threshold to determine whether estimated Dual Absolute Quadric (DAQ) has rank 3 or not when validation is enabled.
    • locked

      protected boolean locked
      True when an estimator is estimating the Dual Absolute Quadric (DAQ).
    • listener

      Listener to be notified of events such as when estimation starts, ends or estimation progress changes.
    • cameras

      protected List<com.irurueta.geometry.PinholeCamera> cameras
      List of cameras used to estimate the Dual Absolute Quadric (DAQ).
  • Constructor Details

    • DualAbsoluteQuadricEstimator

      protected DualAbsoluteQuadricEstimator()
      Constructor.
    • DualAbsoluteQuadricEstimator

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

      protected DualAbsoluteQuadricEstimator(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.
    • DualAbsoluteQuadricEstimator

      protected DualAbsoluteQuadricEstimator(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

    • isZeroSkewness

      public boolean isZeroSkewness()
      Returns boolean indicating whether camera skewness is assumed to be zero or not. Skewness determines whether LCD sensor cells are properly aligned or not, where zero indicates perfect alignment. Typically, skewness is a value equal or very close to zero.
      Returns:
      true if camera skewness is assumed to be zero, otherwise camera skewness is estimated
    • setZeroSkewness

      public void setZeroSkewness(boolean zeroSkewness) throws com.irurueta.geometry.estimators.LockedException
      Sets boolean indicating whether camera skewness is assumed to be zero or not. Skewness determines whether LCD sensor cells are properly aligned or not, where zero indicates perfect alignment. Typically, skewness is a value equal or very close to zero.
      Parameters:
      zeroSkewness - true if camera skewness is assumed to be zero, otherwise camera skewness is estimated
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked
    • isPrincipalPointAtOrigin

      public boolean isPrincipalPointAtOrigin()
      Returns boolean indicating whether principal point is assumed to be at origin of coordinates or not. Typically principal point is located at image center (origin of coordinates), and usually matches the center of radial distortion if it is taken into account.
      Returns:
      true if principal point is assumed to be at origin of coordinates, false if principal point must be estimated
    • setPrincipalPointAtOrigin

      public void setPrincipalPointAtOrigin(boolean principalPointAtOrigin) throws com.irurueta.geometry.estimators.LockedException
      Sets boolean indicating whether principal point is assumed to be at origin of coordinates or not. Typically principal point is located at image center (origin of coordinates), and usually matches the center of radial distortion if it is taken into account.
      Parameters:
      principalPointAtOrigin - true if principal point is assumed to be at origin of coordinates, false if principal point must be estimated
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked
    • isFocalDistanceAspectRatioKnown

      public boolean isFocalDistanceAspectRatioKnown()
      Returns boolean indicating whether aspect ratio of focal distances (i.e. vertical focal distance divided by horizontal focal distance) is known or not. Notice that focal distance aspect ratio is not related to image size aspect ratio. Typically, LCD sensor cells are square and hence aspect ratio of focal distances is known and equal to 1. This value is only taken into account if skewness is assumed to be zero, otherwise it is ignored.
      Returns:
      true if focal distance aspect ratio is known, false otherwise
    • setFocalDistanceAspectRatioKnown

      public void setFocalDistanceAspectRatioKnown(boolean focalDistanceAspectRatioKnown) throws com.irurueta.geometry.estimators.LockedException
      Sets value indicating whether aspect ratio of focal distances (i.e. vertical focal distance divided by horizontal focal distance) is known or not. Notice that focal distance aspect ratio is not related to image size aspect ratio. Typically, LCD sensor cells are square and hence aspect ratio of focal distances is known and equal to 1. This value is only taken into account if skewness is assumed to be zero, otherwise it is ignored.
      Parameters:
      focalDistanceAspectRatioKnown - true if focal distance aspect ratio is known, false otherwise.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • getFocalDistanceAspectRatio

      public double getFocalDistanceAspectRatio()
      Returns aspect ratio of focal distances (i.e. vertical focal distance divided by horizontal focal distance). This value is only taken into account if skewness is assumed to be zero and focal distance aspect ratio is marked as known, otherwise it is ignored. By default, this is 1.0, since it is taken into account that typically LCD sensor cells are square and hence aspect ratio focal distances is known and equal to 1. Notice that focal distance aspect ratio is not related to image size aspect ratio. Notice that a negative aspect ratio indicates that vertical axis is reversed. This can be useful in some situations where image vertical coordinates are reversed respect to the physical world (i.e. in computer graphics typically image vertical coordinates go downwards, while in physical world they go upwards).
      Returns:
      aspect ratio of focal distances.
    • setFocalDistanceAspectRatio

      public void setFocalDistanceAspectRatio(double focalDistanceAspectRatio) throws com.irurueta.geometry.estimators.LockedException
      Sets aspect ratio of focal distances (i.e. vertical focal distance divided by horizontal focal distance). This value is only taken into account if skewness is assumed to be zero and focal distance aspect ratio is marked as known, otherwise it is ignored. By default, this is 1.0, since it is taken into account that typically LCD sensor cells are square and hence aspect ratio focal distances is known and equal to 1. Notice that focal distance aspect ratio is not related to image size aspect ratio. Notice that a negative aspect ratio indicates that vertical axis is reversed. This can be useful in some situations where image vertical coordinates are reversed respect to the physical world (i.e. in computer graphics typically image vertical coordinates go downwards, while in physical world they go upwards).
      Parameters:
      focalDistanceAspectRatio - aspect ratio of focal distances to be set.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
      IllegalArgumentException - if focal distance aspect ratio is too close to zero, as it might produce numerical instabilities.
    • isSingularityEnforced

      public boolean isSingularityEnforced()
      Indicates whether a singular DAQ is enforced or not. Dual Absolute Quadric is singular (has rank 3) in any projective space, however, due to noise in samples, estimated DAQ might not be fully singular.
      Returns:
      true when singular DAQ is enforced, false otherwise.
    • setSingularityEnforced

      public void setSingularityEnforced(boolean singularityEnforced) throws com.irurueta.geometry.estimators.LockedException
      Specifies whether a singular DAQ is enforced or not. Dual Absolute Quadric is singular (has rank 3) in any projective space, however, due to noise in samples, estimated DAQ might not be fully singular.
      Parameters:
      singularityEnforced - true when singular DAQ is enforced, false otherwise.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • isEnforcedSingularityValidated

      public boolean isEnforcedSingularityValidated()
      Indicates whether enforced singularity will be validated by checking that determinant of estimated Dual Absolute Quadric (DAQ) is below a certain threshold.
      Returns:
      true if enforced singularity is validated, false otherwise.
    • setEnforcedSingularityValidated

      public void setEnforcedSingularityValidated(boolean validateEnforcedSingularity) throws com.irurueta.geometry.estimators.LockedException
      Specifies whether enforced singularity will be validated by checking that determinant of estimated Dual Absolute Quadric (DAQ) is below a certain threshold.
      Parameters:
      validateEnforcedSingularity - true if enforced singularity is validated, false otherwise.
      Throws:
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • getDeterminantThreshold

      public double getDeterminantThreshold()
      Returns threshold to determine whether estimated Dual Absolute Quadric (DAQ) has rank 3 or not when validation is enabled.
      Returns:
      threshold to determine whether estimated DAQ has rank 3 or not.
    • setDeterminantThreshold

      public void setDeterminantThreshold(double determinantThreshold) throws com.irurueta.geometry.estimators.LockedException
      Sets threshold to determine whether estimated Dual Absolute Quadric (DAQ) has rank 3 or not when validation is enabled.
      Parameters:
      determinantThreshold - threshold to determine whether estimated DAQ has rank 3 or not.
      Throws:
      IllegalArgumentException - if provided value is zero or negative.
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • isLocked

      public boolean isLocked()
      Indicates whether this instance is locked.
      Returns:
      true if this estimator is busy estimating the Dual Absolute Quadric, false otherwise.
    • getListener

      Obtains listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Returns:
      listener to be notified of events.
    • setListener

      public void setListener(DualAbsoluteQuadricEstimatorListener listener)
      Sets listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Parameters:
      listener - listener to be notified of events.
    • getCameras

      public List<com.irurueta.geometry.PinholeCamera> getCameras()
      Obtains the list of cameras used to estimate the Dual Absolute Quadric (DAQ).
      Returns:
      list of cameras to estimate the DAQ.
    • setCameras

      public final void setCameras(List<com.irurueta.geometry.PinholeCamera> cameras) throws com.irurueta.geometry.estimators.LockedException
      Sets the list of cameras used to estimate the Dual Absolute Quadric (DAQ).
      Parameters:
      cameras - list of cameras used to estimate the DAQ.
      Throws:
      IllegalArgumentException - if list is null.
      com.irurueta.geometry.estimators.LockedException - if estimator is locked.
    • getMinNumberOfRequiredCameras

      public int getMinNumberOfRequiredCameras()
      Returns minimum number of required cameras needed to estimate the Dual Absolute Quadric (DAQ). At least 8 equations are needed to solve the DAQ For each imposed constraint, one less equation is required. Depending on the number of constraints more or less cameras will be required. If zero skewness is enforced, a solution is available with 8 cameras. If zero skewness and focal distance aspect ratio is known, then a solution is available with 4 cameras. If principal point is located at origin, then a solution is available with 4 cameras. If zero skewness and principal point at origin are enforced, then a solution is available with 3 cameras. If zero skewness is enforced, focal distance aspect ratio is known and principal point is at origin, then a solution is available with 2 cameras. NOTE: minimum number of cameras considers only the cameras providing additional information. If a camera is equivalent to another one or does not provide additional information (such as a camera at the origin with no rotation), then more cameras will be needed.
      Returns:
      minimum number of required cameras needed to estimate the Dual Absolute Quadric (DAQ) or -1 if constraints configurations is not valid.
    • 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.
      Returns:
      true if constraints are valid, false otherwise.
    • isReady

      public boolean isReady()
      Indicates if this estimator is ready to start the estimation.
      Returns:
      true if estimator is ready, false otherwise.
    • estimate

      public DualAbsoluteQuadric estimate() throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, DualAbsoluteQuadricEstimatorException
      Estimates the Dual Absolute Quadric using provided cameras.
      Returns:
      estimated Dual Absolute Quadric (DAQ).
      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.
    • estimate

      public abstract void estimate(DualAbsoluteQuadric result) throws com.irurueta.geometry.estimators.LockedException, com.irurueta.geometry.estimators.NotReadyException, DualAbsoluteQuadricEstimatorException
      Estimates the Dual Absolute Quadric using provided cameras.
      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

      public abstract DualAbsoluteQuadricEstimatorType getType()
      Returns type of Dual Absolute Quadric estimator.
      Returns:
      type of DAQ estimator.
    • create

      public static DualAbsoluteQuadricEstimator create()
      Creates an instance of a DAQ estimator using default type.
      Returns:
      an instance of a DAQ estimator.
    • create

      Creates an instance of Dual Absolute Quadric estimator using provided listener and default type.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Returns:
      an instance of a DAQ estimator.
    • create

      public static DualAbsoluteQuadricEstimator create(List<com.irurueta.geometry.PinholeCamera> cameras)
      Creates an instance of Dual Absolute Quadric estimator using provided cameras.
      Parameters:
      cameras - list of cameras used to estimate the Dual Absolute Quadric (DAQ).
      Returns:
      an instance of a DAQ estimator.
      Throws:
      IllegalArgumentException - if list of cameras is null or invalid for default constraints.
    • create

      public static DualAbsoluteQuadricEstimator create(List<com.irurueta.geometry.PinholeCamera> cameras, DualAbsoluteQuadricEstimatorListener listener)
      Creates an instance of Dual Absolute Quadric estimator using provided cameras and listener.
      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.
      Returns:
      an instance of a DAQ estimator.
      Throws:
      IllegalArgumentException - if list of cameras is null or invalid for default constraints.
    • create

      Creates an instance of a DAQ estimator using provided type.
      Parameters:
      type - type of DAQ estimator.
      Returns:
      an instance of a DAQ estimator.
    • create

      Creates an instance of a DAQ estimator using provided listener and type.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      type - type of DAQ estimator.
      Returns:
      an instance of a DAQ estimator.
    • create

      public static DualAbsoluteQuadricEstimator create(List<com.irurueta.geometry.PinholeCamera> cameras, DualAbsoluteQuadricEstimatorType type)
      Creates an instance of a DAQ estimator using provided cameras and type.
      Parameters:
      cameras - list of cameras used to estimate the Dual Absolute Quadric (DAQ).
      type - type of DAQ estimator.
      Returns:
      an instance of a DAQ estimator.
      Throws:
      IllegalArgumentException - if list of cameras is null or invalid for default constraints.
    • create

      public static DualAbsoluteQuadricEstimator create(List<com.irurueta.geometry.PinholeCamera> cameras, DualAbsoluteQuadricEstimatorListener listener, DualAbsoluteQuadricEstimatorType type)
      Creates an instance of a DAQ estimator using provided cameras, listener and type.
      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.
      type - type of DAQ estimator.
      Returns:
      an instance of DAQ estimator.
      Throws:
      IllegalArgumentException - if list of cameras is null or invalid for default constraints.
    • normalizeRow

      protected void normalizeRow(com.irurueta.algebra.Matrix a, int i)
      Normalizes i-th row of provided matrix "a".
      Parameters:
      a - matrix whose row must be normalized.
      i - row to be normalized.
    • fill3rdRowAnd1stRowEquation

      protected void fill3rdRowAnd1stRowEquation(double p11, double p31, double p12, double p32, double p13, double p33, double p14, double p34, com.irurueta.algebra.Matrix a, int row)
      Fills equation p3^t*Q*p1 in provided row of matrix "a".
      Parameters:
      p11 - element (1,1) of camera matrix.
      p31 - element (3,1) of camera matrix.
      p12 - element (1,2) of camera matrix.
      p32 - element (3,2) of camera matrix.
      p13 - element (1,3) of camera matrix.
      p33 - element (3,3) of camera matrix.
      p14 - element (1,4) of camera matrix.
      p34 - element (3,4) of camera matrix.
      a - matrix where data is stored.
      row - row of matrix a where data is stored.
    • fill3rdRowAnd2ndRowEquation

      protected void fill3rdRowAnd2ndRowEquation(double p21, double p31, double p22, double p32, double p23, double p33, double p24, double p34, com.irurueta.algebra.Matrix a, int row)
      Fills equation p3^t*Q*p2 in provided row of matrix "a".
      Parameters:
      p21 - element (2,1) of camera matrix.
      p31 - element (3,1) of camera matrix.
      p22 - element (2,2) of camera matrix.
      p32 - element (3,2) of camera matrix.
      p23 - element (2,3) of camera matrix.
      p33 - element (3,3) of camera matrix.
      p24 - element (2,4) of camera matrix.
      p34 - element (3,4) of camera matrix.
      a - matrix where data is stored.
      row - row of matrix a where data is stored.
    • fill2ndRowAnd1stRowEquation

      protected void fill2ndRowAnd1stRowEquation(double p11, double p21, double p12, double p22, double p13, double p23, double p14, double p24, com.irurueta.algebra.Matrix a, int row)
      Fills equation p2^t*Q*p1 in provided row of matrix "a".
      Parameters:
      p11 - element (1,1) of camera matrix.
      p21 - element (2,1) of camera matrix.
      p12 - element (1,2) of camera matrix.
      p22 - element (2,2) of camera matrix.
      p13 - element (1,3) of camera matrix.
      p23 - element (2,3) of camera matrix.
      p14 - element (1,4) of camera matrix.
      p24 - element (2,4) of camera matrix.
      a - matrix where data is stored.
      row - row of matrix a where data is stored.
    • fill1stRowEqualTo2ndRowEquation

      protected void fill1stRowEqualTo2ndRowEquation(double p11, double p21, double p12, double p22, double p13, double p23, double p14, double p24, com.irurueta.algebra.Matrix a, int row)
      Fills equation p1^t*Q*p1 = r^2*p2^t*Q*p2
      Parameters:
      p11 - element (1,1) of camera matrix.
      p21 - element (2,1) of camera matrix.
      p12 - element (1,2) of camera matrix.
      p22 - element (2,2) of camera matrix.
      p13 - element (1,3) of camera matrix.
      p23 - element (2,3) of camera matrix.
      p14 - element (1,4) of camera matrix.
      p24 - element (2,4) of camera matrix.
      a - matrix where data is stored.
      row - row of matrix a where data is stored.
    • enforceRank3IfNeeded

      protected void enforceRank3IfNeeded(com.irurueta.algebra.SingularValueDecomposer decomposer, DualAbsoluteQuadric result) throws com.irurueta.algebra.AlgebraException, com.irurueta.numerical.NumericalException, DualAbsoluteQuadricEstimatorException
      Enforces (if needed) rank 3 of estimated quadric by building a polynomial out of the last columns of the singular value vector matrix to obtain a linear combination solution.
      Parameters:
      decomposer - decomposer containing possible solutions after decomposition.
      result - instance where estimated Dual Absolute Quadrics (DAQs) with rank 3 enforced will be stored.
      Throws:
      com.irurueta.algebra.AlgebraException - if there are numerical instabilities
      com.irurueta.numerical.NumericalException - if a solution to the polynomial enforcing rank 3 cannot be found.
      DualAbsoluteQuadricEstimatorException - if something else fails.
    • buildPolynomialToEnforceRank3

      private com.irurueta.numerical.polynomials.Polynomial buildPolynomialToEnforceRank3(double a1, double b1, double c1, double d1, double e1, double f1, double g1, double h1, double i1, double j1, double a2, double b2, double c2, double d2, double e2, double f2, double g2, double h2, double i2, double j2)
      Builds polynomial to enforce rank 3 (zero determinant).
      Parameters:
      a1 - a of 1st DAQ.
      b1 - b of 1st DAQ.
      c1 - c of 1st DAQ.
      d1 - d of 1st DAQ.
      e1 - e of 1st DAQ.
      f1 - f of 1st DAQ.
      g1 - g of 1st DAQ.
      h1 - h of 1st DAQ.
      i1 - i of 1st DAQ.
      j1 - j of 1st DAQ.
      a2 - a of 2nd DAQ.
      b2 - b of 2nd DAQ.
      c2 - c of 2nd DAQ.
      d2 - d of 2nd DAQ.
      e2 - e of 2nd DAQ.
      f2 - f of 2nd DAQ.
      g2 - g of 2nd DAQ.
      h2 - h of 2nd DAQ.
      i2 - i of 2nd DAQ.
      j2 - j of 2nd DAQ.
      Returns:
      polynomial.