Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::registration::DefaultConvergenceCriteria< Scalar > Class Template Reference

DefaultConvergenceCriteria represents an instantiation of ConvergenceCriteria, and implements the following criteria for registration loop evaluation: More...

#include <default_convergence_criteria.h>

Inheritance diagram for pcl::registration::DefaultConvergenceCriteria< Scalar >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< const
DefaultConvergenceCriteria
< Scalar > > 
ConstPtr
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 Eigen::Matrix< Scalar, 4, 4 > Matrix4
typedef boost::shared_ptr
< DefaultConvergenceCriteria
< Scalar > > 
Ptr

Public Member Functions

 DefaultConvergenceCriteria (const int &iterations, const Matrix4 &transform, const pcl::Correspondences &correspondences)
 Empty constructor. Sets: * the maximum number of iterations to 1000 * the rotation threshold to 0.256 degrees (0.99999) * the translation threshold to 0.0003 meters (3e-4^2) * the MSE relative / absolute thresholds to 0.001% and 1e-12.
double getAbsoluteMSE () const
 Get the absolute MSE between two consecutive sets of correspondences.
ConvergenceState getConvergenceState ()
 Return the convergence state after hasConverged ()
bool getFailureAfterMaximumIterations () const
 Get whether the registration will fail or converge when the maximum number of iterations is reached.
int getMaximumIterations () const
 Get the maximum number of iterations the internal optimization should run for, as set by the user.
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.
double getRelativeMSE () const
 Get the relative MSE between two consecutive sets of correspondences.
double getRotationThreshold () const
 Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user.
double getTranslationThreshold () const
 Get the rotation threshold cosine angle (maximum allowable difference between two consecutive transformations) as set by the user.
virtual bool hasConverged ()
 Check if convergence has been reached.
void setAbsoluteMSE (const double mse_absolute)
 Set the absolute MSE between two consecutive sets of correspondences.
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)
void setFailureAfterMaximumIterations (const bool failure_after_max_iter)
 Specifies if the registration fails or converges when the maximum number of iterations is reached.
void setMaximumIterations (const int nr_iterations)
 Set the maximum number of iterations the internal optimization should run for.
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.
void setRelativeMSE (const double mse_relative)
 Set the relative MSE between two consecutive sets of correspondences.
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.
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.
virtual ~DefaultConvergenceCriteria ()
 Empty destructor.

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

ConvergenceState convergence_state_
 The state of the convergence (e.g., why did the registration converge).
const pcl::Correspondencescorrespondences_
 The current set of point correspondences between the source and the target.
double correspondences_cur_mse_
 The MSE for the current set of correspondences.
double correspondences_prev_mse_
 The MSE for the previous set of correspondences.
bool failure_after_max_iter_
 Specifys if the registration fails or converges when the maximum number of iterations is reached.
const int & iterations_
 The number of iterations done by the registration loop so far.
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_
 The maximum nuyyGmber of iterations that the registration loop is to be executed.
int max_iterations_similar_transforms_
 The maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.
double mse_threshold_absolute_
 The absolute change from the previous MSE for the current set of correspondences.
double mse_threshold_relative_
 The relative change from the previous MSE for the current set of correspondences, e.g. .1 means 10% change.
double rotation_threshold_
 The rotation threshold is the relative rotation between two iterations (as angle cosine).
const Matrix4transformation_
 The current transformation obtained by the transformation estimation method.
double translation_threshold_
 The translation threshold is the relative translation between two iterations (0 if no translation).

Detailed Description

template<typename Scalar = float>
class pcl::registration::DefaultConvergenceCriteria< Scalar >

DefaultConvergenceCriteria represents an instantiation of ConvergenceCriteria, and implements the following criteria for registration loop evaluation:

* a maximum number of iterations has been reached * the transformation (R, t) cannot be further updated (the difference between current and previous is smaller than a threshold) * the Mean Squared Error (MSE) between the current set of correspondences and the previous one is smaller than some threshold (both relative and absolute tests)

Note:
Convergence is considered reached if ANY of the above criteria are met.
Author:
Radu B. Rusu

Definition at line 65 of file default_convergence_criteria.h.


