|
Point Cloud Library (PCL) 1.12.1
|
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 , CONVERGENCE_CRITERIA_FAILURE_AFTER_MAX_ITERATIONS } |
| using | Ptr = shared_ptr<DefaultConvergenceCriteria<Scalar>> |
| using | ConstPtr = shared_ptr<const DefaultConvergenceCriteria<Scalar>> |
| using | Matrix4 = Eigen::Matrix<Scalar, 4, 4> |
| Public Types inherited from pcl::registration::ConvergenceCriteria | |
| using | Ptr = shared_ptr<ConvergenceCriteria> |
| using | ConstPtr = shared_ptr<const ConvergenceCriteria> |
Public Member Functions | |
| DefaultConvergenceCriteria (const int &iterations, const Matrix4 &transform, const pcl::Correspondences &correspondences) | |
| Empty constructor. | |
| ~DefaultConvergenceCriteria () | |
| Empty destructor. | |
| void | setMaximumIterationsSimilarTransforms (const int nr_iterations) |
| Set the maximum number of consecutive iterations that the internal rotation, translation, and MSE differences are allowed to be similar. | |
| int | getMaximumIterationsSimilarTransforms () const |
| Get the maximum number of consecutive iterations that the internal rotation, translation, and MSE differences are allowed to be similar, as set by the user. | |
| void | setMaximumIterations (const int nr_iterations) |
| Set the maximum number of iterations the internal optimization should run for. | |
| int | getMaximumIterations () const |
| Get the maximum number of iterations the internal optimization should run for, as set by the user. | |
| void | setFailureAfterMaximumIterations (const bool failure_after_max_iter) |
| Specifies if the registration fails or converges when the maximum number of iterations is reached. | |
| bool | getFailureAfterMaximumIterations () const |
| Get whether the registration will fail or converge when the maximum number of iterations is reached. | |
| 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. | |
| double | getRotationThreshold () const |
| Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user. | |
| 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. | |
| double | getTranslationThreshold () const |
| Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user. | |
| void | setRelativeMSE (const double mse_relative) |
| Set the relative MSE between two consecutive sets of correspondences. | |
| double | getRelativeMSE () const |
| Get the relative MSE between two consecutive sets of correspondences. | |
| void | setAbsoluteMSE (const double mse_absolute) |
| Set the absolute MSE between two consecutive sets of correspondences. | |
| double | getAbsoluteMSE () const |
| Get the absolute MSE between two consecutive sets of correspondences. | |
| bool | hasConverged () override |
| Check if convergence has been reached. | |
| ConvergenceState | getConvergenceState () |
| Return the convergence state after hasConverged (). | |
| 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). | |
| Public Member Functions inherited from pcl::registration::ConvergenceCriteria | |
| ConvergenceCriteria () | |
| Empty constructor. | |
| virtual | ~ConvergenceCriteria () |
| Empty destructor. | |
| operator bool () | |
| Bool operator. | |
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. | |
Protected Attributes | |
| const int & | iterations_ |
| The number of iterations done by the registration loop so far. | |
| const Matrix4 & | transformation_ |
| The current transformation obtained by the transformation estimation method. | |
| const pcl::Correspondences & | correspondences_ |
| The current set of point correspondences between the source and the target. | |
| double | correspondences_prev_mse_ |
| The MSE for the previous set of correspondences. | |
| double | correspondences_cur_mse_ |
| The MSE for the current set of correspondences. | |
| int | max_iterations_ |
| The maximum nuyyGmber of iterations that the registration loop is to be executed. | |
| bool | failure_after_max_iter_ |
| Specifys if the registration fails or converges when the maximum number of iterations is reached. | |
| double | rotation_threshold_ |
| The rotation threshold is the relative rotation between two iterations (as angle cosine). | |
| double | translation_threshold_ |
| The translation threshold is the relative translation between two iterations (0 if no translation). | |
| double | mse_threshold_relative_ |
| The relative change from the previous MSE for the current set of correspondences, e.g. | |
| double | mse_threshold_absolute_ |
| The absolute change from the previous MSE for the current set of correspondences. | |
| int | iterations_similar_transforms_ |
| Internal counter for the number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar. | |
| int | max_iterations_similar_transforms_ |
| The maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar. | |
| ConvergenceState | convergence_state_ |
| The state of the convergence (e.g., why did the registration converge). | |
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.
| using pcl::registration::DefaultConvergenceCriteria< Scalar >::ConstPtr = shared_ptr<const DefaultConvergenceCriteria<Scalar>> |
Definition at line 68 of file default_convergence_criteria.h.
| using pcl::registration::DefaultConvergenceCriteria< Scalar >::Matrix4 = Eigen::Matrix<Scalar, 4, 4> |
Definition at line 70 of file default_convergence_criteria.h.
| using pcl::registration::DefaultConvergenceCriteria< Scalar >::Ptr = shared_ptr<DefaultConvergenceCriteria<Scalar>> |
Definition at line 67 of file default_convergence_criteria.h.
| enum pcl::registration::DefaultConvergenceCriteria::ConvergenceState |
Definition at line 72 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.
References CONVERGENCE_CRITERIA_NOT_CONVERGED, convergence_state_, correspondences_, correspondences_cur_mse_, correspondences_prev_mse_, failure_after_max_iter_, iterations_, iterations_similar_transforms_, max_iterations_, max_iterations_similar_transforms_, mse_threshold_absolute_, mse_threshold_relative_, rotation_threshold_, transformation_, and translation_threshold_.
|
inline |
Empty destructor.
Definition at line 114 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 273 of file default_convergence_criteria.h.
Referenced by hasConverged().
|
inline |
Get the absolute MSE between two consecutive sets of correspondences.
Definition at line 241 of file default_convergence_criteria.h.
References mse_threshold_absolute_.
|
inline |
Return the convergence state after hasConverged ().
Definition at line 252 of file default_convergence_criteria.h.
References convergence_state_.
|
inline |
Get whether the registration will fail or converge when the maximum number of iterations is reached.
Definition at line 167 of file default_convergence_criteria.h.
References failure_after_max_iter_.
|
inline |
Get the maximum number of iterations the internal optimization should run for, as set by the user.
Definition at line 149 of file default_convergence_criteria.h.
References max_iterations_.
|
inline |
Get the maximum number of consecutive iterations that the internal rotation, translation, and MSE differences are allowed to be similar, as set by the user.
Definition at line 131 of file default_convergence_criteria.h.
References max_iterations_similar_transforms_.
|
inline |
Get the relative MSE between two consecutive sets of correspondences.
Definition at line 225 of file default_convergence_criteria.h.
References mse_threshold_relative_.
|
inline |
Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user.
Definition at line 188 of file default_convergence_criteria.h.
References rotation_threshold_.
|
inline |
Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user.
Definition at line 209 of file default_convergence_criteria.h.
References translation_threshold_.
|
overridevirtual |
Check if convergence has been reached.
Implements pcl::registration::ConvergenceCriteria.
Definition at line 51 of file default_convergence_criteria.hpp.
References calculateMSE(), CONVERGENCE_CRITERIA_ABS_MSE, CONVERGENCE_CRITERIA_FAILURE_AFTER_MAX_ITERATIONS, CONVERGENCE_CRITERIA_ITERATIONS, CONVERGENCE_CRITERIA_NOT_CONVERGED, CONVERGENCE_CRITERIA_REL_MSE, CONVERGENCE_CRITERIA_TRANSFORM, convergence_state_, correspondences_, correspondences_cur_mse_, correspondences_prev_mse_, failure_after_max_iter_, iterations_, iterations_similar_transforms_, max_iterations_, max_iterations_similar_transforms_, mse_threshold_absolute_, mse_threshold_relative_, rotation_threshold_, transformation_, and translation_threshold_.
|
inline |
Set the absolute MSE between two consecutive sets of correspondences.
| [in] | mse_absolute | the relative MSE threshold |
Definition at line 234 of file default_convergence_criteria.h.
References mse_threshold_absolute_.
|
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 263 of file default_convergence_criteria.h.
References convergence_state_.
|
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 159 of file default_convergence_criteria.h.
References failure_after_max_iter_.
|
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 141 of file default_convergence_criteria.h.
References max_iterations_.
|
inline |
Set the maximum number of consecutive 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 121 of file default_convergence_criteria.h.
References max_iterations_similar_transforms_.
|
inline |
Set the relative MSE between two consecutive sets of correspondences.
| [in] | mse_relative | the relative MSE threshold |
Definition at line 218 of file default_convergence_criteria.h.
References mse_threshold_relative_.
|
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 179 of file default_convergence_criteria.h.
References rotation_threshold_.
|
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 200 of file default_convergence_criteria.h.
References translation_threshold_.
|
protected |
The state of the convergence (e.g., why did the registration converge).
Definition at line 332 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getConvergenceState(), hasConverged(), and setConvergenceState().
|
protected |
The current set of point correspondences between the source and the target.
Definition at line 291 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), and hasConverged().
|
protected |
The MSE for the current set of correspondences.
Definition at line 297 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), and hasConverged().
|
protected |
The MSE for the previous set of correspondences.
Definition at line 294 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), and hasConverged().
|
protected |
Specifys if the registration fails or converges when the maximum number of iterations is reached.
Definition at line 305 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getFailureAfterMaximumIterations(), hasConverged(), and setFailureAfterMaximumIterations().
|
protected |
The number of iterations done by the registration loop so far.
Definition at line 283 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), and hasConverged().
|
protected |
Internal counter for the number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.
Definition at line 325 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), and hasConverged().
|
protected |
The maximum nuyyGmber of iterations that the registration loop is to be executed.
Definition at line 301 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getMaximumIterations(), hasConverged(), and setMaximumIterations().
|
protected |
The maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.
Definition at line 329 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getMaximumIterationsSimilarTransforms(), hasConverged(), and setMaximumIterationsSimilarTransforms().
|
protected |
The absolute change from the previous MSE for the current set of correspondences.
Definition at line 321 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getAbsoluteMSE(), hasConverged(), and setAbsoluteMSE().
|
protected |
The relative change from the previous MSE for the current set of correspondences, e.g.
.1 means 10% change.
Definition at line 317 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getRelativeMSE(), hasConverged(), and setRelativeMSE().
|
protected |
The rotation threshold is the relative rotation between two iterations (as angle cosine).
Definition at line 309 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getRotationThreshold(), hasConverged(), and setRotationThreshold().
|
protected |
The current transformation obtained by the transformation estimation method.
Definition at line 287 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), and hasConverged().
|
protected |
The translation threshold is the relative translation between two iterations (0 if no translation).
Definition at line 313 of file default_convergence_criteria.h.
Referenced by DefaultConvergenceCriteria(), getTranslationThreshold(), hasConverged(), and setTranslationThreshold().