Package com.irurueta.geometry.estimators
Class DLTLinePlaneCorrespondencePinholeCameraEstimator
java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraEstimator
com.irurueta.geometry.estimators.LinePlaneCorrespondencePinholeCameraEstimator
com.irurueta.geometry.estimators.DLTLinePlaneCorrespondencePinholeCameraEstimator
public class DLTLinePlaneCorrespondencePinholeCameraEstimator
extends LinePlaneCorrespondencePinholeCameraEstimator
This class implements an algorithm to estimate pinhole camera 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 doubleDefines tiny value considered as machine precision.static final intMinimum number of required equations to estimate a pinhole camera.Fields inherited from class com.irurueta.geometry.estimators.LinePlaneCorrespondencePinholeCameraEstimator
lines2D, MIN_NUMBER_OF_LINE_PLANE_CORRESPONDENCES, planesFields 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.DLTLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D) Constructor.DLTLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D, PinholeCameraEstimatorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionestimate()Estimates a pinhole camera.getType()Returns type of pinhole camera estimator.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.LinePlaneCorrespondencePinholeCameraEstimator
areListsAvailable, areValidLists, attemptRefine, getLines2D, getPlanes, setListsMethods 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:
-
EPS
public static final double EPSDefines tiny value considered as machine precision.- 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
-
DLTLinePlaneCorrespondencePinholeCameraEstimator
public DLTLinePlaneCorrespondencePinholeCameraEstimator()Constructor. -
DLTLinePlaneCorrespondencePinholeCameraEstimator
Constructor with listener.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or estimation progress changes.
-
DLTLinePlaneCorrespondencePinholeCameraEstimator
public DLTLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D) throws WrongListSizesException Constructor.- Parameters:
planes- list of corresponding 3D planes.lines2D- list of corresponding 2D lines.- Throws:
IllegalArgumentException- if any of the lists are null.WrongListSizesException- if provided lists of correspondences don't have the same size and enough correspondences.
-
DLTLinePlaneCorrespondencePinholeCameraEstimator
public DLTLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D, PinholeCameraEstimatorListener listener) throws WrongListSizesException Constructor.- Parameters:
planes- list of corresponding 3D planes.lines2D- list of corresponding 2D lines.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 correspondences don't have the same size and enough correspondences.
-
-
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.
-
estimate
public PinholeCamera estimate() throws LockedException, NotReadyException, PinholeCameraEstimatorExceptionEstimates a pinhole camera.- Specified by:
estimatein classPinholeCameraEstimator- Returns:
- estimated pinhole camera.
- Throws:
LockedException- if estimator is locked.NotReadyException- if input has not yet been provided.PinholeCameraEstimatorException- if an error occurs during estimation, usually because input data is not valid.
-
getType
Returns type of pinhole camera estimator.- Specified by:
getTypein classPinholeCameraEstimator- Returns:
- type of pinhole camera estimator.
-