Point Cloud Library (PCL)  1.14.0-dev
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
pcl::registration::CorrespondenceRejectorFeatures Class Reference

CorrespondenceRejectorFeatures implements a correspondence rejection method based on a set of feature descriptors. More...

#include <pcl/registration/correspondence_rejection_features.h>

+ Inheritance diagram for pcl::registration::CorrespondenceRejectorFeatures:
+ Collaboration diagram for pcl::registration::CorrespondenceRejectorFeatures:

Classes

class  FeatureContainer
 An inner class containing pointers to the source and target feature clouds and the parameters needed to perform the correspondence search. More...
 
class  FeatureContainerInterface
 

Public Types

using Ptr = shared_ptr< CorrespondenceRejectorFeatures >
 
using ConstPtr = shared_ptr< const CorrespondenceRejectorFeatures >
 
- Public Types inherited from pcl::registration::CorrespondenceRejector
using Ptr = shared_ptr< CorrespondenceRejector >
 
using ConstPtr = shared_ptr< const CorrespondenceRejector >
 

Public Member Functions

 CorrespondenceRejectorFeatures ()
 Empty constructor. More...
 
 ~CorrespondenceRejectorFeatures () override=default
 Empty destructor. More...
 
void getRemainingCorrespondences (const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences) override
 Get a list of valid correspondences after rejection from the original set of correspondences. More...
 
template<typename FeatureT >
void setSourceFeature (const typename pcl::PointCloud< FeatureT >::ConstPtr &source_feature, const std::string &key)
 Provide a pointer to a cloud of feature descriptors associated with the source point cloud. More...
 
template<typename FeatureT >
pcl::PointCloud< FeatureT >::ConstPtr getSourceFeature (const std::string &key)
 Get a pointer to the source cloud's feature descriptors, specified by the given key. More...
 
template<typename FeatureT >
void setTargetFeature (const typename pcl::PointCloud< FeatureT >::ConstPtr &target_feature, const std::string &key)
 Provide a pointer to a cloud of feature descriptors associated with the target point cloud. More...
 
template<typename FeatureT >
pcl::PointCloud< FeatureT >::ConstPtr getTargetFeature (const std::string &key)
 Get a pointer to the source cloud's feature descriptors, specified by the given key. More...
 
template<typename FeatureT >
void setDistanceThreshold (double thresh, const std::string &key)
 Set a hard distance threshold in the feature FeatureT space, between source and target features. More...
 
bool hasValidFeatures ()
 Test that all features are valid (i.e., does each key have a valid source cloud, target cloud, and search method) More...
 
template<typename FeatureT >
void setFeatureRepresentation (const typename pcl::PointRepresentation< FeatureT >::ConstPtr &fr, const std::string &key)
 Provide a boost shared pointer to a PointRepresentation to be used when comparing features. More...
 
- Public Member Functions inherited from pcl::registration::CorrespondenceRejector
 CorrespondenceRejector ()=default
 Empty constructor. More...
 
virtual ~CorrespondenceRejector ()=default
 Empty destructor. More...
 
virtual void setInputCorrespondences (const CorrespondencesConstPtr &correspondences)
 Provide a pointer to the vector of the input correspondences. More...
 
CorrespondencesConstPtr getInputCorrespondences ()
 Get a pointer to the vector of the input correspondences. More...
 
void getCorrespondences (pcl::Correspondences &correspondences)
 Run correspondence rejection. More...
 
void getRejectedQueryIndices (const pcl::Correspondences &correspondences, pcl::Indices &indices)
 Determine the indices of query points of correspondences that have been rejected, i.e., the difference between the input correspondences (set via setInputCorrespondences) and the given correspondence vector. More...
 
const std::string & getClassName () const
 Get a string representation of the name of this class. More...
 
virtual bool requiresSourcePoints () const
 See if this rejector requires source points. More...
 
virtual void setSourcePoints (pcl::PCLPointCloud2::ConstPtr)
 Abstract method for setting the source cloud. More...
 
virtual bool requiresSourceNormals () const
 See if this rejector requires source normals. More...
 
virtual void setSourceNormals (pcl::PCLPointCloud2::ConstPtr)
 Abstract method for setting the source normals. More...
 
virtual bool requiresTargetPoints () const
 See if this rejector requires a target cloud. More...
 
virtual void setTargetPoints (pcl::PCLPointCloud2::ConstPtr)
 Abstract method for setting the target cloud. More...
 
virtual bool requiresTargetNormals () const
 See if this rejector requires target normals. More...
 
virtual void setTargetNormals (pcl::PCLPointCloud2::ConstPtr)
 Abstract method for setting the target normals. More...
 

Protected Types

using FeaturesMap = std::unordered_map< std::string, FeatureContainerInterface::Ptr >
 

Protected Member Functions

void applyRejection (pcl::Correspondences &correspondences) override
 Apply the rejection algorithm. More...
 

Protected Attributes

float max_distance_
 The maximum distance threshold between two correspondent points in source <-> target. More...
 
FeaturesMap features_map_
 An STL map containing features to use when performing the correspondence search. More...
 
- Protected Attributes inherited from pcl::registration::CorrespondenceRejector
std::string rejection_name_ {}
 The name of the rejection method. More...
 
CorrespondencesConstPtr input_correspondences_
 The input correspondences. More...
 

Detailed Description

CorrespondenceRejectorFeatures implements a correspondence rejection method based on a set of feature descriptors.

Given an input feature space, the method checks if each feature in the source cloud has a correspondence in the target cloud, either by checking the first K (given) point correspondences, or by defining a tolerance threshold via a radius in feature space.

Todo:
explain this better.
Author
Radu B. Rusu

Definition at line 58 of file correspondence_rejection_features.h.

