40#ifndef PCL_REGISTRATION_DEFAULT_CONVERGENCE_CRITERIA_HPP_
41#define PCL_REGISTRATION_DEFAULT_CONVERGENCE_CRITERIA_HPP_
43#include <pcl/console/print.h>
49template <
typename Scalar>
59 bool is_similar =
false;
61 PCL_DEBUG(
"[pcl::DefaultConvergenceCriteria::hasConverged] Iteration %d out of %d.\n",
80 PCL_DEBUG(
"[pcl::DefaultConvergenceCriteria::hasConverged] Current transformation "
81 "gave %f rotation (cosine) and %f translation.\n",
95 PCL_DEBUG(
"[pcl::DefaultConvergenceCriteria::hasConverged] Previous / Current MSE "
96 "for correspondences distances is: INIT / %f.\n",
100 PCL_DEBUG(
"[pcl::DefaultConvergenceCriteria::hasConverged] Previous / Current MSE "
101 "for correspondences distances is: %f / %f.\n",
ConvergenceState convergence_state_
The state of the convergence (e.g., why did the registration converge).
int iterations_similar_transforms_
Internal counter for the number of iterations that the internal rotation, translation,...
double correspondences_cur_mse_
The MSE for the current set of correspondences.
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.
const int & iterations_
The number of iterations done by the registration loop so far.
int max_iterations_
The maximum nuyyGmber of iterations that the registration loop is to be executed.
double translation_threshold_
The translation threshold is the relative translation between two iterations (0 if no translation).
double mse_threshold_absolute_
The absolute change from the previous MSE for the current set of correspondences.
bool hasConverged() override
Check if convergence has been reached.
double calculateMSE(const pcl::Correspondences &correspondences) const
Calculate the mean squared error (MSE) of the distance for a given set of correspondences.
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 mse_threshold_relative_
The relative change from the previous MSE for the current set of correspondences, e....
double correspondences_prev_mse_
The MSE for the previous set of correspondences.
@ CONVERGENCE_CRITERIA_TRANSFORM
@ CONVERGENCE_CRITERIA_ITERATIONS
@ CONVERGENCE_CRITERIA_ABS_MSE
@ CONVERGENCE_CRITERIA_FAILURE_AFTER_MAX_ITERATIONS
@ CONVERGENCE_CRITERIA_REL_MSE
@ CONVERGENCE_CRITERIA_NOT_CONVERGED
int max_iterations_similar_transforms_
The maximum number of iterations that the internal rotation, translation, and MSE differences are all...