Class PinholeCameraRobustEstimator

java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraRobustEstimator
Direct Known Subclasses:
LinePlaneCorrespondencePinholeCameraRobustEstimator, PointCorrespondencePinholeCameraRobustEstimator

public abstract class PinholeCameraRobustEstimator extends Object
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 Details

    • DEFAULT_REFINE_RESULT

      public static final boolean DEFAULT_REFINE_RESULT
      Indicates 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_COVARIANCE
      Indicates that covariance is not kept by default after refining result.
      See Also:
    • DEFAULT_USE_FAST_REFINEMENT

      public static final boolean DEFAULT_USE_FAST_REFINEMENT
      Indicates whether fast refinement is used by default.
      See Also:
    • DEFAULT_PROGRESS_DELTA

      public static final float DEFAULT_PROGRESS_DELTA
      Default 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_DELTA
      Minimum allowed value for progress delta.
      See Also:
    • MAX_PROGRESS_DELTA

      public static final float MAX_PROGRESS_DELTA
      Maximum allowed value for progress delta.
      See Also:
    • DEFAULT_CONFIDENCE

      public static final double DEFAULT_CONFIDENCE
      Constant 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_ITERATIONS
      Default maximum allowed number of iterations.
      See Also:
    • MIN_CONFIDENCE

      public static final double MIN_CONFIDENCE
      Minimum allowed confidence value.
      See Also:
    • MAX_CONFIDENCE

      public static final double MAX_CONFIDENCE
      Maximum allowed confidence value.
      See Also:
    • MIN_ITERATIONS

      public static final int MIN_ITERATIONS
      Minimum allowed number of iterations.
      See Also:
    • DEFAULT_SUGGEST_SKEWNESS_VALUE_ENABLED

      public static final boolean DEFAULT_SUGGEST_SKEWNESS_VALUE_ENABLED
      Default 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_VALUE
      Default 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_ENABLED
      Default 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_ENABLED
      Default 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_ENABLED
      Default 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_VALUE
      Default 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_ENABLED
      Default 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_ENABLED
      Default 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_ENABLED
      Default 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 locked
      Indicates if this estimator is locked because an estimation is being computed.
    • progressDelta

      protected float progressDelta
      Amount of progress variation before notifying a progress change during estimation.
    • confidence

      protected double confidence
      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.
    • maxIterations

      protected int maxIterations
      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.
    • inliersData

      protected com.irurueta.numerical.robust.InliersData inliersData
      Data related to inliers found after estimation.
    • refineResult

      protected boolean refineResult
      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.
    • keepCovariance

      protected boolean keepCovariance
      Indicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined.
    • useFastRefinement

      protected boolean useFastRefinement
      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.
    • covariance

      protected com.irurueta.algebra.Matrix covariance
      Estimated covariance of estimated fundamental matrix. This is only available when result has been refined and covariance is kept.
    • suggestSkewnessValueEnabled

      protected boolean suggestSkewnessValueEnabled
      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.
    • suggestedSkewnessValue

      protected double suggestedSkewnessValue
      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.
    • suggestHorizontalFocalLengthEnabled

      protected boolean suggestHorizontalFocalLengthEnabled
      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.
    • suggestedHorizontalFocalLengthValue

      protected double suggestedHorizontalFocalLengthValue
      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.
    • suggestVerticalFocalLengthEnabled

      protected boolean suggestVerticalFocalLengthEnabled
      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.
    • suggestedVerticalFocalLengthValue

      protected double suggestedVerticalFocalLengthValue
      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.
    • suggestAspectRatioEnabled

      protected boolean suggestAspectRatioEnabled
      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.
    • suggestedAspectRatioValue

      protected double suggestedAspectRatioValue
      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.
    • suggestPrincipalPointEnabled

      protected boolean suggestPrincipalPointEnabled
      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.
    • suggestedPrincipalPointValue

      protected InhomogeneousPoint2D 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 suggestRotationEnabled
      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.
    • suggestedRotationValue

      protected Quaternion 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 suggestCenterEnabled
      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.
    • suggestedCenterValue

      protected InhomogeneousPoint3D 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

      protected PinholeCameraRobustEstimator(PinholeCameraRobustEstimatorListener listener)
      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

      public void setListener(PinholeCameraRobustEstimatorListener listener) throws LockedException
      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

      public void setSuggestedSkewnessValue(double suggestedSkewnessValue) throws LockedException
      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

      public void setSuggestAspectRatioEnabled(boolean suggestAspectRatioEnabled) throws LockedException
      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

      public void setSuggestedAspectRatioValue(double suggestedAspectRatioValue) throws LockedException
      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

      public InhomogeneousPoint2D 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

      public void setSuggestRotationEnabled(boolean suggestRotationEnabled) throws LockedException
      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

      public Quaternion 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

      public void setSuggestedRotationValue(Quaternion suggestedRotationValue) throws LockedException
      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

      public void setSuggestCenterEnabled(boolean suggestCenterEnabled) throws LockedException
      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

      public InhomogeneousPoint3D 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

      public void setProgressDelta(float progressDelta) throws LockedException
      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

      public void setConfidence(double confidence) throws LockedException
      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

      public void setMaxIterations(int maxIterations) throws LockedException
      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

      public void setResultRefined(boolean refineResult) throws LockedException
      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

      public void setCovarianceKept(boolean keepCovariance) throws LockedException
      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

      public void setFastRefinementUsed(boolean useFastRefinement) throws LockedException
      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.RobustEstimatorException
      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.
      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.