Package com.irurueta.geometry.refiners
Class SamplesAndInliersDataRefiner<T,S>
java.lang.Object
com.irurueta.geometry.refiners.Refiner<T>
com.irurueta.geometry.refiners.InliersDataRefiner<T>
com.irurueta.geometry.refiners.SamplesAndInliersDataRefiner<T,S>
- Type Parameters:
T- type of instance to be refined.S- type of samples.
- Direct Known Subclasses:
Point2DRefiner,Point3DRefiner
Refines an instance of type T by taking into account an initial estimation,
inlier samples, their residuals and a collection of samples.
This class can be used to find a solution that minimizes error of inliers in
LMSE terms.
Typically, a refiner is used by a robust estimator, however it can also be
useful in some other situations.
-
Field Summary
FieldsFields inherited from class com.irurueta.geometry.refiners.InliersDataRefiner
inliers, numInliers, residualsFields inherited from class com.irurueta.geometry.refiners.Refiner
covariance, DEFAULT_KEEP_COVARIANCE, initialEstimation, keepCovariance, listener, locked -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedSamplesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S> samples) Constructor.protectedSamplesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S> samples) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets collection of samples.booleanisReady()Indicates whether this refiner is ready to start refinement computation.voidsetSamples(List<S> samples) Sets collection of samples.Methods inherited from class com.irurueta.geometry.refiners.InliersDataRefiner
getInliers, getNumInliers, getResiduals, getTotalSamples, setInliers, setInliersData, setNumInliers, setResidualsMethods inherited from class com.irurueta.geometry.refiners.Refiner
getCovariance, getInitialEstimation, getListener, isCovarianceKept, isLocked, refine, refine, setCovarianceKept, setInitialEstimation, setListener
-
Field Details
-
samples
Collection of samples.
-
-
Constructor Details
-
SamplesAndInliersDataRefiner
protected SamplesAndInliersDataRefiner()Constructor. -
SamplesAndInliersDataRefiner
protected SamplesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S> samples) Constructor.- Parameters:
initialEstimation- initial estimation to be set.keepCovariance- true if covariance of estimation must be kept after refinement, false otherwise.inliers- set indicating which of the provided matches are inliers.residuals- residuals for matched samples.numInliers- number of inliers on initial estimation.samples- collection of samples.
-
SamplesAndInliersDataRefiner
protected SamplesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S> samples) Constructor.- Parameters:
initialEstimation- initial estimation to be set.keepCovariance- true if covariance of estimation must be kept after refinement, false otherwise.inliersData- inlier data, typically obtained from a robust estimator.samples- collection of samples.
-
-
Method Details
-
getSamples
Gets collection of samples.- Returns:
- collection of samples.
-
setSamples
Sets collection of samples.- Parameters:
samples- collection of samples.- Throws:
LockedException- if estimator is locked.
-
isReady
public boolean isReady()Indicates whether this refiner is ready to start refinement computation.
-