Member Typedef Documentation

template<typename Scalar = float>
typedef boost::shared_ptr<const DefaultConvergenceCriteria<Scalar> > pcl::registration::DefaultConvergenceCriteria< Scalar >::ConstPtr

Reimplemented from pcl::registration::ConvergenceCriteria.

Definition at line 69 of file default_convergence_criteria.h.

template<typename Scalar = float>
typedef Eigen::Matrix<Scalar, 4, 4> pcl::registration::DefaultConvergenceCriteria< Scalar >::Matrix4

Definition at line 71 of file default_convergence_criteria.h.

template<typename Scalar = float>
typedef boost::shared_ptr<DefaultConvergenceCriteria<Scalar> > pcl::registration::DefaultConvergenceCriteria< Scalar >::Ptr

Reimplemented from pcl::registration::ConvergenceCriteria.

Definition at line 68 of file default_convergence_criteria.h.


Member Enumeration Documentation

Enumerator:
CONVERGENCE_CRITERIA_NOT_CONVERGED 
CONVERGENCE_CRITERIA_ITERATIONS 
CONVERGENCE_CRITERIA_TRANSFORM 
CONVERGENCE_CRITERIA_ABS_MSE 
CONVERGENCE_CRITERIA_REL_MSE 
CONVERGENCE_CRITERIA_NO_CORRESPONDENCES 

Definition at line 73 of file default_convergence_criteria.h.


Constructor & Destructor Documentation

template<typename Scalar = float>
pcl::registration::DefaultConvergenceCriteria< Scalar >::DefaultConvergenceCriteria ( const int &  iterations,
const Matrix4 transform,
const pcl::Correspondences correspondences 
) [inline]

Empty constructor. Sets: * the maximum number of iterations to 1000 * the rotation threshold to 0.256 degrees (0.99999) * the translation threshold to 0.0003 meters (3e-4^2) * the MSE relative / absolute thresholds to 0.001% and 1e-12.

Parameters:
[in]iterationsa reference to the number of iterations the loop has ran so far
[in]transforma reference to the current transformation obtained by the transformation evaluation
[in]correspondencesa reference to the current set of point correspondences between source and target

Definition at line 94 of file default_convergence_criteria.h.

template<typename Scalar = float>
virtual pcl::registration::DefaultConvergenceCriteria< Scalar >::~DefaultConvergenceCriteria ( ) [inline, virtual]

Empty destructor.

Definition at line 113 of file default_convergence_criteria.h.


Member Function Documentation

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::calculateMSE ( const pcl::Correspondences correspondences) const [inline, protected]

Calculate the mean squared error (MSE) of the distance for a given set of correspondences.

Parameters:
[in]correspondencesthe given set of correspondences

Definition at line 219 of file default_convergence_criteria.h.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::getAbsoluteMSE ( ) const [inline]

Get the absolute MSE between two consecutive sets of correspondences.

Definition at line 188 of file default_convergence_criteria.h.

Return the convergence state after hasConverged ()

Definition at line 197 of file default_convergence_criteria.h.