Member Typedef Documentation

◆ ConstPtr

Definition at line 65 of file correspondence_rejection_features.h.

◆ FeaturesMap

Definition at line 176 of file correspondence_rejection_features.h.

◆ Ptr

Definition at line 64 of file correspondence_rejection_features.h.

Constructor & Destructor Documentation

◆ CorrespondenceRejectorFeatures()

pcl::registration::CorrespondenceRejectorFeatures::CorrespondenceRejectorFeatures ( )
inline

Empty constructor.

Definition at line 68 of file correspondence_rejection_features.h.

◆ ~CorrespondenceRejectorFeatures()

pcl::registration::CorrespondenceRejectorFeatures::~CorrespondenceRejectorFeatures ( )
overridedefault

Empty destructor.

Member Function Documentation

◆ applyRejection()

void pcl::registration::CorrespondenceRejectorFeatures::applyRejection ( pcl::Correspondences correspondences)
inlineoverrideprotectedvirtual

Apply the rejection algorithm.

Parameters
[out]correspondencesthe set of resultant correspondences.

Implements pcl::registration::CorrespondenceRejector.

Definition at line 151 of file correspondence_rejection_features.h.

◆ getRemainingCorrespondences()

void pcl::registration::CorrespondenceRejectorFeatures::getRemainingCorrespondences ( const pcl::Correspondences original_correspondences,
pcl::Correspondences remaining_correspondences 
)
overridevirtual

Get a list of valid correspondences after rejection from the original set of correspondences.

Parameters
[in]original_correspondencesthe set of initial correspondences given
[out]remaining_correspondencesthe resultant filtered set of remaining correspondences

Implements pcl::registration::CorrespondenceRejector.

◆ getSourceFeature()

template<typename FeatureT >
pcl::PointCloud< FeatureT >::ConstPtr pcl::registration::CorrespondenceRejectorFeatures::getSourceFeature ( const std::string &  key)
inline

Get a pointer to the source cloud's feature descriptors, specified by the given key.

Parameters
[in]keya string that uniquely identifies the feature (must match the key provided by setSourceFeature)

Definition at line 64 of file correspondence_rejection_features.hpp.

References features_map_.

◆ getTargetFeature()

template<typename FeatureT >
pcl::PointCloud< FeatureT >::ConstPtr pcl::registration::CorrespondenceRejectorFeatures::getTargetFeature ( const std::string &  key)
inline

Get a pointer to the source cloud's feature descriptors, specified by the given key.

Parameters
[in]keya string that uniquely identifies the feature (must match the key provided by setTargetFeature)

Definition at line 86 of file correspondence_rejection_features.hpp.

References features_map_.

◆ hasValidFeatures()

bool pcl::registration::CorrespondenceRejectorFeatures::hasValidFeatures ( )
inline

Test that all features are valid (i.e., does each key have a valid source cloud, target cloud, and search method)

◆ setDistanceThreshold()

template<typename FeatureT >
void pcl::registration::CorrespondenceRejectorFeatures::setDistanceThreshold ( double  thresh,
const std::string &  key 
)
inline

Set a hard distance threshold in the feature FeatureT space, between source and target features.

Any feature correspondence that is above this threshold will be considered bad and will be filtered out.

Parameters
[in]threshthe distance threshold
[in]keya string that uniquely identifies the feature

Definition at line 96 of file correspondence_rejection_features.hpp.

References features_map_.

◆ setFeatureRepresentation()

template<typename FeatureT >
void pcl::registration::CorrespondenceRejectorFeatures::setFeatureRepresentation ( const typename pcl::PointRepresentation< FeatureT >::ConstPtr fr,
const std::string &  key 
)
inline

Provide a boost shared pointer to a PointRepresentation to be used when comparing features.

Parameters
[in]keya string that uniquely identifies the feature
[in]frthe point feature representation to be used

Definition at line 107 of file correspondence_rejection_features.hpp.

References features_map_.

◆ setSourceFeature()

template<typename FeatureT >
void pcl::registration::CorrespondenceRejectorFeatures::setSourceFeature ( const typename pcl::PointCloud< FeatureT >::ConstPtr source_feature,
const std::string &  key 
)
inline

Provide a pointer to a cloud of feature descriptors associated with the source point cloud.

Parameters
[in]source_featurea cloud of feature descriptors associated with the source point cloud
[in]keya string that uniquely identifies the feature

Definition at line 52 of file correspondence_rejection_features.hpp.

References features_map_.

◆ setTargetFeature()

template<typename FeatureT >
void pcl::registration::CorrespondenceRejectorFeatures::setTargetFeature ( const typename pcl::PointCloud< FeatureT >::ConstPtr target_feature,
const std::string &  key 
)
inline

Provide a pointer to a cloud of feature descriptors associated with the target point cloud.

Parameters
[in]target_featurea cloud of feature descriptors associated with the target point cloud
[in]keya string that uniquely identifies the feature

Definition at line 74 of file correspondence_rejection_features.hpp.

References features_map_.

Member Data Documentation

◆ features_map_

FeaturesMap pcl::registration::CorrespondenceRejectorFeatures::features_map_
protected

An STL map containing features to use when performing the correspondence search.

Definition at line 180 of file correspondence_rejection_features.h.

Referenced by getSourceFeature(), getTargetFeature(), setDistanceThreshold(), setFeatureRepresentation(), setSourceFeature(), and setTargetFeature().

◆ max_distance_

float pcl::registration::CorrespondenceRejectorFeatures::max_distance_
protected

The maximum distance threshold between two correspondent points in source <-> target.

If the distance is larger than this threshold, the points will not be ignored in the alignment process.

Definition at line 160 of file correspondence_rejection_features.h.


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