Class LMSEImageOfAbsoluteConicEstimator
java.lang.Object
com.irurueta.ar.calibration.estimators.ImageOfAbsoluteConicEstimator
com.irurueta.ar.calibration.estimators.LMSEImageOfAbsoluteConicEstimator
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 Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIndicates if an LMSE (the Least Mean Square Error) solution is allowed if more homographies than the minimum are provided.static final booleanIndicates if by default an LMSE (the Least Mean Square Error) solution is allowed if more homographies than the minimum are provided.Fields inherited from class com.irurueta.ar.calibration.estimators.ImageOfAbsoluteConicEstimator
DEFAULT_ESTIMATOR_TYPE, DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO, DEFAULT_FOCAL_DISTANCE_ASPECT_RATIO_KNOWN, DEFAULT_PRINCIPAL_POINT_AT_ORIGIN, DEFAULT_ZERO_SKEWNESS, focalDistanceAspectRatio, focalDistanceAspectRatioKnown, homographies, listener, locked, MIN_ABS_FOCAL_DISTANCE_ASPECT_RATIO, MIN_REQUIRED_EQUATIONS, principalPointAtOrigin, zeroSkewness -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor with listener.LMSEImageOfAbsoluteConicEstimator(List<com.irurueta.geometry.Transformation2D> homographies) ConstructorLMSEImageOfAbsoluteConicEstimator(List<com.irurueta.geometry.Transformation2D> homographies, ImageOfAbsoluteConicEstimatorListener listener) Constructor -
Method Summary
Modifier and TypeMethodDescriptionestimate()Estimates Image of Absolute Conic (IAC).private ImageOfAbsoluteConicEstimates Image of Absolute Conic (IAC) without constraints.private ImageOfAbsoluteConicEstimates Image of Absolute Conic (IAC) assuming that principal point is located at origin of coordinates.private ImageOfAbsoluteConicEstimates Image of Absolute Conic (IAC) assuming that skewness is zero.private ImageOfAbsoluteConicEstimates Image of Absolute Conic (IAC) assuming that skewness is zero and that aspect ratio of focal distances is known.private ImageOfAbsoluteConicEstimates Image of Absolute Conic (IAC) assuming that skewness is zero and that principal point is located at origin of coordinates.private ImageOfAbsoluteConicEstimates 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.getType()Returns type of IAC estimator.booleanIndicates if an LMSE (the Least Mean Square Error) solution is allowed if more homographies than the minimum are provided.voidsetLMSESolutionAllowed(boolean allowed) Specifies if an LMSE (the Least Mean Square Error) solution is allowed if more homographies than the minimum are provided.Methods inherited from class com.irurueta.ar.calibration.estimators.ImageOfAbsoluteConicEstimator
create, create, create, create, create, create, create, create, getFocalDistanceAspectRatio, getHomographies, getListener, getMinNumberOfRequiredHomographies, internalSetHomographies, isFocalDistanceAspectRatioKnown, isLocked, isPrincipalPointAtOrigin, isReady, isZeroSkewness, setFocalDistanceAspectRatio, setFocalDistanceAspectRatioKnown, setHomographies, setListener, setPrincipalPointAtOrigin, 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 homographies than the minimum are provided.- See Also:
-
allowLMSESolution
private boolean allowLMSESolutionIndicates 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
Constructor with listener.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or estimation progress changes.
-
LMSEImageOfAbsoluteConicEstimator
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, ImageOfAbsoluteConicEstimatorExceptionEstimates Image of Absolute Conic (IAC).- Specified by:
estimatein classImageOfAbsoluteConicEstimator- 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:
getTypein classImageOfAbsoluteConicEstimator- Returns:
- type of IAC estimator.
-
estimateNoConstraints
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
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 ImageOfAbsoluteConicEstimatorExceptionEstimates 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 ImageOfAbsoluteConicEstimatorExceptionEstimates 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 ImageOfAbsoluteConicEstimatorExceptionEstimates 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 ImageOfAbsoluteConicEstimatorExceptionEstimates 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
-