Loading...
Searching...
No Matches
pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar > Class Template Reference
Module registration

CorrespondenceEstimation represents a simple class for determining correspondences between target and query point sets/features, using nearest neighbor search. More...

`#include <pcl/registration/correspondence_estimation.h>`

Inheritance diagram for pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >:

## Public Types

using | Ptr = shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar>>
using | ConstPtr
using | KdTree
using | KdTreePtr
using | KdTreeConstPtr
using | KdTreeReciprocal
using | KdTreeReciprocalPtr
using | KdTreeReciprocalConstPtr
using | PointCloudSource = pcl::PointCloud<PointSource>
using | PointCloudSourcePtr = typename PointCloudSource::Ptr
using | PointCloudSourceConstPtr = typename PointCloudSource::ConstPtr
using | PointCloudTarget = pcl::PointCloud<PointTarget>
using | PointCloudTargetPtr = typename PointCloudTarget::Ptr
using | PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr
using | PointRepresentationConstPtr = typename KdTree::PointRepresentationConstPtr
using | PointRepresentationReciprocalConstPtr
Public Types inherited from pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >
using | Ptr
using | ConstPtr
using | KdTree
using | KdTreePtr
using | KdTreeConstPtr
using | KdTreeReciprocal
using | KdTreeReciprocalPtr
using | KdTreeReciprocalConstPtr
using | PointCloudSource
using | PointCloudSourcePtr
using | PointCloudSourceConstPtr
using | PointCloudTarget
using | PointCloudTargetPtr
using | PointCloudTargetConstPtr
using | PointRepresentationConstPtr
using | PointRepresentationReciprocalConstPtr
Public Types inherited from pcl::PCLBase< PointSource >
using | PointCloud
using | PointCloudPtr
using | PointCloudConstPtr
using | PointIndicesPtr
using | PointIndicesConstPtr

## Public Member Functions