template<typename Scalar = float>
bool pcl::registration::DefaultConvergenceCriteria< Scalar >::getFailureAfterMaximumIterations ( ) const [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.

template<typename Scalar = float>
int pcl::registration::DefaultConvergenceCriteria< Scalar >::getMaximumIterations ( ) const [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.

template<typename Scalar = float>
int pcl::registration::DefaultConvergenceCriteria< Scalar >::getMaximumIterationsSimilarTransforms ( ) const [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.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::getRelativeMSE ( ) const [inline]

Get the relative MSE between two consecutive sets of correspondences.

Definition at line 178 of file default_convergence_criteria.h.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::getRotationThreshold ( ) const [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.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::getTranslationThreshold ( ) const [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.

template<typename Scalar >
bool pcl::registration::DefaultConvergenceCriteria< Scalar >::hasConverged ( ) [virtual]

Check if convergence has been reached.

Implements pcl::registration::ConvergenceCriteria.

Definition at line 47 of file default_convergence_criteria.hpp.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setAbsoluteMSE ( const double  mse_absolute) [inline]

Set the absolute MSE between two consecutive sets of correspondences.

Parameters:
[in]mse_absolutethe relative MSE threshold

Definition at line 184 of file default_convergence_criteria.h.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setConvergenceState ( ConvergenceState  c) [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)

Parameters:
[in]cthe convergence state

Definition at line 208 of file default_convergence_criteria.h.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setFailureAfterMaximumIterations ( const bool  failure_after_max_iter) [inline]

Specifies if the registration fails or converges when the maximum number of iterations is reached.

Parameters:
[in]failure_after_max_iterIf true, the registration fails. If false, the registration is assumed to have converged.

Definition at line 142 of file default_convergence_criteria.h.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setMaximumIterations ( const int  nr_iterations) [inline]

Set the maximum number of iterations the internal optimization should run for.

Parameters:
[in]nr_iterationsthe maximum number of iterations the internal optimization should run for

Definition at line 132 of file default_convergence_criteria.h.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setMaximumIterationsSimilarTransforms ( const int  nr_iterations) [inline]

Set the maximum number of iterations that the internal rotation, translation, and MSE differences are allowed to be similar.

Parameters:
[in]nr_iterationsthe maximum number of iterations

Definition at line 120 of file default_convergence_criteria.h.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setRelativeMSE ( const double  mse_relative) [inline]

Set the relative MSE between two consecutive sets of correspondences.

Parameters:
[in]mse_relativethe relative MSE threshold

Definition at line 174 of file default_convergence_criteria.h.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setRotationThreshold ( const double  threshold) [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.

Parameters:
[in]thresholdthe 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.

template<typename Scalar = float>
void pcl::registration::DefaultConvergenceCriteria< Scalar >::setTranslationThreshold ( const double  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.

Parameters:
[in]thresholdthe 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.


Member Data Documentation

The state of the convergence (e.g., why did the registration converge).

Definition at line 270 of file default_convergence_criteria.h.

template<typename Scalar = float>
const pcl::Correspondences& pcl::registration::DefaultConvergenceCriteria< Scalar >::correspondences_ [protected]

The current set of point correspondences between the source and the target.

Definition at line 235 of file default_convergence_criteria.h.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::correspondences_cur_mse_ [protected]

The MSE for the current set of correspondences.

Definition at line 241 of file default_convergence_criteria.h.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::correspondences_prev_mse_ [protected]

The MSE for the previous set of correspondences.

Definition at line 238 of file default_convergence_criteria.h.

template<typename Scalar = float>
bool pcl::registration::DefaultConvergenceCriteria< Scalar >::failure_after_max_iter_ [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.

template<typename Scalar = float>
const int& pcl::registration::DefaultConvergenceCriteria< Scalar >::iterations_ [protected]

The number of iterations done by the registration loop so far.

Definition at line 229 of file default_convergence_criteria.h.

template<typename Scalar = float>
int pcl::registration::DefaultConvergenceCriteria< Scalar >::iterations_similar_transforms_ [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.

template<typename Scalar = float>
int pcl::registration::DefaultConvergenceCriteria< Scalar >::max_iterations_ [protected]

The maximum nuyyGmber of iterations that the registration loop is to be executed.

Definition at line 244 of file default_convergence_criteria.h.

template<typename Scalar = float>
int pcl::registration::DefaultConvergenceCriteria< Scalar >::max_iterations_similar_transforms_ [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.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::mse_threshold_absolute_ [protected]

The absolute change from the previous MSE for the current set of correspondences.

Definition at line 259 of file default_convergence_criteria.h.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::mse_threshold_relative_ [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.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::rotation_threshold_ [protected]

The rotation threshold is the relative rotation between two iterations (as angle cosine).

Definition at line 250 of file default_convergence_criteria.h.

template<typename Scalar = float>
const Matrix4& pcl::registration::DefaultConvergenceCriteria< Scalar >::transformation_ [protected]

The current transformation obtained by the transformation estimation method.

Definition at line 232 of file default_convergence_criteria.h.

template<typename Scalar = float>
double pcl::registration::DefaultConvergenceCriteria< Scalar >::translation_threshold_ [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.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:46:16