Package com.irurueta.geometry.estimators
Class DLTPointCorrespondencePinholeCameraEstimator
java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraEstimator
com.irurueta.geometry.estimators.PointCorrespondencePinholeCameraEstimator
com.irurueta.geometry.estimators.DLTPointCorrespondencePinholeCameraEstimator
public class DLTPointCorrespondencePinholeCameraEstimator
extends PointCorrespondencePinholeCameraEstimator
This class implements an algorithm to estimate pinhole cameras using the DLT
algorithm and point correspondences.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIndicates if an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided.static final booleanIndicates if by default an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided.static final intMinimum number of required equations to estimate a pinhole camera.Fields inherited from class com.irurueta.geometry.estimators.PointCorrespondencePinholeCameraEstimator
DEFAULT_NORMALIZE_POINT_CORRESPONDENCES, EPS, MIN_NUMBER_OF_POINT_CORRESPONDENCES, points2D, points3DFields inherited from class com.irurueta.geometry.estimators.PinholeCameraEstimator
DEFAULT_ESTIMATOR_TYPE, DEFAULT_MAX_SUGGESTION_WEIGHT, DEFAULT_MIN_SUGGESTION_WEIGHT, DEFAULT_SUGGEST_ASPECT_RATIO_ENABLED, DEFAULT_SUGGEST_CENTER_ENABLED, DEFAULT_SUGGEST_HORIZONTAL_FOCAL_LENGTH_ENABLED, DEFAULT_SUGGEST_PRINCIPAL_POINT_ENABLED, DEFAULT_SUGGEST_ROTATION_ENABLED, DEFAULT_SUGGEST_SKEWNESS_VALUE_ENABLED, DEFAULT_SUGGEST_VERTICAL_FOCAL_LENGTH_ENABLED, DEFAULT_SUGGESTED_ASPECT_RATIO_VALUE, DEFAULT_SUGGESTED_SKEWNESS_VALUE, DEFAULT_SUGGESTION_WEIGHT_STEP, listener, locked, maxSuggestionWeight, minSuggestionWeight, suggestAspectRatioEnabled, suggestCenterEnabled, suggestedAspectRatioValue, suggestedCenterValue, suggestedHorizontalFocalLengthValue, suggestedPrincipalPointValue, suggestedRotationValue, suggestedSkewnessValue, suggestedVerticalFocalLengthValue, suggestHorizontalFocalLengthEnabled, suggestionWeightStep, suggestPrincipalPointEnabled, suggestRotationEnabled, suggestSkewnessValueEnabled, suggestVerticalFocalLengthEnabled -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor with listener.DLTPointCorrespondencePinholeCameraEstimator(List<Point3D> points3D, List<Point2D> points2D) Constructor.DLTPointCorrespondencePinholeCameraEstimator(List<Point3D> points3D, List<Point2D> points2D, PinholeCameraEstimatorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns type of pinhole camera estimator.protected com.irurueta.algebra.MatrixinternalEstimate(List<Point3D> points3D, List<Point2D> points2D) Internal method that actually computes the normalized pinhole camera internal matrix.booleanIndicates if an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided.booleanisReady()Indicates if this estimator is ready to start the estimation.voidsetLMSESolutionAllowed(boolean allowed) Specifies if an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided.Methods inherited from class com.irurueta.geometry.estimators.PointCorrespondencePinholeCameraEstimator
areListsAvailable, arePointCorrespondencesNormalized, areValidLists, attemptRefine, estimate, getPoints2D, getPoints3D, setLists, setPointCorrespondencesNormalizedMethods inherited from class com.irurueta.geometry.estimators.PinholeCameraEstimator
create, create, getListener, getMaxSuggestionWeight, getMinSuggestionWeight, getSuggestedAspectRatioValue, getSuggestedCenterValue, getSuggestedHorizontalFocalLengthValue, getSuggestedPrincipalPointValue, getSuggestedRotationValue, getSuggestedSkewnessValue, getSuggestedVerticalFocalLengthValue, getSuggestionWeightStep, hasSuggestions, isLocked, isSuggestAspectRatioEnabled, isSuggestCenterEnabled, isSuggestHorizontalFocalLengthEnabled, isSuggestPrincipalPointEnabled, isSuggestRotationEnabled, isSuggestSkewnessValueEnabled, isSuggestVerticalFocalLengthEnabled, setListener, setMaxSuggestionWeight, setMinMaxSuggestionWeight, setMinSuggestionWeight, setSuggestAspectRatioEnabled, setSuggestCenterEnabled, setSuggestedAspectRatioValue, setSuggestedCenterValue, setSuggestedHorizontalFocalLengthValue, setSuggestedPrincipalPointValue, setSuggestedRotationValue, setSuggestedSkewnessValue, setSuggestedVerticalFocalLengthValue, setSuggestHorizontalFocalLengthEnabled, setSuggestionWeightStep, setSuggestPrincipalPointEnabled, setSuggestRotationEnabled, setSuggestSkewnessValueEnabled, setSuggestVerticalFocalLengthEnabled
-
Field Details
-
MIN_NUMBER_OF_EQUATIONS
public static final int MIN_NUMBER_OF_EQUATIONSMinimum number of required equations to estimate a pinhole camera.- See Also:
-
DEFAULT_ALLOW_LMSE_SOLUTION
public static final boolean DEFAULT_ALLOW_LMSE_SOLUTIONIndicates if by default an LMSE (Least Mean Square Error) solution is allowed if more correspondences than the minimum are provided.- See Also:
-
allowLMSESolution
private boolean allowLMSESolutionIndicates if an LMSE (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
-
DLTPointCorrespondencePinholeCameraEstimator
public DLTPointCorrespondencePinholeCameraEstimator()Constructor. -
DLTPointCorrespondencePinholeCameraEstimator
Constructor with listener.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or estimation progress changes.
-
DLTPointCorrespondencePinholeCameraEstimator
public DLTPointCorrespondencePinholeCameraEstimator(List<Point3D> points3D, List<Point2D> points2D) throws WrongListSizesException Constructor.- Parameters:
points3D- list of corresponding 3D points.points2D- list of corresponding 2D points.- Throws:
IllegalArgumentException- if any of the lists are null.WrongListSizesException- if provided lists of points don't have the same size and enough points.
-
DLTPointCorrespondencePinholeCameraEstimator
public DLTPointCorrespondencePinholeCameraEstimator(List<Point3D> points3D, List<Point2D> points2D, PinholeCameraEstimatorListener listener) throws WrongListSizesException Constructor.- Parameters:
points3D- list of corresponding 3D points.points2D- list of corresponding 2D points.listener- listener to be notified of events such as when estimation starts, ends or estimation progress changes.- Throws:
IllegalArgumentException- if any of the lists are null.WrongListSizesException- if provided lists of points don't have the same size and enough points.
-
-
Method Details
-
isLMSESolutionAllowed
public boolean isLMSESolutionAllowed()Indicates if an LMSE (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
Specifies if an LMSE (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:
LockedException- if estimator is locked.
-
isReady
public boolean isReady()Indicates if this estimator is ready to start the estimation.- Specified by:
isReadyin classPinholeCameraEstimator- Returns:
- true if estimator is ready, false otherwise.
-
internalEstimate
protected com.irurueta.algebra.Matrix internalEstimate(List<Point3D> points3D, List<Point2D> points2D) throws PinholeCameraEstimatorException Internal method that actually computes the normalized pinhole camera internal matrix. Returned matrix must have norm equal to one and might be estimated using any convenient algorithm (i.e. DLT or weighted DLT).- Specified by:
internalEstimatein classPointCorrespondencePinholeCameraEstimator- Parameters:
points3D- list of 3D points. Points might or might not be normalized.points2D- list of 2D points. Points might or might not be normalized.- Returns:
- matrix of estimated pinhole camera.
- Throws:
PinholeCameraEstimatorException- if estimation fails for some reason (i.e. numerical instability or geometric degeneracy).
-
getType
Returns type of pinhole camera estimator.- Specified by:
getTypein classPinholeCameraEstimator- Returns:
- type of pinhole camera estimator.
-