Class PinholeCameraEstimator

java.lang.Object
com.irurueta.geometry.estimators.PinholeCameraEstimator
Direct Known Subclasses:
LinePlaneCorrespondencePinholeCameraEstimator, PointCorrespondencePinholeCameraEstimator

public abstract class PinholeCameraEstimator extends Object
This class defines the interface for an estimator for pinhole cameras.
  • Field Details

    • DEFAULT_ESTIMATOR_TYPE

      public static final PinholeCameraEstimatorType DEFAULT_ESTIMATOR_TYPE
      Default estimator type.
    • 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:
    • DEFAULT_MIN_SUGGESTION_WEIGHT

      public static final double DEFAULT_MIN_SUGGESTION_WEIGHT
      Default value for minimum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      See Also:
    • DEFAULT_MAX_SUGGESTION_WEIGHT

      public static final double DEFAULT_MAX_SUGGESTION_WEIGHT
      Default value for maximum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      See Also:
    • DEFAULT_SUGGESTION_WEIGHT_STEP

      public static final double DEFAULT_SUGGESTION_WEIGHT_STEP
      Default value for the step to increase suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      See Also:
    • locked

      protected boolean locked
      True when an estimator is estimating a camera.
    • listener

      protected PinholeCameraEstimatorListener listener
      Listener to be notified of events such as when estimation starts, ends or estimation progress changes.
    • 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.
    • minSuggestionWeight

      protected double minSuggestionWeight
      Minimum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
    • maxSuggestionWeight

      protected double maxSuggestionWeight
      Maximum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
    • suggestionWeightStep

      protected double suggestionWeightStep
      Step to increase suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
  • Constructor Details

    • PinholeCameraEstimator

      protected PinholeCameraEstimator()
      Constructor.
    • PinholeCameraEstimator

      protected PinholeCameraEstimator(PinholeCameraEstimatorListener listener)
      Constructor with listener.
      Parameters:
      listener - listener to be notified of events such as when estimation starts, ends or estimation progress changes.
  • Method Details

    • getListener

      public PinholeCameraEstimatorListener getListener()
      Returns listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Returns:
      listener to be notified of events.
    • setListener

      public void setListener(PinholeCameraEstimatorListener listener) throws LockedException
      Sets listener to be notified of events such as when estimation starts, ends or estimation progress changes.
      Parameters:
      listener - listener to be notified of events.
      Throws:
      LockedException - if estimator is locked.
    • 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.
    • getMinSuggestionWeight

      public double getMinSuggestionWeight()
      Gets minimum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Returns:
      minimum suggestion weight.
    • setMinSuggestionWeight

      public void setMinSuggestionWeight(double minSuggestionWeight) throws LockedException
      Sets minimum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Parameters:
      minSuggestionWeight - minimum suggestion weight.
      Throws:
      LockedException - if estimator is locked.
    • getMaxSuggestionWeight

      public double getMaxSuggestionWeight()
      Gets maximum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Returns:
      maximum suggestion weight.
    • setMaxSuggestionWeight

      public void setMaxSuggestionWeight(double maxSuggestionWeight) throws LockedException
      Sets maximum suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Parameters:
      maxSuggestionWeight - maximum suggestion weight.
      Throws:
      LockedException - if estimator is locked.
    • setMinMaxSuggestionWeight

      public void setMinMaxSuggestionWeight(double minSuggestionWeight, double maxSuggestionWeight) throws LockedException
      Sets minimum and maximum suggestion weights. Suggestion weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Parameters:
      minSuggestionWeight - minimum suggestion weight.
      maxSuggestionWeight - maximum suggestion weight.
      Throws:
      LockedException - if estimator is locked.
      IllegalArgumentException - if minimum suggestion weight is greater or equal than maximum value.
    • getSuggestionWeightStep

      public double getSuggestionWeightStep()
      Gets step to increase suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Returns:
      step to increase suggestion weight.
    • setSuggestionWeightStep

      public void setSuggestionWeightStep(double suggestionWeightStep) throws LockedException
      Sets step to increase suggestion weight. This weight is used to slowly draw original camera parameters into desired suggested values. Suggestion weight slowly increases each time Levenberg-Marquardt is used to find a solution so that the algorithm can converge into desired value. The faster the weights are increased the less likely that suggested values can be converged if they differ too much from the original ones.
      Parameters:
      suggestionWeightStep - step to increase suggestion weight.
      Throws:
      LockedException - if estimator is locked.
      IllegalArgumentException - if provided step is negative or zero.
    • isLocked

      public boolean isLocked()
      Indicates whether this instance is locked.
      Returns:
      true if this estimator is busy estimating a camera, false otherwise.
    • isReady

      public abstract boolean isReady()
      Indicates if this estimator is ready to start the estimation.
      Returns:
      true if estimator is ready, false otherwise.
    • estimate

      Estimates a pinhole camera.
      Returns:
      estimated pinhole camera.
      Throws:
      LockedException - if estimator is locked.
      NotReadyException - if input has not yet been provided.
      PinholeCameraEstimatorException - if an error occurs during estimation, usually because input data is not valid.
    • getType

      public abstract PinholeCameraEstimatorType getType()
      Returns type of pinhole camera estimator.
      Returns:
      type of pinhole camera estimator.
    • create

      public static PinholeCameraEstimator create()
      Creates an instance of a pinhole camera estimator using default type.
      Returns:
      an instance of a pinhole camera estimator.
    • create

      Creates an instance of a pinhole camera estimator using provided type.
      Parameters:
      type - type of pinhole camera estimator.
      Returns:
      an instance of a pinhole camera estimator.
    • attemptRefine

      protected abstract PinholeCamera attemptRefine(PinholeCamera pinholeCamera)
      Attempts to refine provided camera using requested suggestions. If no suggestions are requested or if refinement fails, provided camera is returned instead.
      Parameters:
      pinholeCamera - camera to be refined.
      Returns:
      refined camera.
    • 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.