Package com.irurueta.geometry.refiners
Class InhomogeneousPoint3DRefiner
java.lang.Object
com.irurueta.geometry.refiners.Refiner<InhomogeneousPoint3D>
com.irurueta.geometry.refiners.InliersDataRefiner<InhomogeneousPoint3D>
com.irurueta.geometry.refiners.SamplesAndInliersDataRefiner<InhomogeneousPoint3D,Plane>
com.irurueta.geometry.refiners.Point3DRefiner<InhomogeneousPoint3D>
com.irurueta.geometry.refiners.InhomogeneousPoint3DRefiner
Refines an inhomogeneous 3D point by taking into account an initial
estimation, inlier samples 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
Fields inherited from class com.irurueta.geometry.refiners.SamplesAndInliersDataRefiner
samplesFields 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
ConstructorsConstructorDescriptionConstructor.InhomogeneousPoint3DRefiner(InhomogeneousPoint3D initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<Plane> samples, double refinementStandardDeviation) Constructor.InhomogeneousPoint3DRefiner(InhomogeneousPoint3D initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<Plane> samples, double refinementStandardDeviation) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionrefine()Refines provided initial estimation.booleanrefine(InhomogeneousPoint3D result) Refines provided initial estimation.Methods inherited from class com.irurueta.geometry.refiners.Point3DRefiner
getRefinementStandardDeviation, residual, setRefinementStandardDeviation, totalResidualMethods inherited from class com.irurueta.geometry.refiners.SamplesAndInliersDataRefiner
getSamples, isReady, setSamplesMethods 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, setCovarianceKept, setInitialEstimation, setListener
-
Constructor Details
-
InhomogeneousPoint3DRefiner
public InhomogeneousPoint3DRefiner()Constructor. -
InhomogeneousPoint3DRefiner
public InhomogeneousPoint3DRefiner(InhomogeneousPoint3D initialEstimation, boolean keepCovariance, BitSet inliers, double[] residuals, int numInliers, List<Plane> samples, 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.samples- collection of samples.refinementStandardDeviation- standard deviation used for Levenberg-Marquardt fitting.
-
InhomogeneousPoint3DRefiner
public InhomogeneousPoint3DRefiner(InhomogeneousPoint3D initialEstimation, boolean keepCovariance, com.irurueta.numerical.robust.InliersData inliersData, List<Plane> samples, 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.samples- collection of samples.refinementStandardDeviation- standard deviation used for Levenberg-Marquardt fitting.
-
-
Method Details
-
refine
Refines provided initial estimation.- Specified by:
refinein classRefiner<InhomogeneousPoint3D>- Returns:
- refined 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).
-
refine
public boolean refine(InhomogeneousPoint3D result) throws NotReadyException, LockedException, RefinerException Refines provided initial estimation. This method always sets a value into provided result instance regardless of the fact that error has actually improved in LMSE terms or not.- Specified by:
refinein classRefiner<InhomogeneousPoint3D>- Parameters:
result- instance where refined estimation will be stored.- Returns:
- true if result improved (decreases) in LMSE terms respect to initial estimation, false if no improvement has been achieved.
- 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).
-