public class RobustAffineTransformEstimator extends Object implements RobustModelFitting<Point2d,Point2d,AffineTransformModel>
TransformUtilities.affineMatrix(List)) coupled with
either RANSAC or LMedS with a BucketingSampler2d
sampling strategy for selecting subsets.
Non-linear optimisation is unncessary as the algebraic and geometric distances are equal in the affine case.
| Constructor and Description |
|---|
RobustAffineTransformEstimator(double outlierProportion)
Construct using the
LMedS algorithm with the given expected
outlier percentage |
RobustAffineTransformEstimator(double threshold,
int nIterations,
RANSAC.StoppingCondition stoppingCondition)
Construct using the
RANSAC algorithm with the given options. |
RobustAffineTransformEstimator(double threshold,
int nIterations,
RANSAC.StoppingCondition stoppingCondition,
Predicate<AffineTransformModel> modelCheck)
Construct using the
RANSAC algorithm with the given options. |
RobustAffineTransformEstimator(double outlierProportion,
Predicate<AffineTransformModel> modelCheck)
Construct using the
LMedS algorithm with the given expected
outlier percentage |
| Modifier and Type | Method and Description |
|---|---|
boolean |
fitData(List<? extends IndependentPair<Point2d,Point2d>> data)
Attempt to fit the given data to the model.
|
List<? extends IndependentPair<Point2d,Point2d>> |
getInliers() |
AffineTransformModel |
getModel() |
List<? extends IndependentPair<Point2d,Point2d>> |
getOutliers() |
int |
numItemsToEstimate() |
public RobustAffineTransformEstimator(double outlierProportion)
LMedS algorithm with the given expected
outlier percentageoutlierProportion - expected proportion of outliers (between 0 and 1)public RobustAffineTransformEstimator(double threshold, int nIterations, RANSAC.StoppingCondition stoppingCondition)
RANSAC algorithm with the given options.threshold - the threshold on the AlgebraicResidual2d at which to
consider a point as an inliernIterations - the maximum number of iterationsstoppingCondition - the RANSAC.StoppingCondition for RANSACpublic RobustAffineTransformEstimator(double outlierProportion, Predicate<AffineTransformModel> modelCheck)
LMedS algorithm with the given expected
outlier percentageoutlierProportion - expected proportion of outliers (between 0 and 1)modelCheck - the predicate to test whether an estimated model is sanepublic RobustAffineTransformEstimator(double threshold, int nIterations, RANSAC.StoppingCondition stoppingCondition, Predicate<AffineTransformModel> modelCheck)
RANSAC algorithm with the given options.threshold - the threshold on the AlgebraicResidual2d at which to
consider a point as an inliernIterations - the maximum number of iterationsstoppingCondition - the RANSAC.StoppingCondition for RANSACmodelCheck - the predicate to test whether an estimated model is sanepublic boolean fitData(List<? extends IndependentPair<Point2d,Point2d>> data)
ModelFittingfitData in interface ModelFitting<Point2d,Point2d,AffineTransformModel>data - Data to be fittedpublic int numItemsToEstimate()
numItemsToEstimate in interface ModelFitting<Point2d,Point2d,AffineTransformModel>public AffineTransformModel getModel()
getModel in interface ModelFitting<Point2d,Point2d,AffineTransformModel>public List<? extends IndependentPair<Point2d,Point2d>> getInliers()
getInliers in interface RobustModelFitting<Point2d,Point2d,AffineTransformModel>public List<? extends IndependentPair<Point2d,Point2d>> getOutliers()
getOutliers in interface RobustModelFitting<Point2d,Point2d,AffineTransformModel>