point_cloud_library / 1.12.1 / classpcl_1_1registration_1_1_transformation_validation_euclidean.html /

TransformationValidationEuclidean computes an L2SQR norm between a source and target dataset. More...

#include <pcl/registration/transformation_validation_euclidean.h>

Classes

class MyPointRepresentation
Internal point representation uses only 3D coordinates for L2. More...

Public Types

using Matrix4 = typename TransformationValidation< PointSource, PointTarget, Scalar >::Matrix4
using Ptr = shared_ptr< TransformationValidation< PointSource, PointTarget, Scalar > >
using ConstPtr = shared_ptr< const TransformationValidation< PointSource, PointTarget, Scalar > >
using KdTree = pcl::search::KdTree< PointTarget >
using KdTreePtr = typename KdTree::Ptr
using PointRepresentationConstPtr = typename KdTree::PointRepresentationConstPtr
using PointCloudSourceConstPtr = typename TransformationValidation< PointSource, PointTarget >::PointCloudSourceConstPtr
using PointCloudTargetConstPtr = typename TransformationValidation< PointSource, PointTarget >::PointCloudTargetConstPtr

Public Member Functions

TransformationValidationEuclidean ()
Constructor. More...
virtual ~TransformationValidationEuclidean ()
void setMaxRange (double max_range)
Set the maximum allowable distance between a point and its correspondence in the target in order for a correspondence to be considered valid. More...
double getMaxRange ()
Get the maximum allowable distance between a point and its correspondence, as set by the user. More...
void setSearchMethodTarget (const KdTreePtr &tree, bool force_no_recompute=false)
Provide a pointer to the search object used to find correspondences in the target cloud. More...
void setThreshold (double threshold)
Set a threshold for which a specific transformation is considered valid. More...
double getThreshold ()
Get the threshold for which a specific transformation is valid. More...
double validateTransformation (const PointCloudSourceConstPtr &cloud_src, const PointCloudTargetConstPtr &cloud_tgt, const Matrix4 &transformation_matrix) const
Validate the given transformation with respect to the input cloud data, and return a score. More...
virtual bool operator() (const double &score1, const double &score2) const
Comparator function for deciding which score is better after running the validation on multiple transforms. More...
virtual bool isValid (const PointCloudSourceConstPtr &cloud_src, const PointCloudTargetConstPtr &cloud_tgt, const Matrix4 &transformation_matrix) const
Check if the score is valid for a specific transformation. More...

Protected Attributes

double max_range_
The maximum allowable distance between a point and its correspondence in the target in order for a correspondence to be considered valid. More...
double threshold_
The threshold for which a specific transformation is valid. More...
KdTreePtr tree_
A pointer to the spatial search object. More...
bool force_no_recompute_
A flag which, if set, means the tree operating on the target cloud will never be recomputed. More...

Detailed Description

template<typename PointSource, typename PointTarget, typename Scalar = float>
class pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >

TransformationValidationEuclidean computes an L2SQR norm between a source and target dataset.

To prevent points with bad correspondences to contribute to the overall score, the class also accepts a maximum_range parameter given via setMaxRange that is used as a cutoff value for nearest neighbor distance comparisons.

The output score is normalized with respect to the number of valid correspondences found.

Usage example:

pcl::TransformationValidationEuclidean<pcl::PointXYZ, pcl::PointXYZ> tve;
tve.setMaxRange (0.01); // 1cm
double score = tve.validateTransformation (source, target, transformation);
Note
The class is templated on the source and target point types as well as on the output scalar of the transformation matrix (i.e., float or double). Default: float.
Author
Radu B. Rusu

Definition at line 75 of file transformation_validation_euclidean.h.

Member Typedef Documentation

ConstPtr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::ConstPtr = shared_ptr<const TransformationValidation<PointSource, PointTarget, Scalar> >

Definition at line 82 of file transformation_validation_euclidean.h.

KdTree

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::KdTree = pcl::search::KdTree<PointTarget>

Definition at line 84 of file transformation_validation_euclidean.h.

KdTreePtr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::KdTreePtr = typename KdTree::Ptr

Definition at line 85 of file transformation_validation_euclidean.h.

Matrix4

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::Matrix4 = typename TransformationValidation<PointSource, PointTarget, Scalar>::Matrix4

Definition at line 78 of file transformation_validation_euclidean.h.

PointCloudSourceConstPtr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::PointCloudSourceConstPtr = typename TransformationValidation<PointSource, PointTarget>::PointCloudSourceConstPtr

Definition at line 91 of file transformation_validation_euclidean.h.

PointCloudTargetConstPtr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::PointCloudTargetConstPtr = typename TransformationValidation<PointSource, PointTarget>::PointCloudTargetConstPtr

Definition at line 94 of file transformation_validation_euclidean.h.

PointRepresentationConstPtr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::PointRepresentationConstPtr = typename KdTree::PointRepresentationConstPtr

Definition at line 87 of file transformation_validation_euclidean.h.

Ptr

template<typename PointSource , typename PointTarget , typename Scalar = float>
using pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::Ptr = shared_ptr<TransformationValidation<PointSource, PointTarget, Scalar> >

Definition at line 80 of file transformation_validation_euclidean.h.

Constructor & Destructor Documentation

TransformationValidationEuclidean()

template<typename PointSource , typename PointTarget , typename Scalar = float>
pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::TransformationValidationEuclidean ( )
inline

