Package com.irurueta.geometry.refiners
Class PairMatchesAndInliersDataRefiner<T,S1,S2>
java.lang.Object
com.irurueta.geometry.refiners.Refiner<T>
com.irurueta.geometry.refiners.InliersDataRefiner<T>
com.irurueta.geometry.refiners.PairMatchesAndInliersDataRefiner<T,S1,S2>
- Type Parameters:
T- type of instance to be refined.S1- type of matched samples in 1st set.S2- type of matched samples in 2nd set.
- Direct Known Subclasses:
AffineTransformation2DRefiner,AffineTransformation3DRefiner,EuclideanTransformation2DRefiner,EuclideanTransformation3DRefiner,MetricTransformation2DRefiner,MetricTransformation3DRefiner,PinholeCameraRefiner,ProjectiveTransformation2DRefiner,ProjectiveTransformation3DRefiner
Refines an instance of type T by taking into account an initial estimation,
inlier matches, their residuals and pairs of matches 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
FieldsModifier and TypeFieldDescription1st set of paired samples.2nd set of paired samples.Fields 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.protectedPairMatchesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S1> samples1, List<S2> samples2) Constructor.protectedPairMatchesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S1> samples1, List<S2> samples2) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets 1st set of paired samples.Gets 2nd set of paired samples.booleanisReady()Indicates whether this refiner is ready to start refinement computation.voidsetSamples1(List<S1> samples1) Sets 1st set of paired samples.voidsetSamples2(List<S2> samples2) Sets 2nd set of paired 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
-
samples1
1st set of paired samples. -
samples2
2nd set of paired samples.
-
-
Constructor Details
-
PairMatchesAndInliersDataRefiner
protected PairMatchesAndInliersDataRefiner()Constructor. -
PairMatchesAndInliersDataRefiner
protected PairMatchesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S1> samples1, List<S2> samples2) 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.samples1- 1st set of paired samples.samples2- 2nd set of paired samples.
-
PairMatchesAndInliersDataRefiner
protected PairMatchesAndInliersDataRefiner(T initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S1> samples1, List<S2> samples2) 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.samples1- 1st set of paired samples.samples2- 2nd set of paired samples.
-
-
Method Details
-
getSamples1
Gets 1st set of paired samples.- Returns:
- 1st set of paired samples.
-
setSamples1
Sets 1st set of paired samples.- Parameters:
samples1- 1st set of paired samples.- Throws:
LockedException- if estimator is locked.
-
getSamples2
Gets 2nd set of paired samples.- Returns:
- 2nd set of paired samples.
-
setSamples2
Sets 2nd set of paired samples.- Parameters:
samples2- 2nd set of paired samples.- Throws:
LockedException- if estimator is locked.
-
isReady
public boolean isReady()Indicates whether this refiner is ready to start refinement computation.
-