Package com.irurueta.geometry.estimators
Class PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
java.lang.Object
com.irurueta.geometry.estimators.ProjectiveTransformation3DRobustEstimator
com.irurueta.geometry.estimators.PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
- Direct Known Subclasses:
LMedSPlaneCorrespondenceProjectiveTransformation3DRobustEstimator,MSACPlaneCorrespondenceProjectiveTransformation3DRobustEstimator,PROMedSPlaneCorrespondenceProjectiveTransformation3DRobustEstimator,PROSACPlaneCorrespondenceProjectiveTransformation3DRobustEstimator,RANSACPlaneCorrespondenceProjectiveTransformation3DRobustEstimator
public abstract class PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
extends ProjectiveTransformation3DRobustEstimator
This is an abstract class for algorithms to robustly find the best projective
3D transformation for collections of matching planes.
Implementations of this class should be able to detect and discard outliers
in order to find the best solution.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.irurueta.numerical.robust.RobustEstimatorMethodDefault robust estimator method when none is provided.List of planes to be used to estimate a projective 3D transformation.List of planes to be used to estimate a projective 3D transformation.Fields inherited from class com.irurueta.geometry.estimators.ProjectiveTransformation3DRobustEstimator
confidence, covariance, DEFAULT_CONFIDENCE, DEFAULT_KEEP_COVARIANCE, DEFAULT_MAX_ITERATIONS, DEFAULT_PROGRESS_DELTA, DEFAULT_REFINE_RESULT, inliersData, keepCovariance, listener, locked, MAX_CONFIDENCE, MAX_PROGRESS_DELTA, maxIterations, MIN_CONFIDENCE, MIN_ITERATIONS, MIN_PROGRESS_DELTA, MINIMUM_SIZE, progressDelta, refineResult -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedPlaneCorrespondenceProjectiveTransformation3DRobustEstimator(ProjectiveTransformation3DRobustEstimatorListener listener) Constructor.protectedPlaneCorrespondenceProjectiveTransformation3DRobustEstimator(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes) Constructor with listener and lists of planes to be used to estimate projective 3D transformation.protectedPlaneCorrespondenceProjectiveTransformation3DRobustEstimator(List<Plane> inputPlanes, List<Plane> outputPlanes) Constructor with lists of planes to be used to estimate a projective 3D transformation. -
Method Summary
Modifier and TypeMethodDescriptionprotected ProjectiveTransformation3DattemptRefine(ProjectiveTransformation3D transformation) Attempts to refine provided solution if refinement is requested.create()Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.create(double[] qualityScores) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.create(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, double[] qualityScores) Creates a projective 3D transformation estimator based on 3D line correspondences and using default robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on plane correspondences and using provided robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on plane correspondences and using provided robust estimator method.create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D line correspondences and using provided robust estimator method.create(com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.Creates a projective 3D transformation estimator based on 3D line correspondences and using default robust estimator method.create(List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on plane correspondences and using provided robust estimator method.create(List<Plane> inputPlanes, List<Plane> outputPlanes, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.Returns list of input planes to be used to estimate a projective 3D transformation.Returns list of output planes to be used to estimate a projective 3D transformation.double[]Returns quality scores corresponding to each pair of matched planes.protected static doublegetResidual(Plane plane, Plane transformedPlane) Computes residual by comparing two lines algebraically by doing the dot product of their parameters.private voidinternalSetPlanes(List<Plane> inputPlanes, List<Plane> outputPlanes) Internal method to set lists of planes to be used to estimate a projective 3D transformation.booleanisReady()Indicates if estimator is ready to start the projective 3D transformation estimation.protected final voidSets lists of planes to be used to estimate a projective 3D transformation.voidsetQualityScores(double[] qualityScores) Sets quality scores corresponding to each pair of matched planes.Methods inherited from class com.irurueta.geometry.estimators.ProjectiveTransformation3DRobustEstimator
createFromPlanes, createFromPlanes, createFromPlanes, createFromPlanes, createFromPlanes, createFromPlanes, createFromPlanes, createFromPlanes, createFromPoints, createFromPoints, createFromPoints, createFromPoints, createFromPoints, createFromPoints, createFromPoints, createFromPoints, estimate, getConfidence, getCovariance, getInliersData, getListener, getMaxIterations, getMethod, getProgressDelta, getRefinementStandardDeviation, isCovarianceKept, isListenerAvailable, isLocked, isResultRefined, setConfidence, setCovarianceKept, setListener, setMaxIterations, setProgressDelta, setResultRefined
-
Field Details
-
DEFAULT_ROBUST_METHOD
public static final com.irurueta.numerical.robust.RobustEstimatorMethod DEFAULT_ROBUST_METHODDefault robust estimator method when none is provided. -
inputPlanes
List of planes to be used to estimate a projective 3D transformation. Each line in the list of input lines must be matched with the corresponding line in the list of output lines located at the same position. Hence, both input lines and output lines must have the same size, and their size must be greater or equal than MINIMUM_SIZE. -
outputPlanes
List of planes to be used to estimate a projective 3D transformation. Each point in the list of output lines must be matched with the corresponding line in the list of input lines located at the same position. Hence, both input lines and output lines must have the same size, and their size must be greater or equal than MINIMUM_SIZE.
-
-
Constructor Details
-
PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
protected PlaneCorrespondenceProjectiveTransformation3DRobustEstimator()Constructor. -
PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
protected PlaneCorrespondenceProjectiveTransformation3DRobustEstimator(List<Plane> inputPlanes, List<Plane> outputPlanes) Constructor with lists of planes to be used to estimate a projective 3D transformation. Planes in the list located at the same position are considered to be matched. Hence, both lists must have the same size, and their size must be greater or equal than MINIMUM_SIZE.- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes ot be used to estimate a projective 3D transformation.- Throws:
IllegalArgumentException- if provided lists of planes don't have the same size or their size is smaller than MINIMUM_SIZE.
-
PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
protected PlaneCorrespondenceProjectiveTransformation3DRobustEstimator(ProjectiveTransformation3DRobustEstimatorListener listener) Constructor.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
-
PlaneCorrespondenceProjectiveTransformation3DRobustEstimator
protected PlaneCorrespondenceProjectiveTransformation3DRobustEstimator(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes) Constructor with listener and lists of planes to be used to estimate projective 3D transformation. Planes in the list located at the same position are considered to be matched. Hence, both lists must have the same size, and their size must be greater or equal than MINIMUM_SIZE.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.- Throws:
IllegalArgumentException- if provided lists of planes don't have the same size or their size is smaller than MINIMUM_SIZE.
-
-
Method Details
-
getInputPlanes
Returns list of input planes to be used to estimate a projective 3D transformation. Each plane in the list of input planes must be matched with the corresponding planes in the list of output planes located at the same position. Hence, both input planes and output planes must have the same size, and their size must be greater or equal than MINIMUM_SIZE- Returns:
- list of input planes to be used to estimate an affine 3D transformation.
-
getOutputPlanes
Returns list of output planes to be used to estimate a projective 3D transformation. Each plane in the list of output planes must be matched with the corresponding plane in the list of input planes located at the same position. Hence, both input planes and output planes must have the same size, and their size must be greater or equal than MINIMUM_SIZE.- Returns:
- list of output planes to be used to estimate a projective 3D transformation.
-
setPlanes
protected final void setPlanes(List<Plane> inputPlanes, List<Plane> outputPlanes) throws LockedException Sets lists of planes to be used to estimate a projective 3D transformation. Planes in the list located at the same position are considered to be matched. Hence, both lists must have the same size, and their size must be greater or equal than MINIMUM_SIZE.- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.- Throws:
IllegalArgumentException- if provided lists of planes don't have the same size or their size is smaller than MINIMUM_SIZE.LockedException- if estimator is locked because a computation is already in progress.
-
isReady
public boolean isReady()Indicates if estimator is ready to start the projective 3D transformation estimation. This is true when input data (i.e. lists of matched planes) are provided and a minimum of MINIMUM_SIZE lines are available.- Returns:
- true if estimator is ready, false otherwise.
-
getQualityScores
public double[] getQualityScores()Returns quality scores corresponding to each pair of matched planes. The larger the score value the better the quality of the matching. This implementation always returns null. Subclasses using quality scores must implement proper behaviour.- Returns:
- quality scores corresponding to each pair of matched points.
-
setQualityScores
Sets quality scores corresponding to each pair of matched planes. The larger the score value the better the quality of the matching. This implementation makes no action. Subclasses using quality scores must implement proper behaviour.- Parameters:
qualityScores- quality scores corresponding to each pair of matched points.- Throws:
LockedException- if robust estimator is locked because an estimation is already in progress.IllegalArgumentException- if provided quality scores length is smaller than MINIMUM_SIZE (i.e. 3 samples).
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.- Parameters:
method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(List<Plane> inputPlanes, List<Plane> outputPlanes, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D line correspondences and using provided robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.inputPlanes- list of input lines to be used to estimate a projective 3D transformation.outputPlanes- list of output lines to be used to estimate a projective 3D transformation.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on 3D plane correspondences and using provided robust estimator method.- Parameters:
qualityScores- quality scores corresponding to each pair of matched planes.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on plane correspondences and using provided robust estimator method.- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.qualityScores- quality scores corresponding to each pair of matched planes.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on plane correspondences and using provided robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.qualityScores- quality scores corresponding to each pair of matched lines.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a projective 3D transformation estimator based on plane correspondences and using provided robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.qualityScores- quality scores corresponding to each pair of matched planes.method- method of a robust estimator algorithm to estimate best projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(List<Plane> inputPlanes, List<Plane> outputPlanes) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of planes don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(double[] qualityScores) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.- Parameters:
qualityScores- quality scores corresponding to each pair of matched planes.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores) Creates a projective 3D transformation estimator based on 3D line correspondences and using default robust estimator method.- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.qualityScores- quality scores corresponding to each pair of matched planes.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, double[] qualityScores) Creates a projective 3D transformation estimator based on 3D line correspondences and using default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.qualityScores- quality scores corresponding to each pair of matched points.- Returns:
- an instance of projective 3D transformation estimator.
-
create
public static PlaneCorrespondenceProjectiveTransformation3DRobustEstimator create(ProjectiveTransformation3DRobustEstimatorListener listener, List<Plane> inputPlanes, List<Plane> outputPlanes, double[] qualityScores) Creates a projective 3D transformation estimator based on plane correspondences and using default robust estimator method.- Parameters:
listener- listener to be notified of events such as when estimation starts, ends or its progress significantly changes.inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.qualityScores- quality scores corresponding to each pair of matched lines.- Returns:
- an instance of projective 3D transformation estimator.
- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
internalSetPlanes
Internal method to set lists of planes to be used to estimate a projective 3D transformation. This method does not check whether estimator is locked or not- Parameters:
inputPlanes- list of input planes to be used to estimate a projective 3D transformation.outputPlanes- list of output planes to be used to estimate a projective 3D transformation.- Throws:
IllegalArgumentException- if provided lists of lines don't have the same size or their size is smaller than MINIMUM_SIZE.
-
getResidual
Computes residual by comparing two lines algebraically by doing the dot product of their parameters. A residual of 0 indicates that dot product was 1 or -1 and lines were equal. A residual of 1 indicates that dot product was 0 and lines were orthogonal. If dot product was -1, then although their director vectors are opposed, lines are considered equal, since sign changes are not taken into account.- Parameters:
plane- originally sampled output plane.transformedPlane- estimated output plane obtained after using estimated transformation.- Returns:
- computed residual.
-
attemptRefine
Attempts to refine provided solution if refinement is requested. This method returns a refined solution of the same provided solution if refinement is not requested or has failed. If refinement is enabled, and it is requested to keep covariance, this method will also keep covariance of refined transformation.- Parameters:
transformation- transformation estimated by a robust estimator without refinement.- Returns:
- solution after refinement (if requested) or the provided non-refined solution if not requested or refinement failed.
-