Constructor.

Sets the max_range parameter to double::max, threshold_ to NaN and initializes the internal search tree to a FLANN kd-tree.

Definition at line 100 of file transformation_validation_euclidean.h.

~TransformationValidationEuclidean()

template<typename PointSource , typename PointTarget , typename Scalar = float>
virtual pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::~TransformationValidationEuclidean ( )
inlinevirtual

Definition at line 107 of file transformation_validation_euclidean.h.

Member Function Documentation

getMaxRange()

template<typename PointSource , typename PointTarget , typename Scalar = float>
double pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::getMaxRange ( )
inline

Get the maximum allowable distance between a point and its correspondence, as set by the user.

Definition at line 123 of file transformation_validation_euclidean.h.

References pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::max_range_.

getThreshold()

template<typename PointSource , typename PointTarget , typename Scalar = float>
double pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::getThreshold ( )
inline

Get the threshold for which a specific transformation is valid.

Definition at line 158 of file transformation_validation_euclidean.h.

References pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::threshold_.

isValid()

template<typename PointSource , typename PointTarget , typename Scalar = float>
virtual bool pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::isValid ( const PointCloudSourceConstPtr & cloud_src,
const PointCloudTargetConstPtr & cloud_tgt,
const Matrix4 & transformation_matrix
) const
inlinevirtual

Check if the score is valid for a specific transformation.

Parameters
[in] cloud_src the source point cloud dataset
[in] cloud_tgt the target point cloud dataset
[out] transformation_matrix the transformation matrix
Returns
true if the transformation is valid, false otherwise.

Definition at line 201 of file transformation_validation_euclidean.h.

References pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::threshold_, and pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::validateTransformation().

operator()()

template<typename PointSource , typename PointTarget , typename Scalar = float>
virtual bool pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::operator() ( const double & score1,
const double & score2
) const
inlinevirtual

Comparator function for deciding which score is better after running the validation on multiple transforms.

Parameters
[in] score1 the first value
[in] score2 the second value
Returns
true if score1 is better than score2

Definition at line 187 of file transformation_validation_euclidean.h.

setMaxRange()

template<typename PointSource , typename PointTarget , typename Scalar = float>
void pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::setMaxRange ( double max_range )
inline

Set the maximum allowable distance between a point and its correspondence in the target in order for a correspondence to be considered valid.

Default: double::max.

Parameters
[in] max_range the new maximum allowable distance

Definition at line 114 of file transformation_validation_euclidean.h.

References pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::max_range_.

setSearchMethodTarget()

template<typename PointSource , typename PointTarget , typename Scalar = float>
void pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::setSearchMethodTarget ( const KdTreePtr & tree,
bool force_no_recompute = false
)
inline

Provide a pointer to the search object used to find correspondences in the target cloud.

Parameters
[in] tree a pointer to the spatial search object.
[in] force_no_recompute If set to true, this tree will NEVER be recomputed, regardless of calls to setInputTarget. Only use if you are confident that the tree will be set correctly.

Definition at line 136 of file transformation_validation_euclidean.h.

References pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::force_no_recompute_, and pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::tree_.

setThreshold()

template<typename PointSource , typename PointTarget , typename Scalar = float>
void pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::setThreshold ( double threshold )
inline

Set a threshold for which a specific transformation is considered valid.

Note
Since we're using MSE (Mean Squared Error) as a metric, the threshold represents the mean Euclidean distance threshold over all nearest neighbors up to max_range.
Parameters
[in] threshold the threshold for which a transformation is vali

Definition at line 151 of file transformation_validation_euclidean.h.

References pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::threshold_.

validateTransformation()

template<typename PointSource , typename PointTarget , typename Scalar >
double pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::validateTransformation ( const PointCloudSourceConstPtr & cloud_src,
const PointCloudTargetConstPtr & cloud_tgt,
const Matrix4 & transformation_matrix
) const

Validate the given transformation with respect to the input cloud data, and return a score.

Parameters
[in] cloud_src the source point cloud dataset
[in] cloud_tgt the target point cloud dataset
[out] transformation_matrix the resultant transformation matrix
Returns
the score or confidence measure for the given transformation_matrix with respect to the input data

Definition at line 51 of file transformation_validation_euclidean.hpp.

References pcl::PointCloud< PointT >::resize().

Referenced by pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::isValid().

Member Data Documentation

force_no_recompute_

template<typename PointSource , typename PointTarget , typename Scalar = float>
bool pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::force_no_recompute_
protected

A flag which, if set, means the tree operating on the target cloud will never be recomputed.

Definition at line 232 of file transformation_validation_euclidean.h.

Referenced by pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::setSearchMethodTarget().

max_range_

template<typename PointSource , typename PointTarget , typename Scalar = float>
double pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::max_range_
protected

The maximum allowable distance between a point and its correspondence in the target in order for a correspondence to be considered valid.

Default: double::max.

Definition at line 220 of file transformation_validation_euclidean.h.

Referenced by pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::getMaxRange(), and pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::setMaxRange().

threshold_

template<typename PointSource , typename PointTarget , typename Scalar = float>
double pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::threshold_
protected

tree_

template<typename PointSource , typename PointTarget , typename Scalar = float>
KdTreePtr pcl::registration::TransformationValidationEuclidean< PointSource, PointTarget, Scalar >::tree_
protected

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

© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1registration_1_1_transformation_validation_euclidean.html