Package com.irurueta.geometry.refiners
Class ProjectiveTransformation3DRefiner<S1,S2>
java.lang.Object
com.irurueta.geometry.refiners.Refiner<ProjectiveTransformation3D>
com.irurueta.geometry.refiners.InliersDataRefiner<ProjectiveTransformation3D>
com.irurueta.geometry.refiners.PairMatchesAndInliersDataRefiner<ProjectiveTransformation3D,S1,S2>
com.irurueta.geometry.refiners.ProjectiveTransformation3DRefiner<S1,S2>
- Type Parameters:
S1- type of matched samples in 1st set.S2- type of matched samples in 2nd set.
- Direct Known Subclasses:
PlaneCorrespondenceProjectiveTransformation3DRefiner,PointCorrespondenceProjectiveTransformation3DRefiner
public abstract class ProjectiveTransformation3DRefiner<S1,S2>
extends PairMatchesAndInliersDataRefiner<ProjectiveTransformation3D,S1,S2>
Base class for ProjectiveTransformation3D refiner.
Implementations of this class refine a 3D projective transformation by taking
into account an initial estimation, inlier point or plane matches and their
residuals.
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 TypeFieldDescriptionprivate doubleStandard deviation used for Levenberg-Marquardt fitting during refinement.Fields inherited from class com.irurueta.geometry.refiners.PairMatchesAndInliersDataRefiner
samples1, samples2Fields 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.protectedProjectiveTransformation3DRefiner(ProjectiveTransformation3D initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S1> samples1, List<S2> samples2, double refinementStandardDeviation) Constructor.protectedProjectiveTransformation3DRefiner(ProjectiveTransformation3D initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S1> samples1, List<S2> samples2, double refinementStandardDeviation) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets standard deviation used for Levenberg-Marquardt fitting during refinement.refine()Refines provided initial estimation.voidsetRefinementStandardDeviation(double refinementStandardDeviation) Sets standard deviation used for Levenberg-Marquardt fitting during refinement.Methods inherited from class com.irurueta.geometry.refiners.PairMatchesAndInliersDataRefiner
getSamples1, getSamples2, isReady, setSamples1, setSamples2Methods 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, setCovarianceKept, setInitialEstimation, setListener
-
Field Details
-
refinementStandardDeviation
private double refinementStandardDeviationStandard deviation used for Levenberg-Marquardt fitting during refinement. Returned value gives an indication of how much variance each residual has. Typically, this value is related to the threshold used on each robust estimation, since residuals of found inliers are within the range of such threshold.
-
-
Constructor Details
-
ProjectiveTransformation3DRefiner
protected ProjectiveTransformation3DRefiner()Constructor. -
ProjectiveTransformation3DRefiner
protected ProjectiveTransformation3DRefiner(ProjectiveTransformation3D initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<S1> samples1, List<S2> samples2, double refinementStandardDeviation) 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.refinementStandardDeviation- standard deviation used for Levenberg-Marquardt fitting.
-
ProjectiveTransformation3DRefiner
protected ProjectiveTransformation3DRefiner(ProjectiveTransformation3D initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<S1> samples1, List<S2> samples2, double refinementStandardDeviation) 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.refinementStandardDeviation- standard deviation used for Levenberg-Marquardt fitting.
-
-
Method Details
-
getRefinementStandardDeviation
public double getRefinementStandardDeviation()Gets standard deviation used for Levenberg-Marquardt fitting during refinement. Returned value gives an indication of how much variance each residual has. Typically, this value is related to the threshold used on each robust estimation, since residuals of found inliers are within the range of such threshold.- Returns:
- standard deviation used for refinement.
-
setRefinementStandardDeviation
public void setRefinementStandardDeviation(double refinementStandardDeviation) throws LockedException Sets standard deviation used for Levenberg-Marquardt fitting during refinement. Returned value gives an indication of how much variance each residual has. Typically, this value is related to the threshold used on each robust estimation, since residuals of found inliers are within the range of such threshold.- Parameters:
refinementStandardDeviation- standard deviation used for refinement.- Throws:
LockedException- if estimator is locked.
-
refine
public ProjectiveTransformation3D refine() throws NotReadyException, LockedException, RefinerExceptionRefines provided initial estimation.- Specified by:
refinein classRefiner<ProjectiveTransformation3D>- Returns:
- refines estimation.
- Throws:
NotReadyException- if not enough input data has been provided.LockedException- if estimator is locked because refinement is already in progress.RefinerException- if refinement fails for some reason (e.g. unable to converge to a result).
-