| CorrespondenceEstimation ()
| Empty constructor.
| ~CorrespondenceEstimation () override=default
| Empty destructor.
void | determineCorrespondences (pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
| Determine the correspondences between input and target cloud.
void | determineReciprocalCorrespondences (pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
| Determine the reciprocal correspondences between input and target cloud.
CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr | clone () const override
| Clone and cast to CorrespondenceEstimationBase.
Public Member Functions inherited from pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >
| CorrespondenceEstimationBase ()
| Empty constructor.
| ~CorrespondenceEstimationBase () override=default
| Empty destructor.
void | setInputSource (const PointCloudSourceConstPtr &cloud)
| Provide a pointer to the input source (e.g., the point cloud that we want to align to the target).
PointCloudSourceConstPtr const | getInputSource ()
| Get a pointer to the input point cloud dataset target.
void | setInputTarget (const PointCloudTargetConstPtr &cloud)
| Provide a pointer to the input target (e.g., the point cloud that we want to align the input source to).
PointCloudTargetConstPtr const | getInputTarget ()
| Get a pointer to the input point cloud dataset target.
void | setNumberOfThreads (unsigned int nr_threads)
| Set the number of threads to use.
virtual bool | requiresSourceNormals () const
| See if this rejector requires source normals.
virtual void | setSourceNormals (pcl::PCLPointCloud2::ConstPtr)
| Abstract method for setting the source normals.
virtual bool | requiresTargetNormals () const
| See if this rejector requires target normals.
virtual void | setTargetNormals (pcl::PCLPointCloud2::ConstPtr)
| Abstract method for setting the target normals.
void | setIndicesSource (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represent the input source point cloud.
IndicesPtr const | getIndicesSource ()
| Get a pointer to the vector of indices used for the source dataset.
void | setIndicesTarget (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represent the input target point cloud.
IndicesPtr const | getIndicesTarget ()
| Get a pointer to the vector of indices used for the target dataset.
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.
KdTreePtr | getSearchMethodTarget () const
| Get a pointer to the search method used to find correspondences in the target cloud.
void | setSearchMethodSource (const KdTreeReciprocalPtr &tree, bool force_no_recompute=false)
| Provide a pointer to the search object used to find correspondences in the source cloud (usually used by reciprocal correspondence finding).
KdTreeReciprocalPtr | getSearchMethodSource () const
| Get a pointer to the search method used to find correspondences in the source cloud.
void | setPointRepresentation (const PointRepresentationConstPtr &point_representation)
| Provide a boost shared pointer to the PointRepresentation for target cloud to be used when searching for nearest neighbors.
void | setPointRepresentationReciprocal (const PointRepresentationReciprocalConstPtr &point_representation_reciprocal)
| Provide a boost shared pointer to the PointRepresentation for source cloud to be used when searching for nearest neighbors.
Public Member Functions inherited from pcl::PCLBase< PointSource >
| PCLBase ()
| Empty constructor.
virtual | ~PCLBase ()=default
| Destructor.
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Provide a pointer to the input dataset.
PointCloudConstPtr const | getInputCloud () const
| Get a pointer to the input point cloud dataset.
virtual void | setIndices (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represents the input data.
IndicesPtr | getIndices ()
| Get a pointer to the vector of indices used.
const PointSource & | operator[] (std::size_t pos) const
| Override PointCloud operator[] to shorten code.

## Additional Inherited Members

Protected Member Functions inherited from pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >
const std::string & | getClassName () const
| Abstract class get name method.
bool | initCompute ()
| Internal computation initialization.
bool | initComputeReciprocal ()
| Internal computation initialization for reciprocal correspondences.
Protected Member Functions inherited from pcl::PCLBase< PointSource >
bool | initCompute ()
| This method should get called before starting the actual computation.
bool | deinitCompute ()
| This method should get called after finishing the actual computation.
Protected Attributes inherited from pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >
std::string | corr_name_
| The correspondence estimation method name.
KdTreePtr | tree_
| A pointer to the spatial search object used for the target dataset.
KdTreeReciprocalPtr | tree_reciprocal_
| A pointer to the spatial search object used for the source dataset.
PointCloudTargetConstPtr | target_
| The input point cloud dataset target.
IndicesPtr | target_indices_
| The target point cloud dataset indices.
PointRepresentationConstPtr | point_representation_
| The target point representation used (internal).
PointRepresentationReciprocalConstPtr | point_representation_reciprocal_
| The source point representation used (internal).
PointCloudTargetPtr | input_transformed_
| The transformed input source point cloud dataset.
std::vector< pcl::PCLPointField > | input_fields_
| The types of input point fields available.
bool | target_cloud_updated_
| Variable that stores whether we have a new target cloud, meaning we need to pre-process it again.
bool | source_cloud_updated_
| Variable that stores whether we have a new source cloud, meaning we need to pre-process it again.
bool | force_no_recompute_
| A flag which, if set, means the tree operating on the target cloud will never be recomputed.
bool | force_no_recompute_reciprocal_
| A flag which, if set, means the tree operating on the source cloud will never be recomputed.
unsigned int | num_threads_
Protected Attributes inherited from pcl::PCLBase< PointSource >
PointCloudConstPtr | input_
| The input point cloud dataset.
IndicesPtr | indices_
| A pointer to the vector of point indices to use.
bool | use_indices_
| Set to true if point indices are used.
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud.

## Detailed Description

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

CorrespondenceEstimation represents a simple class for determining correspondences between target and query point sets/features, using nearest neighbor search.

Code example:

pcl::PointCloud<pcl::PointXYZRGBA>::Ptr source, target;
// ... read or fill in source and target
pcl::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointXYZ> est;
est.setInputSource (source);
est.setInputTarget (target);
pcl::Correspondences all_correspondences;
// Determine all reciprocal correspondences
est.determineReciprocalCorrespondences (all_correspondences);
pcl::PointCloud::Ptr
shared_ptr< PointCloud< PointT > > Ptr
Definition point_cloud.h:414
pcl::Correspondences
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Definition correspondence.h:89

Author
  Radu B. Rusu, Michael Dixon, Dirk Holz

Definition at line 408 of file correspondence_estimation.h.

## Member Typedef Documentation

## ConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::ConstPtr

Initial value:
shared_ptr<const CorrespondenceEstimation<PointSource, PointTarget, Scalar>>

Definition at line 412 of file correspondence_estimation.h.

## KdTree

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::KdTree

Initial value:
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::KdTree
pcl::registration::CorrespondenceEstimationBase::KdTree
pcl::search::KdTree< PointTarget > KdTree
Definition correspondence_estimation.h:73

Definition at line 434 of file correspondence_estimation.h.

## KdTreeConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::KdTreeConstPtr

Initial value:
typename CorrespondenceEstimationBase<PointSource,
PointTarget,
Scalar>::KdTreeConstPtr
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::CorrespondenceEstimationBase
CorrespondenceEstimationBase()
Definition correspondence_estimation.h:94
pcl::registration::CorrespondenceEstimation::KdTreeConstPtr
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreeConstPtr KdTreeConstPtr
Definition correspondence_estimation.h:439

Definition at line 439 of file correspondence_estimation.h.

## KdTreePtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::KdTreePtr

Initial value:
typename CorrespondenceEstimationBase<PointSource,
PointTarget,
Scalar>::KdTreePtr
pcl::registration::CorrespondenceEstimation::KdTreePtr
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreePtr KdTreePtr
Definition correspondence_estimation.h:436

Definition at line 436 of file correspondence_estimation.h.

## KdTreeReciprocal

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::KdTreeReciprocal

Initial value:
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::
KdTreeReciprocal

Definition at line 442 of file correspondence_estimation.h.

## KdTreeReciprocalConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::KdTreeReciprocalConstPtr

Initial value:
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::
KdTreeReciprocalConstPtr

Definition at line 449 of file correspondence_estimation.h.

## KdTreeReciprocalPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::KdTreeReciprocalPtr

Initial value:
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::
KdTreeReciprocalPtr

Definition at line 445 of file correspondence_estimation.h.

## PointCloudSource

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointCloudSource = pcl::PointCloud<PointSource>

Definition at line 453 of file correspondence_estimation.h.

## PointCloudSourceConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointCloudSourceConstPtr = typename PointCloudSource::ConstPtr

Definition at line 455 of file correspondence_estimation.h.

## PointCloudSourcePtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointCloudSourcePtr = typename PointCloudSource::Ptr

Definition at line 454 of file correspondence_estimation.h.

## PointCloudTarget

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointCloudTarget = pcl::PointCloud<PointTarget>

Definition at line 457 of file correspondence_estimation.h.

## PointCloudTargetConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr

Definition at line 459 of file correspondence_estimation.h.

## PointCloudTargetPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointCloudTargetPtr = typename PointCloudTarget::Ptr

Definition at line 458 of file correspondence_estimation.h.

## PointRepresentationConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointRepresentationConstPtr = typename KdTree::PointRepresentationConstPtr

Definition at line 461 of file correspondence_estimation.h.

## PointRepresentationReciprocalConstPtr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::PointRepresentationReciprocalConstPtr

Initial value:
typename KdTreeReciprocal::PointRepresentationConstPtr
pcl::search::KdTree< PointSource >::PointRepresentationConstPtr
typename PointRepresentation< PointSource >::ConstPtr PointRepresentationConstPtr
Definition kdtree.h:80

Definition at line 462 of file correspondence_estimation.h.

## Ptr

template<typename PointSource, typename PointTarget, typename Scalar = float>

using pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::Ptr = shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar>>

Definition at line 411 of file correspondence_estimation.h.

## Constructor & Destructor Documentation

## CorrespondenceEstimation()

template<typename PointSource, typename PointTarget, typename Scalar = float>

pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::CorrespondenceEstimation | ( |  | ) |

inline

Empty constructor.

Definition at line 466 of file correspondence_estimation.h.

References pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::corr_name_.

Referenced by clone().

## ~CorrespondenceEstimation()

template<typename PointSource, typename PointTarget, typename Scalar = float>

pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::~CorrespondenceEstimation | ( |  | ) |

override default

Empty destructor.

## Member Function Documentation

## clone()

template<typename PointSource, typename PointTarget, typename Scalar = float>

CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::clone | ( |  | ) | const

inline override virtual

Clone and cast to CorrespondenceEstimationBase.

Implements pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >.

Definition at line 496 of file correspondence_estimation.h.

References CorrespondenceEstimation().

## determineCorrespondences()

template<typename PointSource, typename PointTarget, typename Scalar>

void pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::determineCorrespondences | ( | pcl::Correspondences & | correspondences,
|  | double | max_distance = std::numeric_limits<double>::max() )

override virtual

Determine the correspondences between input and target cloud.

Parameters

  [out] | correspondences | the found correspondences (index of query point, index of target point, distance)
  [in] | max_distance | maximum allowed distance between correspondences

Implements pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >.

Definition at line 147 of file correspondence_estimation.hpp.

References pcl::PCLBase< PointSource >::deinitCompute(), pcl::Correspondence::distance, pcl::Correspondence::index_match, pcl::Correspondence::index_query, pcl::PCLBase< PointSource >::indices_, pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::initCompute(), pcl::PCLBase< PointSource >::input_, pcl::isXYZFinite(), pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::num_threads_, pcl::registration::detail::pointCopyOrRef(), and pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::tree_.

Referenced by pcl::GeneralizedIterativeClosestPoint< PointSource, PointTarget, Scalar >::computeTransformation().

## determineReciprocalCorrespondences()

template<typename PointSource, typename PointTarget, typename Scalar>

void pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >::determineReciprocalCorrespondences | ( | pcl::Correspondences & | correspondences,
|  | double | max_distance = std::numeric_limits<double>::max() )

override virtual

Determine the reciprocal correspondences between input and target cloud.

A correspondence is considered reciprocal if both Src_i has Tgt_i as a correspondence, and Tgt_i has Src_i as one.

Parameters

  [out] | correspondences | the found correspondences (index of query and target point, distance)
  [in] | max_distance | maximum allowed distance between correspondences

Implements pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >.

Definition at line 222 of file correspondence_estimation.hpp.

References pcl::PCLBase< PointSource >::deinitCompute(), pcl::Correspondence::distance, pcl::Correspondence::index_match, pcl::Correspondence::index_query, pcl::PCLBase< PointSource >::indices_, pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::initCompute(), pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::initComputeReciprocal(), pcl::PCLBase< PointSource >::input_, pcl::isXYZFinite(), pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::num_threads_, pcl::registration::detail::pointCopyOrRef(), pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::target_, pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::tree_, and pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::tree_reciprocal_.

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

- pcl/registration/correspondence_estimation.h
- pcl/registration/impl/correspondence_estimation.hpp