Class MSACPolynomialRobustEstimator
java.lang.Object
com.irurueta.numerical.polynomials.estimators.PolynomialRobustEstimator
com.irurueta.numerical.polynomials.estimators.MSACPolynomialRobustEstimator
Finds the best polynomial using RANSAC algorithm.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Constant defining default threshold to determine whether polynomials are inliers or not.static final double
Minimum value that can be set as threshold.private double
Threshold to determine whether polynomial evaluations are inliers or not when testing possible estimation solutionsFields inherited from class com.irurueta.numerical.polynomials.estimators.PolynomialRobustEstimator
confidence, DEFAULT_CONFIDENCE, DEFAULT_MAX_ITERATIONS, DEFAULT_PROGRESS_DELTA, DEFAULT_ROBUST_METHOD, DEFAULT_USE_GEOMETRIC_DISTANCE, evaluations, listener, locked, MAX_CONFIDENCE, MAX_PROGRESS_DELTA, maxIterations, MIN_CONFIDENCE, MIN_ITERATIONS, MIN_PROGRESS_DELTA, polynomialEstimator, progressDelta, useGeometricDistance
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.MSACPolynomialRobustEstimator
(int degree) Constructor.MSACPolynomialRobustEstimator
(int degree, PolynomialRobustEstimatorListener listener) Constructor.MSACPolynomialRobustEstimator
(int degree, List<PolynomialEvaluation> evaluations) Constructor.MSACPolynomialRobustEstimator
(int degree, List<PolynomialEvaluation> evaluations, PolynomialRobustEstimatorListener listener) Constructor.Constructor.MSACPolynomialRobustEstimator
(List<PolynomialEvaluation> evaluations) Constructor.MSACPolynomialRobustEstimator
(List<PolynomialEvaluation> evaluations, PolynomialRobustEstimatorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionestimate()
Estimates polynomial.Returns method being used for robust estimation.double
Returns threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.void
setThreshold
(double threshold) Sets threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.Methods inherited from class com.irurueta.numerical.polynomials.estimators.PolynomialRobustEstimator
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getAlgebraicDistance, getAlgebraicDistance, getAlgebraicDistance, getAlgebraicDistance, getAlgebraicDistance, getConfidence, getDegree, getDistance, getEvaluations, getGeometricDistance, getGeometricOrAlgebraicDistance, getListener, getMaxIterations, getMinNumberOfEvaluations, getProgressDelta, getQualityScores, isGeometricDistanceUsed, isLocked, isReady, setConfidence, setDegree, setEvaluations, setGeometricDistanceUsed, setListener, setMaxIterations, setProgressDelta, setQualityScores
-
Field Details
-
DEFAULT_THRESHOLD
public static final double DEFAULT_THRESHOLDConstant defining default threshold to determine whether polynomials are inliers or not. Threshold will be used to compare either algebraic or geometric distance of estimated polynomial respect each provided evaluation.- See Also:
-
MIN_THRESHOLD
public static final double MIN_THRESHOLDMinimum value that can be set as threshold. Threshold must be strictly greater than 0.0.- See Also:
-
threshold
private double thresholdThreshold to determine whether polynomial evaluations are inliers or not when testing possible estimation solutions
-
-
Constructor Details
-
MSACPolynomialRobustEstimator
public MSACPolynomialRobustEstimator()Constructor. -
MSACPolynomialRobustEstimator
public MSACPolynomialRobustEstimator(int degree) Constructor.- Parameters:
degree
- degree of polynomial to be estimated.- Throws:
IllegalArgumentException
- if provided degree is less than 1.
-
MSACPolynomialRobustEstimator
Constructor.- Parameters:
evaluations
- collection of polynomial evaluations.- Throws:
IllegalArgumentException
- if provided number of evaluations is less than the required minimum.
-
MSACPolynomialRobustEstimator
Constructor.- Parameters:
listener
- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
-
MSACPolynomialRobustEstimator
Constructor.- Parameters:
degree
- degree of polynomial to be estimated.evaluations
- collection of polynomial evaluations.- Throws:
IllegalArgumentException
- if provided degree is less than 1 or if provided number of evaluations is less than the required minimum for provided degree.
-
MSACPolynomialRobustEstimator
Constructor.- Parameters:
degree
- degree of polynomial to be estimated.listener
- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.- Throws:
IllegalArgumentException
- if provided degree is less than 1.
-
MSACPolynomialRobustEstimator
public MSACPolynomialRobustEstimator(List<PolynomialEvaluation> evaluations, PolynomialRobustEstimatorListener listener) Constructor.- Parameters:
evaluations
- collection of polynomial evaluations.listener
- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.- Throws:
IllegalArgumentException
- if provided number of evaluations is less than the required minimum.
-
MSACPolynomialRobustEstimator
public MSACPolynomialRobustEstimator(int degree, List<PolynomialEvaluation> evaluations, PolynomialRobustEstimatorListener listener) Constructor.- Parameters:
degree
- degree of polynomial to be estimated.evaluations
- collection of polynomial evaluations.listener
- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.- Throws:
IllegalArgumentException
- if provided degree is less than 1 or if provided number of evaluations is less than the required minimum for provided degree.
-
-
Method Details
-
getThreshold
public double getThreshold()Returns threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.- Returns:
- threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.
-
setThreshold
Sets threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.- Parameters:
threshold
- threshold to determine whether polynomials are inliers or not when testing possible estimation solutions.- Throws:
IllegalArgumentException
- if provided value is equal or less than zero.LockedException
- if robust estimator is locked.
-
estimate
Estimates polynomial.- Specified by:
estimate
in classPolynomialRobustEstimator
- Returns:
- estimated polynomial.
- 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.RobustEstimatorException
- if estimation fails for any other reason (i.e. numerical instability, no solution available, etc).
-
getMethod
Returns method being used for robust estimation.- Specified by:
getMethod
in classPolynomialRobustEstimator
- Returns:
- method being used for robust estimation.
-