Package com.irurueta.geometry.estimators
Class PinholeCameraRobustEstimator
java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraRobustEstimator
- Direct Known Subclasses:
LinePlaneCorrespondencePinholeCameraRobustEstimator,PointCorrespondencePinholeCameraRobustEstimator
This is an abstract class for algorithms to robustly find the best
PinholeCamera for provided collections of matched 3D points and their
corresponding projected 2D points, or collections of matched 3D planes and
their corresponding projected 2D lines (depending on point
correspondence or plane/line correspondence is being used).
Implementations of this class should be able to detect and discard outliers
in order to find the best solution.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleAmount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%).protected com.irurueta.algebra.MatrixEstimated covariance of estimated fundamental matrix.static final doubleConstant defining default confidence of the estimated result, which is 99%.static final booleanIndicates that covariance is not kept by default after refining result.static final intDefault maximum allowed number of iterations.static final floatDefault amount of progress variation before notifying a change in estimation progress.static final booleanIndicates that result is refined by default using Levenberg-Marquardt fitting algorithm over found inliers.static final booleanDefault value indicating whether aspect ratio is suggested or not.static final booleanDefault value indicating whether center is suggested or not.static final booleanDefault value indicating whether horizontal focal length value is suggested or not.static final booleanDefault value indicating whether principal point is suggested or not.static final booleanDefault value indicating whether rotation is suggested or not.static final booleanDefault value indicating whether skewness value is suggested or not.static final booleanDefault value indicating whether vertical focal length value is suggested or not.static final doubleDefault value of aspect ratio to be suggested when suggestion is enabled.static final doubleDefault value of skewness to be suggested when suggestion is enabled.static final booleanIndicates whether fast refinement is used by default.protected com.irurueta.numerical.robust.InliersDataData related to inliers found after estimation.protected booleanIndicates whether covariance must be kept after refining result.protected PinholeCameraRobustEstimatorListenerListener to be notified of events such as when estimation starts, ends or its progress significantly changes.protected booleanIndicates if this estimator is locked because an estimation is being computed.static final doubleMaximum allowed confidence value.static final floatMaximum allowed value for progress delta.protected intMaximum allowed number of iterations.static final doubleMinimum allowed confidence value.static final intMinimum allowed number of iterations.static final floatMinimum allowed value for progress delta.protected floatAmount of progress variation before notifying a progress change during estimation.protected booleanIndicates whether result must be refined using Levenberg-Marquardt fitting algorithm over found inliers.protected booleanIndicates whether aspect ratio is suggested or not.protected booleanIndicates whether camera center is suggested or not.protected doubleSuggested aspect ratio value to be reached when suggestion is enabled.protected InhomogeneousPoint3DSuggested center to be reached when suggestion is enabled.protected doubleSuggested horizontal focal length value to be reached when suggestion is enabled.protected InhomogeneousPoint2DSuggested principal point value to be reached when suggestion is enabled.protected QuaternionSuggested rotation to be reached when suggestion is enabled.protected doubleSuggested skewness value to be reached when suggestion is enabled.protected doubleSuggested vertical focal length value to be reached when suggestion is enabled.protected booleanIndicates whether horizontal focal length is suggested or not.protected booleanIndicates whether principal point is suggested or not.protected booleanIndicates whether camera rotation is suggested or not.protected booleanIndicates whether skewness value is suggested or not.protected booleanIndicates whether vertical focal length is suggested or not.protected booleanIndicates whether fast refinement must be used or not. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic PinholeCameraRobustEstimatorcreateFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines, double[] qualityScores) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener, quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener, quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(List<Plane> planes, List<Line2D> lines) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(List<Plane> planes, List<Line2D> lines, double[] qualityScores) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(List<Plane> planes, List<Line2D> lines, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPlanesAndLines(List<Plane> planes, List<Line2D> lines, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and default robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and robust estimator method.static PinholeCameraRobustEstimatorcreateFromPoints(List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided robust estimator method.abstract PinholeCameraestimate()Estimates a pinhole camera using a robust estimator and the best set of matched 2D/3D point correspondences or 2D line/3D plane correspondences found using the robust estimator.doubleReturns amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%).com.irurueta.algebra.MatrixGets estimated covariance of estimated pinhole camera if available.com.irurueta.numerical.robust.InliersDataGets data related to inliers found after estimation.Returns reference to listener to be notified of events such as when estimation starts, ends or its progress significantly changes.intReturns maximum allowed number of iterations.abstract com.irurueta.numerical.robust.RobustEstimatorMethodReturns method being used for robust estimation.floatReturns amount of progress variation before notifying a progress change during estimation.protected abstract doubleGets standard deviation used for Levenberg-Marquardt fitting during refinement.doubleGets suggested aspect ratio value to be reached when suggestion is enabled.Gets suggested center to be reached when suggestion is enabled.doubleGets suggested horizontal focal length value to be reached when suggestion is enabled.Gets suggested principal point value to be reached when suggestion is enabled.Gets suggested rotation to be reached when suggestion is enabled.doubleGets suggested skewness value to be reached when suggestion is enabled.doubleGets suggested vertical focal length value to be reached when suggestion is enabled.private booleanIndicates whether suggestions for any extrinsic parameter are required or not.private booleanIndicates whether suggestions for any intrinsic parameter are required or not.protected booleanIndicates whether obtained solution requires refinement to apply provided suggestions.booleanIndicates whether covariance must be kept after refining result.booleanIndicates whether fast refinement must be used or not.booleanIndicates whether listener has been provided and is available for retrieval.booleanisLocked()Indicates if this instance is locked because estimation is being computed.booleanIndicates whether result must be refined using Levenberg-Marquardt fitting algorithm over found inliers.booleanIndicates whether aspect ratio is suggested or not.booleanIndicates whether camera center is suggested or not.booleanIndicates whether horizontal focal length is suggested or not.booleanIndicates whether principal point is suggested or not.booleanIndicates whether camera rotation is suggested or not.booleanIndicates whether skewness value is suggested or not.booleanIndicates whether vertical focal length is suggested or not.voidsetConfidence(double confidence) Sets amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%).voidsetCovarianceKept(boolean keepCovariance) Specifies whether covariance must be kept after refining result.voidsetFastRefinementUsed(boolean useFastRefinement) Specifies whether fast refinement must be used or not.voidSets listener to be notified of events such as when estimation starts, ends or its progress significantly changes.voidsetMaxIterations(int maxIterations) Sets maximum allowed number of iterations.voidsetProgressDelta(float progressDelta) Sets amount of progress variation before notifying a progress change during estimation.voidsetResultRefined(boolean refineResult) Specifies whether result must be refined using Levenberg-Marquardt fitting algorithm over found inliers.voidsetSuggestAspectRatioEnabled(boolean suggestAspectRatioEnabled) Specifies whether aspect ratio is suggested or not.voidsetSuggestCenterEnabled(boolean suggestCenterEnabled) Specifies whether camera center is suggested or not.voidsetSuggestedAspectRatioValue(double suggestedAspectRatioValue) Sets suggested aspect ratio value to be reached when suggestion is enabled.voidsetSuggestedCenterValue(InhomogeneousPoint3D suggestedCenterValue) Sets suggested center to be reached when suggestion is enabled.voidsetSuggestedHorizontalFocalLengthValue(double suggestedHorizontalFocalLengthValue) Sets suggested horizontal focal length value to be reached when suggestion is enabled.voidsetSuggestedPrincipalPointValue(InhomogeneousPoint2D suggestedPrincipalPointValue) Sets suggested principal point value to be reached when suggestion is enabled.voidsetSuggestedRotationValue(Quaternion suggestedRotationValue) Sets suggested rotation to be reached when suggestion is enabled.voidsetSuggestedSkewnessValue(double suggestedSkewnessValue) Sets suggested skewness value to be reached when suggestion is enabled.voidsetSuggestedVerticalFocalLengthValue(double suggestedVerticalFocalLengthValue) Sets suggested vertical focal length value to be reached when suggestion is enabled.voidsetSuggestHorizontalFocalLengthEnabled(boolean suggestHorizontalFocalLengthEnabled) Specifies whether horizontal focal length is suggested or not.voidsetSuggestPrincipalPointEnabled(boolean suggestPrincipalPointEnabled) Specifies whether principal point is suggested or not.voidsetSuggestRotationEnabled(boolean suggestRotationEnabled) Specifies whether camera rotation is suggested or not.voidsetSuggestSkewnessValueEnabled(boolean suggestSkewnessValueEnabled) Specifies whether skewness value is suggested or not.voidsetSuggestVerticalFocalLengthEnabled(boolean suggestVerticalFocalLengthEnabled) Specifies whether vertical focal length is suggested or not.
-
Field Details
-
DEFAULT_REFINE_RESULT
public static final boolean DEFAULT_REFINE_RESULTIndicates that result is refined by default using Levenberg-Marquardt fitting algorithm over found inliers.- See Also:
-
DEFAULT_KEEP_COVARIANCE
public static final boolean DEFAULT_KEEP_COVARIANCEIndicates that covariance is not kept by default after refining result.- See Also:
-
DEFAULT_USE_FAST_REFINEMENT
public static final boolean DEFAULT_USE_FAST_REFINEMENTIndicates whether fast refinement is used by default.- See Also:
-
DEFAULT_PROGRESS_DELTA
public static final float DEFAULT_PROGRESS_DELTADefault amount of progress variation before notifying a change in estimation progress. By default, this is set to 5%.- See Also:
-
MIN_PROGRESS_DELTA
public static final float MIN_PROGRESS_DELTAMinimum allowed value for progress delta.- See Also:
-
MAX_PROGRESS_DELTA
public static final float MAX_PROGRESS_DELTAMaximum allowed value for progress delta.- See Also:
-
DEFAULT_CONFIDENCE
public static final double DEFAULT_CONFIDENCEConstant defining default confidence of the estimated result, which is 99%. This means that with a probability of 99% estimation will be accurate because chosen sub-samples will be inliers.- See Also:
-
DEFAULT_MAX_ITERATIONS
public static final int DEFAULT_MAX_ITERATIONSDefault maximum allowed number of iterations.- See Also:
-
MIN_CONFIDENCE
public static final double MIN_CONFIDENCEMinimum allowed confidence value.- See Also:
-
MAX_CONFIDENCE
public static final double MAX_CONFIDENCEMaximum allowed confidence value.- See Also:
-
MIN_ITERATIONS
public static final int MIN_ITERATIONSMinimum allowed number of iterations.- See Also:
-
DEFAULT_SUGGEST_SKEWNESS_VALUE_ENABLED
public static final boolean DEFAULT_SUGGEST_SKEWNESS_VALUE_ENABLEDDefault value indicating whether skewness value is suggested or not. By default, this is disabled.- See Also:
-
DEFAULT_SUGGESTED_SKEWNESS_VALUE
public static final double DEFAULT_SUGGESTED_SKEWNESS_VALUEDefault value of skewness to be suggested when suggestion is enabled. By default suggested skewness is zero.- See Also:
-
DEFAULT_SUGGEST_HORIZONTAL_FOCAL_LENGTH_ENABLED
public static final boolean DEFAULT_SUGGEST_HORIZONTAL_FOCAL_LENGTH_ENABLEDDefault value indicating whether horizontal focal length value is suggested or not. By default, this is disabled.- See Also:
-
DEFAULT_SUGGEST_VERTICAL_FOCAL_LENGTH_ENABLED
public static final boolean DEFAULT_SUGGEST_VERTICAL_FOCAL_LENGTH_ENABLEDDefault value indicating whether vertical focal length value is suggested or not. By default, this is disabled.- See Also:
-
DEFAULT_SUGGEST_ASPECT_RATIO_ENABLED
public static final boolean DEFAULT_SUGGEST_ASPECT_RATIO_ENABLEDDefault value indicating whether aspect ratio is suggested or not. By default, this is disabled.- See Also:
-
DEFAULT_SUGGESTED_ASPECT_RATIO_VALUE
public static final double DEFAULT_SUGGESTED_ASPECT_RATIO_VALUEDefault value of aspect ratio to be suggested when suggestion is enabled. By default, suggested aspect ratio is 1.0, although also -1.0 is a typical value when vertical coordinates increase downwards.- See Also:
-
DEFAULT_SUGGEST_PRINCIPAL_POINT_ENABLED
public static final boolean DEFAULT_SUGGEST_PRINCIPAL_POINT_ENABLEDDefault value indicating whether principal point is suggested or not. By default, this is disabled.- See Also:
-
DEFAULT_SUGGEST_ROTATION_ENABLED
public static final boolean DEFAULT_SUGGEST_ROTATION_ENABLEDDefault value indicating whether rotation is suggested or not. By default, this is disabled.- See Also:
-
DEFAULT_SUGGEST_CENTER_ENABLED
public static final boolean DEFAULT_SUGGEST_CENTER_ENABLEDDefault value indicating whether center is suggested or not. By default this is disabled.- See Also:
-
listener
Listener to be notified of events such as when estimation starts, ends or its progress significantly changes. -
locked
protected volatile boolean lockedIndicates if this estimator is locked because an estimation is being computed. -
progressDelta
protected float progressDeltaAmount of progress variation before notifying a progress change during estimation. -
confidence
protected double confidenceAmount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%). The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0. -
maxIterations
protected int maxIterationsMaximum allowed number of iterations. When the maximum number of iterations is exceeded, result will not be available, however an approximate result will be available for retrieval. -
inliersData
protected com.irurueta.numerical.robust.InliersData inliersDataData related to inliers found after estimation. -
refineResult
protected boolean refineResultIndicates whether result must be refined using Levenberg-Marquardt fitting algorithm over found inliers. If true, inliers will be computed and kept in any implementation regardless of the settings. -
keepCovariance
protected boolean keepCovarianceIndicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined. -
useFastRefinement
protected boolean useFastRefinementIndicates whether fast refinement must be used or not. When true Levenberg/Marquardt refinement will be used, when false an initial Powell optimization is done and then Levenberg/Marquard is used for covariance estimation if needed. -
covariance
protected com.irurueta.algebra.Matrix covarianceEstimated covariance of estimated fundamental matrix. This is only available when result has been refined and covariance is kept. -
suggestSkewnessValueEnabled
protected boolean suggestSkewnessValueEnabledIndicates whether skewness value is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedSkewnessValue
protected double suggestedSkewnessValueSuggested skewness value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value. -
suggestHorizontalFocalLengthEnabled
protected boolean suggestHorizontalFocalLengthEnabledIndicates whether horizontal focal length is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedHorizontalFocalLengthValue
protected double suggestedHorizontalFocalLengthValueSuggested horizontal focal length value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value. -
suggestVerticalFocalLengthEnabled
protected boolean suggestVerticalFocalLengthEnabledIndicates whether vertical focal length is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedVerticalFocalLengthValue
protected double suggestedVerticalFocalLengthValueSuggested vertical focal length value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value. -
suggestAspectRatioEnabled
protected boolean suggestAspectRatioEnabledIndicates whether aspect ratio is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedAspectRatioValue
protected double suggestedAspectRatioValueSuggested aspect ratio value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value. -
suggestPrincipalPointEnabled
protected boolean suggestPrincipalPointEnabledIndicates whether principal point is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedPrincipalPointValue
Suggested principal point value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value. -
suggestRotationEnabled
protected boolean suggestRotationEnabledIndicates whether camera rotation is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedRotationValue
Suggested rotation to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value. -
suggestCenterEnabled
protected boolean suggestCenterEnabledIndicates whether camera center is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value. -
suggestedCenterValue
Suggested center to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.
-
-
Constructor Details
-
PinholeCameraRobustEstimator
protected PinholeCameraRobustEstimator()Constructor. -
PinholeCameraRobustEstimator
Constructor.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
-
-
Method Details
-
getListener
Returns reference to listener to be notified of events such as when estimation starts, ends or its progress significantly changes.- Returns:
- listener to be notified of events.
-
setListener
Sets listener to be notified of events such as when estimation starts, ends or its progress significantly changes.- Parameters:
listener- listener to be notified of events.- Throws:
LockedException- if robust estimator is locked.
-
isListenerAvailable
public boolean isListenerAvailable()Indicates whether listener has been provided and is available for retrieval.- Returns:
- true if available, false otherwise.
-
isSuggestSkewnessValueEnabled
public boolean isSuggestSkewnessValueEnabled()Indicates whether skewness value is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if skewness value is suggested, false otherwise.
-
setSuggestSkewnessValueEnabled
public void setSuggestSkewnessValueEnabled(boolean suggestSkewnessValueEnabled) throws LockedException Specifies whether skewness value is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestSkewnessValueEnabled- true if skewness value is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedSkewnessValue
public double getSuggestedSkewnessValue()Gets suggested skewness value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested skewness value.
-
setSuggestedSkewnessValue
Sets suggested skewness value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedSkewnessValue- suggested skewness value.- Throws:
LockedException- if estimator is locked.
-
isSuggestHorizontalFocalLengthEnabled
public boolean isSuggestHorizontalFocalLengthEnabled()Indicates whether horizontal focal length is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if horizontal focal length is suggested, false otherwise.
-
setSuggestHorizontalFocalLengthEnabled
public void setSuggestHorizontalFocalLengthEnabled(boolean suggestHorizontalFocalLengthEnabled) throws LockedException Specifies whether horizontal focal length is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestHorizontalFocalLengthEnabled- true if horizontal focal length is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedHorizontalFocalLengthValue
public double getSuggestedHorizontalFocalLengthValue()Gets suggested horizontal focal length value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested horizontal focal length value.
-
setSuggestedHorizontalFocalLengthValue
public void setSuggestedHorizontalFocalLengthValue(double suggestedHorizontalFocalLengthValue) throws LockedException Sets suggested horizontal focal length value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedHorizontalFocalLengthValue- suggested horizontal focal length value.- Throws:
LockedException- if estimator is locked.
-
isSuggestVerticalFocalLengthEnabled
public boolean isSuggestVerticalFocalLengthEnabled()Indicates whether vertical focal length is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if vertical focal length is suggested, false otherwise.
-
setSuggestVerticalFocalLengthEnabled
public void setSuggestVerticalFocalLengthEnabled(boolean suggestVerticalFocalLengthEnabled) throws LockedException Specifies whether vertical focal length is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestVerticalFocalLengthEnabled- true if vertical focal length is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedVerticalFocalLengthValue
public double getSuggestedVerticalFocalLengthValue()Gets suggested vertical focal length value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested vertical focal length.
-
setSuggestedVerticalFocalLengthValue
public void setSuggestedVerticalFocalLengthValue(double suggestedVerticalFocalLengthValue) throws LockedException Sets suggested vertical focal length value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedVerticalFocalLengthValue- suggested vertical focal length.- Throws:
LockedException- if estimator is locked.
-
isSuggestAspectRatioEnabled
public boolean isSuggestAspectRatioEnabled()Indicates whether aspect ratio is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if aspect ratio is suggested, false otherwise.
-
setSuggestAspectRatioEnabled
Specifies whether aspect ratio is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestAspectRatioEnabled- true if aspect ratio is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedAspectRatioValue
public double getSuggestedAspectRatioValue()Gets suggested aspect ratio value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested aspect ratio value.
-
setSuggestedAspectRatioValue
Sets suggested aspect ratio value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedAspectRatioValue- suggested aspect ratio value.- Throws:
LockedException- if estimator is locked.
-
isSuggestPrincipalPointEnabled
public boolean isSuggestPrincipalPointEnabled()Indicates whether principal point is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if principal point is suggested, false otherwise.
-
setSuggestPrincipalPointEnabled
public void setSuggestPrincipalPointEnabled(boolean suggestPrincipalPointEnabled) throws LockedException Specifies whether principal point is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestPrincipalPointEnabled- true if principal point is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedPrincipalPointValue
Gets suggested principal point value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested principal point value to be reached when suggestion is enabled.
-
setSuggestedPrincipalPointValue
public void setSuggestedPrincipalPointValue(InhomogeneousPoint2D suggestedPrincipalPointValue) throws LockedException Sets suggested principal point value to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedPrincipalPointValue- suggested principal point value to be reached when suggestion is enabled.- Throws:
LockedException- if estimator is locked.
-
isSuggestRotationEnabled
public boolean isSuggestRotationEnabled()Indicates whether camera rotation is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if camera rotation is suggested, false otherwise.
-
setSuggestRotationEnabled
Specifies whether camera rotation is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestRotationEnabled- true if camera rotation is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedRotationValue
Gets suggested rotation to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested rotation to be reached when suggestion is enabled.
-
setSuggestedRotationValue
Sets suggested rotation to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedRotationValue- suggested rotation to be reached when suggestion is enabled.- Throws:
LockedException- if estimator is locked.
-
isSuggestCenterEnabled
public boolean isSuggestCenterEnabled()Indicates whether camera center is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Returns:
- true if camera center is suggested, false otherwise.
-
setSuggestCenterEnabled
Specifies whether camera center is suggested or not. When enabled, the estimator will attempt to enforce suggested value in an iterative manner starting from an initially estimated camera. Even when suggestion is enabled, the iterative algorithm might not reach suggested value if the initial value largely differs from the suggested value.- Parameters:
suggestCenterEnabled- true if camera is suggested, false otherwise.- Throws:
LockedException- if estimator is locked.
-
getSuggestedCenterValue
Gets suggested center to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Returns:
- suggested center to be reached when suggestion is enabled.
-
setSuggestedCenterValue
public void setSuggestedCenterValue(InhomogeneousPoint3D suggestedCenterValue) throws LockedException Sets suggested center to be reached when suggestion is enabled. Suggested value should be close to the initially estimated value otherwise the iterative refinement might not converge to provided value.- Parameters:
suggestedCenterValue- suggested center to be reached when suggestion is enabled.- Throws:
LockedException- if estimator is locked.
-
isLocked
public boolean isLocked()Indicates if this instance is locked because estimation is being computed.- Returns:
- true if locked, false otherwise.
-
getProgressDelta
public float getProgressDelta()Returns amount of progress variation before notifying a progress change during estimation.- Returns:
- amount of progress variation before notifying a progress change during estimation.
-
setProgressDelta
Sets amount of progress variation before notifying a progress change during estimation.- Parameters:
progressDelta- amount of progress variation before notifying a progress change during estimation.- Throws:
IllegalArgumentException- if progress delta is less than zero or greater than 1.LockedException- if this estimator is locked because an estimation is being computed.
-
getConfidence
public double getConfidence()Returns amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%). The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.- Returns:
- amount of confidence as a value between 0.0 and 1.0.
-
setConfidence
Sets amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%). The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.- Parameters:
confidence- confidence to be set as a value between 0.0 and 1.0.- Throws:
IllegalArgumentException- if provided value is not between 0.0 and 1.0.LockedException- if this estimator is locked because an estimator is being computed.
-
getMaxIterations
public int getMaxIterations()Returns maximum allowed number of iterations. If maximum allowed number of iterations is achieved without converging to a result when calling estimate(), a RobustEstimatorException will be raised.- Returns:
- maximum allowed number of iterations.
-
setMaxIterations
Sets maximum allowed number of iterations. When the maximum number of iterations is exceeded, result will not be available, however an approximate result will be available for retrieval.- Parameters:
maxIterations- maximum allowed number of iterations to be set.- Throws:
IllegalArgumentException- if provided value is less than 1.LockedException- if this estimator is locked because an estimation is being computed.
-
getInliersData
public com.irurueta.numerical.robust.InliersData getInliersData()Gets data related to inliers found after estimation.- Returns:
- data related to inliers found after estimation.
-
isResultRefined
public boolean isResultRefined()Indicates whether result must be refined using Levenberg-Marquardt fitting algorithm over found inliers. If true, inliers will be computed and kept in any implementation regardless of the settings.- Returns:
- true to refine result, false to simply use result found by robust estimator without further refining.
-
setResultRefined
Specifies whether result must be refined using Levenberg-Marquardt fitting algorithm over found inliers.- Parameters:
refineResult- true to refine result, false to simply use result found by robust estimator without further refining.- Throws:
LockedException- if estimator is locked.
-
isCovarianceKept
public boolean isCovarianceKept()Indicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined.- Returns:
- true if covariance must be kept after refining result, false otherwise.
-
setCovarianceKept
Specifies whether covariance must be kept after refining result. This setting is only taken into account if result is refined.- Parameters:
keepCovariance- true if covariance must be kept after refining result, false otherwise.- Throws:
LockedException- if estimator is locked.
-
isFastRefinementUsed
public boolean isFastRefinementUsed()Indicates whether fast refinement must be used or not. When true Levenberg/Marquardt refinement will be used, when false an initial Powell optimization is done and then Levenberg/Marquard is used for covariance estimation if needed. Fast refinement requires less computing time, but it is more likely to fail than slow one.- Returns:
- true to use fast refinement, false to use a slow but more accurate and stable refinement.
-
setFastRefinementUsed
Specifies whether fast refinement must be used or not. When true Levenberg/Marquardt refinement will be used, when false an initial Powell optimization is done and then Levenberg/Marquard is used for covariance estimation if needed. Fast refinement requires less computing time, but it is more likely to fail than slow one.- Parameters:
useFastRefinement- true to use fast refinement, false to use a slow but more accurate and stable refinement.- Throws:
LockedException- if estimator is locked.
-
getCovariance
public com.irurueta.algebra.Matrix getCovariance()Gets estimated covariance of estimated pinhole camera if available. This is only available when result has been refined and covariance is kept.- Returns:
- estimated covariance or null.
-
estimate
public abstract PinholeCamera estimate() throws LockedException, NotReadyException, com.irurueta.numerical.robust.RobustEstimatorExceptionEstimates a pinhole camera using a robust estimator and the best set of matched 2D/3D point correspondences or 2D line/3D plane correspondences found using the robust estimator.- Returns:
- a pinhole camera.
- Throws:
LockedException- if robust estimator is locked because an estimation is already in progress.NotReadyException- if provided input data is not enough to start the estimation.com.irurueta.numerical.robust.RobustEstimatorException- if estimation fails for any reason (i.e. numerical instability, no solution available, etc).
-
getMethod
public abstract com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()Returns method being used for robust estimation.- Returns:
- method being used for robust estimation.
-
getRefinementStandardDeviation
protected abstract double getRefinementStandardDeviation()Gets standard deviation used for Levenberg-Marquardt fitting during refinement. Returned value gives an indication of how much variance each residual has. Typically, this value is related to the threshold used on each robust estimation, since residuals of found inliers are within the range of such threshold.- Returns:
- standard deviation used for refinement.
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided robust estimator method.- Parameters:
points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and robust estimator method.- Parameters:
points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using default robust estimator method.- Parameters:
points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and default robust estimator method.- Parameters:
points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided robust estimator method.- Parameters:
intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and robust estimator method.- Parameters:
intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using default robust estimator method.- Parameters:
intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and default robust estimator method.- Parameters:
intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, PinholeCameraIntrinsicParameters intrinsic, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.intrinsic- intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided robust estimator method.- Parameters:
skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and robust estimator method.- Parameters:
skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using default robust estimator method.- Parameters:
skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided quality scores and default robust estimator method.- Parameters:
skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPoints
public static PinholeCameraRobustEstimator createFromPoints(PinholeCameraRobustEstimatorListener listener, double skewness, double horizontalPrincipalPoint, double verticalPrincipalPoint, List<Point3D> points3D, List<Point2D> points2D, double[] qualityScores) Creates a pinhole camera robust estimator based on 2D/3D point correspondences and using provided listener, quality scores and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.skewness- skewness value of intrinsic parameters of camera to be estimated.horizontalPrincipalPoint- horizontal principal point value of intrinsic parameters of camera to be estimated.verticalPrincipalPoint- vertical principal point value of intrinsic parameters of camera to be estimated.points3D- list of 3D points used to estimate a pinhole camera.points2D- list of corresponding projected 2D points used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of points and quality scores don't have the same size or their size is smaller than required minimum size (6 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(List<Plane> planes, List<Line2D> lines, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided robust estimator method.- Parameters:
planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(List<Plane> planes, List<Line2D> lines, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided quality scores and robust estimator method.- Parameters:
planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched samples.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines and quality scores don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener, quality scores and robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched samples.method- method of a robust estimator algorithm to estimate the best pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines and quality scores don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(List<Plane> planes, List<Line2D> lines) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using default robust estimator method.- Parameters:
planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(List<Plane> planes, List<Line2D> lines, double[] qualityScores) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided quality scores and default robust estimator method.- Parameters:
planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched samples.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines and quality scores don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
createFromPlanesAndLines
public static PinholeCameraRobustEstimator createFromPlanesAndLines(PinholeCameraRobustEstimatorListener listener, List<Plane> planes, List<Line2D> lines, double[] qualityScores) Creates a pinhole camera robust estimator based on 3D plane/2D line correspondences and using provided listener, quality scores and default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.planes- list of 3D planes used to estimate a pinhole camera.lines- list of corresponding projected 2D lines used to estimate a pinhole camera.qualityScores- quality scores corresponding to each pair of matched samples.- Returns:
- an instance of a pinhole camera robust estimator.
- Throws:
IllegalArgumentException- if provided lists of planes/lines and quality scores don't have the same size or their size is smaller than required minimum size (4 correspondences).
-
hasSuggestions
protected boolean hasSuggestions()Indicates whether obtained solution requires refinement to apply provided suggestions.- Returns:
- true if solution requires refinement to apply provided suggestions, false otherwise.
-
hasIntrinsicSuggestions
private boolean hasIntrinsicSuggestions()Indicates whether suggestions for any intrinsic parameter are required or not.- Returns:
- true if suggestions for any intrinsic parameters are required, false otherwise.
-
hasExtrinsicSuggestions
private boolean hasExtrinsicSuggestions()Indicates whether suggestions for any extrinsic parameter are required or not.- Returns:
- true if suggestions for any extrinsic parameter are required, false otherwise.
-