Package com.irurueta.geometry.estimators
Class LinePlaneCorrespondencePinholeCameraEstimator
java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraEstimator
com.irurueta.geometry.estimators.LinePlaneCorrespondencePinholeCameraEstimator
- Direct Known Subclasses:
DLTLinePlaneCorrespondencePinholeCameraEstimator,WeightedLinePlaneCorrespondencePinholeCameraEstimator
This file contains abstract implementation for pinhole camera estimators
based on line/plane correspondences.
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of corresponding 2D lines.static final intMinimum number of required line/plane correspondences to estimate a camera.List of corresponding 3D planes.Fields 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
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedConstructor.protectedLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D) Constructor.protectedLinePlaneCorrespondencePinholeCameraEstimator(List<Plane> planes, List<Line2D> lines2D, PinholeCameraEstimatorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if lists have already been provided and are available for retrieval.static booleanareValidLists(List<Plane> planes, List<Line2D> lines2D) Indicates if lists of corresponding 2D lines and planes are valid.protected PinholeCameraattemptRefine(PinholeCamera pinholeCamera) Attempts to refine provided camera using requested suggestions.Returns list of corresponding 2D lines.Returns list of corresponding lines/planes.private voidinternalSetLists(List<Plane> planes, List<Line2D> lines2D) Internal method to set list of corresponding lines/planes (it does not check if estimator is locked).voidSet list of corresponding lines/planes.Methods inherited from class com.irurueta.geometry.estimators.PinholeCameraEstimator
create, create, estimate, getListener, getMaxSuggestionWeight, getMinSuggestionWeight, getSuggestedAspectRatioValue, getSuggestedCenterValue, getSuggestedHorizontalFocalLengthValue, getSuggestedPrincipalPointValue, getSuggestedRotationValue, getSuggestedSkewnessValue, getSuggestedVerticalFocalLengthValue, getSuggestionWeightStep, getType, hasSuggestions, isLocked, isReady, 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_LINE_PLANE_CORRESPONDENCES
public static final int MIN_NUMBER_OF_LINE_PLANE_CORRESPONDENCESMinimum number of required line/plane correspondences to estimate a camera.- See Also:
-
planes
List of corresponding 3D planes. -
lines2D
List of corresponding 2D lines.
-
-
Constructor Details
-
LinePlaneCorrespondencePinholeCameraEstimator
protected LinePlaneCorrespondencePinholeCameraEstimator()Constructor. -
LinePlaneCorrespondencePinholeCameraEstimator
Constructor.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or estimation progress changes.
-
LinePlaneCorrespondencePinholeCameraEstimator
protected LinePlaneCorrespondencePinholeCameraEstimator(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 points don't have the same size and enough correspondences.
-
LinePlaneCorrespondencePinholeCameraEstimator
protected LinePlaneCorrespondencePinholeCameraEstimator(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 points don't have the same size and enough correspondences.
-
-
Method Details
-
internalSetLists
private void internalSetLists(List<Plane> planes, List<Line2D> lines2D) throws WrongListSizesException Internal method to set list of corresponding lines/planes (it does not check if estimator is locked).- 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 points don't have the same size and enough correspondences.
-
setLists
public void setLists(List<Plane> planes, List<Line2D> lines2D) throws LockedException, WrongListSizesException Set list of corresponding lines/planes.- Parameters:
planes- list of corresponding 3D planes.lines2D- list of corresponding 2D lines.- Throws:
LockedException- if estimator is locked.IllegalArgumentException- if any of the lists are null.WrongListSizesException- if provided lists of points don't have the same size and enough correspondences.
-
getPlanes
Returns list of corresponding lines/planes. Notice that this method returns an unmodifiable list of planes to avoid undesired modifications.- Returns:
- list of corresponding 3D planes.
- Throws:
NotAvailableException- if list of planes is not yet available.
-
getLines2D
Returns list of corresponding 2D lines. Notice that this method returns an unmodifiable list of 2D lines to avoid undesired modifications.- Returns:
- list of corresponding 2D lines.
- Throws:
NotAvailableException- if list of 2D lines is not yet available.
-
areValidLists
Indicates if lists of corresponding 2D lines and planes are valid. Lists are considered valid if they have the same number of points and both have more than the required minimum of correspondences (which is 4).- Parameters:
planes- list of corresponding 3D planes.lines2D- list of corresponding 2D lines.- Returns:
- true if corresponding 2D lines and planes are valid, false otherwise.
-
areListsAvailable
public boolean areListsAvailable()Indicates if lists have already been provided and are available for retrieval.- Returns:
- true if available, false otherwise.
-
attemptRefine
Attempts to refine provided camera using requested suggestions. If no suggestions are requested or if refinement fails, provided camera is returned instead.- Specified by:
attemptRefinein classPinholeCameraEstimator- Parameters:
pinholeCamera- camera to be refined.- Returns:
- refined camera.
-