Class LMSEDualAbsoluteQuadricEstimator
java.lang.Object
com.irurueta.ar.calibration.estimators.DualAbsoluteQuadricEstimator
com.irurueta.ar.calibration.estimators.LMSEDualAbsoluteQuadricEstimator
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 Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Indicates if by default an LMSE (the Least Mean Square Error) solution is allowed if more pinhole cameras than the minimum are provided.static final boolean
Indicates if by default an LMSE (the Least Mean Square Error) solution is allowed if more pinhole cameras than the minimum are provided.Fields inherited from class com.irurueta.ar.calibration.estimators.DualAbsoluteQuadricEstimator
cameras, DEFAULT_DETERMINANT_THRESHOLD, DEFAULT_ENFORCE_SINGULARITY, DEFAULT_ESTIMATOR_TYPE, DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO, DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO_KNOWN, DEFAULT_PRINCIPAL_POINT_AT_ORIGIN, DEFAULT_VALIDATE_ENFORCED_SINGULARITY, DEFAULT_ZERO_SKEWNESS, determinantThreshold, focalDistanceAspectRatio, focalDistanceAspectRatioKnown, listener, locked, MIN_ABS_FOCAL_DISTANCE_ASPECT_RATIO, MIN_REQUIRED_EQUATIONS, principalPointAtOrigin, singularityEnforced, validateEnforcedSingularity, zeroSkewness
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor with listener.LMSEDualAbsoluteQuadricEstimator
(List<com.irurueta.geometry.PinholeCamera> cameras) Constructor.LMSEDualAbsoluteQuadricEstimator
(List<com.irurueta.geometry.PinholeCamera> cameras, DualAbsoluteQuadricEstimatorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether current constraints are enough to start the estimation.void
estimate
(DualAbsoluteQuadric result) Estimates the Dual Absolute Quadric using provided cameras.private void
Estimates Dual Absolute Quadric (DAQ) assuming that principal point is zero.private void
Estimates Dual Absolute Quadric (DAQ) assuming that skewness is zero, and principal point is located at origin of coordinates.private void
estimateZeroSkewnessPrincipalPointAtOriginAndKnownFocalDistanceAspectRatio
(DualAbsoluteQuadric result) 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.private int
Gets minimum number of equations required to find a solution.getType()
Returns type of Dual Absolute Quadric estimator.boolean
Indicates if an LMSE (the Least Mean Square Error) solution is allowed if more pinhole cameras than the minimum are provided.void
setLMSESolutionAllowed
(boolean allowed) Specifies if an LMSE (the Least Mean Square Error) solution is allowed if more pinhole cameras than the minimum are provided.Methods inherited from class com.irurueta.ar.calibration.estimators.DualAbsoluteQuadricEstimator
create, create, create, create, create, create, create, create, enforceRank3IfNeeded, estimate, fill1stRowEqualTo2ndRowEquation, fill2ndRowAnd1stRowEquation, fill3rdRowAnd1stRowEquation, fill3rdRowAnd2ndRowEquation, getCameras, getDeterminantThreshold, getFocalDistanceAspectRatio, getListener, getMinNumberOfRequiredCameras, isEnforcedSingularityValidated, isFocalDistanceAspectRatioKnown, isLocked, isPrincipalPointAtOrigin, isReady, isSingularityEnforced, isZeroSkewness, normalizeRow, setCameras, setDeterminantThreshold, setEnforcedSingularityValidated, setFocalDistanceAspectRatio, setFocalDistanceAspectRatioKnown, setListener, setPrincipalPointAtOrigin, setSingularityEnforced, setZeroSkewness
-
Field Details
-
DEFAULT_ALLOW_LMSE_SOLUTION
public static final boolean DEFAULT_ALLOW_LMSE_SOLUTIONIndicates 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 allowLMSESolutionIndicates 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
Constructor with listener.- Parameters:
listener
- listener to be notified of events such as when estimation starts, ends or estimation progress changes.
-
LMSEDualAbsoluteQuadricEstimator
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 classDualAbsoluteQuadricEstimator
- 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 classDualAbsoluteQuadricEstimator
- 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 classDualAbsoluteQuadricEstimator
- 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.
-