Point Cloud Library (PCL)
1.7.0
|
DefaultConvergenceCriteria represents an instantiation of ConvergenceCriteria, and implements the following criteria for registration loop evaluation: More...
#include <pcl/registration/default_convergence_criteria.h>
Public Types | |
enum | ConvergenceState { CONVERGENCE_CRITERIA_NOT_CONVERGED, CONVERGENCE_CRITERIA_ITERATIONS, CONVERGENCE_CRITERIA_TRANSFORM, CONVERGENCE_CRITERIA_ABS_MSE, CONVERGENCE_CRITERIA_REL_MSE, CONVERGENCE_CRITERIA_NO_CORRESPONDENCES } |
typedef boost::shared_ptr < DefaultConvergenceCriteria < Scalar > > | Ptr |
typedef boost::shared_ptr < const DefaultConvergenceCriteria < Scalar > > | ConstPtr |
typedef Eigen::Matrix< Scalar, 4, 4 > | Matrix4 |
![]() | |
typedef boost::shared_ptr < ConvergenceCriteria > | Ptr |
typedef boost::shared_ptr < const ConvergenceCriteria > | ConstPtr |
Public Member Functions | |
DefaultConvergenceCriteria (const int &iterations, const Matrix4 &transform, const pcl::Correspondences &correspondences) | |
Empty constructor. More... | |
virtual | ~DefaultConvergenceCriteria () |
Empty destructor. More... | |
void | setMaximumIterationsSimilarTransforms (const int nr_iterations) |
Set the maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar. More... | |
int | getMaximumIterationsSimilarTransforms () const |
Get the maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar, as set by the user. More... | |
void | setMaximumIterations (const int nr_iterations) |
Set the maximum number of iterations the internal optimization should run for. More... | |
int | getMaximumIterations () const |
Get the maximum number of iterations the internal optimization should run for, as set by the user. More... | |
void | setFailureAfterMaximumIterations (const bool failure_after_max_iter) |
Specifies if the registration fails or converges when the maximum number of iterations is reached. More... | |
bool | getFailureAfterMaximumIterations () const |
Get whether the registration will fail or converge when the maximum number of iterations is reached. More... | |
void | setRotationThreshold (const double threshold) |
Set the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) in order for an optimization to be considered as having converged to the final solution. More... | |
double | getRotationThreshold () const |
Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user. More... | |
void | setTranslationThreshold (const double threshold) |
Set the translation threshold (maximum allowable difference between two consecutive transformations) in order for an optimization to be considered as having converged to the final solution. More... | |
double | getTranslationThreshold () const |
Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user. More... | |
void | setRelativeMSE (const double mse_relative) |
Set the relative MSE between two consecutive sets of correspondences. More... | |
double | getRelativeMSE () const |
Get the relative MSE between two consecutive sets of correspondences. More... | |
void | setAbsoluteMSE (const double mse_absolute) |
Set the absolute MSE between two consecutive sets of correspondences. More... | |
double | getAbsoluteMSE () const |
Get the absolute MSE between two consecutive sets of correspondences. More... | |
virtual bool | hasConverged () |
Check if convergence has been reached. More... | |
ConvergenceState | getConvergenceState () |
Return the convergence state after hasConverged () More... | |
void | setConvergenceState (ConvergenceState c) |
Sets the convergence state externally (for example, when ICP does not find enough correspondences to estimate a transformation, the function is called setting the convergence state to ConvergenceState::CONVERGENCE_CRITERIA_NO_CORRESPONDENCES) More... | |
![]() | |
ConvergenceCriteria () | |
Empty constructor. More... | |
virtual | ~ConvergenceCriteria () |
Empty destructor. More... | |
operator bool () | |
Bool operator. More... | |
Protected Member Functions | |
double | calculateMSE (const pcl::Correspondences &correspondences) const |
Calculate the mean squared error (MSE) of the distance for a given set of correspondences. More... | |
Protected Attributes | |
const int & | iterations_ |
The number of iterations done by the registration loop so far. More... | |
const Matrix4 & | transformation_ |
The current transformation obtained by the transformation estimation method. More... | |
const pcl::Correspondences & | correspondences_ |
The current set of point correspondences between the source and the target. More... | |
double | correspondences_prev_mse_ |
The MSE for the previous set of correspondences. More... | |
double | correspondences_cur_mse_ |
The MSE for the current set of correspondences. More... | |
int | max_iterations_ |
The maximum nuyyGmber of iterations that the registration loop is to be executed. More... | |
bool | failure_after_max_iter_ |
Specifys if the registration fails or converges when the maximum number of iterations is reached. More... | |
double | rotation_threshold_ |
The rotation threshold is the relative rotation between two iterations (as angle cosine). More... | |
double | translation_threshold_ |
The translation threshold is the relative translation between two iterations (0 if no translation). More... | |
double | mse_threshold_relative_ |
The relative change from the previous MSE for the current set of correspondences, e.g. More... | |
double | mse_threshold_absolute_ |
The absolute change from the previous MSE for the current set of correspondences. More... | |
int | iterations_similar_transforms_ |
Internal counter for the number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar. More... | |
int | max_iterations_similar_transforms_ |
The maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar. More... | |
ConvergenceState | convergence_state_ |
The state of the convergence (e.g., why did the registration converge). More... | |
DefaultConvergenceCriteria represents an instantiation of ConvergenceCriteria, and implements the following criteria for registration loop evaluation:
Definition at line 65 of file default_convergence_criteria.h.
typedef boost::shared_ptr<const DefaultConvergenceCriteria<Scalar> > pcl::registration::DefaultConvergenceCriteria< Scalar >::ConstPtr |
Definition at line 69 of file default_convergence_criteria.h.
typedef Eigen::Matrix<Scalar, 4, 4> pcl::registration::DefaultConvergenceCriteria< Scalar >::Matrix4 |
Definition at line 71 of file default_convergence_criteria.h.
typedef boost::shared_ptr<DefaultConvergenceCriteria<Scalar> > pcl::registration::DefaultConvergenceCriteria< Scalar >::Ptr |
Definition at line 68 of file default_convergence_criteria.h.
enum pcl::registration::DefaultConvergenceCriteria::ConvergenceState |
Definition at line 73 of file default_convergence_criteria.h.
|
inline |
Empty constructor.
Sets:
[in] | iterations | a reference to the number of iterations the loop has ran so far |
[in] | transform | a reference to the current transformation obtained by the transformation evaluation |
[in] | correspondences | a reference to the current set of point correspondences between source and target |
Definition at line 94 of file default_convergence_criteria.h.
|
inlinevirtual |
Empty destructor.
Definition at line 113 of file default_convergence_criteria.h.
|
inlineprotected |
Calculate the mean squared error (MSE) of the distance for a given set of correspondences.
[in] | correspondences | the given set of correspondences |
Definition at line 219 of file default_convergence_criteria.h.
|
inline |
Get the absolute MSE between two consecutive sets of correspondences.
Definition at line 188 of file default_convergence_criteria.h.
|
inline |
Return the convergence state after hasConverged ()
Definition at line 197 of file default_convergence_criteria.h.
|
inline |
Get whether the registration will fail or converge when the maximum number of iterations is reached.
Definition at line 146 of file default_convergence_criteria.h.
|
inline |
Get the maximum number of iterations the internal optimization should run for, as set by the user.
Definition at line 136 of file default_convergence_criteria.h.
|
inline |
Get the maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar, as set by the user.
Definition at line 126 of file default_convergence_criteria.h.
|
inline |
Get the relative MSE between two consecutive sets of correspondences.
Definition at line 178 of file default_convergence_criteria.h.
|
inline |
Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user.
Definition at line 157 of file default_convergence_criteria.h.
|
inline |
Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user.
Definition at line 168 of file default_convergence_criteria.h.
|
virtual |
Check if convergence has been reached.
Implements pcl::registration::ConvergenceCriteria.
Definition at line 47 of file default_convergence_criteria.hpp.
|
inline |
Set the absolute MSE between two consecutive sets of correspondences.
[in] | mse_absolute | the relative MSE threshold |
Definition at line 184 of file default_convergence_criteria.h.
|
inline |
Sets the convergence state externally (for example, when ICP does not find enough correspondences to estimate a transformation, the function is called setting the convergence state to ConvergenceState::CONVERGENCE_CRITERIA_NO_CORRESPONDENCES)
[in] | c | the convergence state |
Definition at line 208 of file default_convergence_criteria.h.
|
inline |
Specifies if the registration fails or converges when the maximum number of iterations is reached.
[in] | failure_after_max_iter | If true, the registration fails. If false, the registration is assumed to have converged. |
Definition at line 142 of file default_convergence_criteria.h.
|
inline |
Set the maximum number of iterations the internal optimization should run for.
[in] | nr_iterations | the maximum number of iterations the internal optimization should run for |
Definition at line 132 of file default_convergence_criteria.h.
|
inline |
Set the maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.
[in] | nr_iterations | the maximum number of iterations |
Definition at line 120 of file default_convergence_criteria.h.
|
inline |
Set the relative MSE between two consecutive sets of correspondences.
[in] | mse_relative | the relative MSE threshold |
Definition at line 174 of file default_convergence_criteria.h.
|
inline |
Set the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) in order for an optimization to be considered as having converged to the final solution.
[in] | threshold | the rotation threshold in order for an optimization to be considered as having converged to the final solution. |
Definition at line 152 of file default_convergence_criteria.h.
|
inline |
Set the translation threshold (maximum allowable difference between two consecutive transformations) in order for an optimization to be considered as having converged to the final solution.
[in] | threshold | the translation threshold in order for an optimization to be considered as having converged to the final solution. |
Definition at line 163 of file default_convergence_criteria.h.
|
protected |
The state of the convergence (e.g., why did the registration converge).
Definition at line 270 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getConvergenceState(), and pcl::registration::DefaultConvergenceCriteria< float >::setConvergenceState().
|
protected |
The current set of point correspondences between the source and the target.
Definition at line 235 of file default_convergence_criteria.h.
|
protected |
The MSE for the current set of correspondences.
Definition at line 241 of file default_convergence_criteria.h.
|
protected |
The MSE for the previous set of correspondences.
Definition at line 238 of file default_convergence_criteria.h.
|
protected |
Specifys if the registration fails or converges when the maximum number of iterations is reached.
Definition at line 247 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getFailureAfterMaximumIterations(), and pcl::registration::DefaultConvergenceCriteria< float >::setFailureAfterMaximumIterations().
|
protected |
The number of iterations done by the registration loop so far.
Definition at line 229 of file default_convergence_criteria.h.
|
protected |
Internal counter for the number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.
Definition at line 263 of file default_convergence_criteria.h.
|
protected |
The maximum nuyyGmber of iterations that the registration loop is to be executed.
Definition at line 244 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getMaximumIterations(), and pcl::registration::DefaultConvergenceCriteria< float >::setMaximumIterations().
|
protected |
The maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.
Definition at line 267 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getMaximumIterationsSimilarTransforms(), and pcl::registration::DefaultConvergenceCriteria< float >::setMaximumIterationsSimilarTransforms().
|
protected |
The absolute change from the previous MSE for the current set of correspondences.
Definition at line 259 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getAbsoluteMSE(), and pcl::registration::DefaultConvergenceCriteria< float >::setAbsoluteMSE().
|
protected |
The relative change from the previous MSE for the current set of correspondences, e.g.
.1 means 10% change.
Definition at line 256 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getRelativeMSE(), and pcl::registration::DefaultConvergenceCriteria< float >::setRelativeMSE().
|
protected |
The rotation threshold is the relative rotation between two iterations (as angle cosine).
Definition at line 250 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getRotationThreshold(), and pcl::registration::DefaultConvergenceCriteria< float >::setRotationThreshold().
|
protected |
The current transformation obtained by the transformation estimation method.
Definition at line 232 of file default_convergence_criteria.h.
|
protected |
The translation threshold is the relative translation between two iterations (0 if no translation).
Definition at line 253 of file default_convergence_criteria.h.
Referenced by pcl::registration::DefaultConvergenceCriteria< float >::getTranslationThreshold(), and pcl::registration::DefaultConvergenceCriteria< float >::setTranslationThreshold().