|
Point Cloud Library (PCL) 1.15.0
|
Abstract base class for Correspondence Grouping algorithms. More...
#include <pcl/recognition/cg/correspondence_grouping.h>
Public Types | |
| using | SceneCloud = pcl::PointCloud<PointSceneT> |
| using | SceneCloudPtr = typename SceneCloud::Ptr |
| using | SceneCloudConstPtr = typename SceneCloud::ConstPtr |
| Public Types inherited from pcl::PCLBase< PointModelT > | |
| using | PointCloud |
| using | PointCloudPtr |
| using | PointCloudConstPtr |
| using | PointIndicesPtr |
| using | PointIndicesConstPtr |
Public Member Functions | |
| CorrespondenceGrouping () | |
| Empty constructor. | |
| ~CorrespondenceGrouping () override | |
| destructor. | |
| virtual void | setSceneCloud (const SceneCloudConstPtr &scene) |
| Provide a pointer to the scene dataset. | |
| SceneCloudConstPtr | getSceneCloud () const |
| Getter for the scene dataset. | |
| virtual void | setModelSceneCorrespondences (const CorrespondencesConstPtr &corrs) |
| Provide a pointer to the precomputed correspondences between points in the input dataset and points in the scene dataset. | |
| CorrespondencesConstPtr | getModelSceneCorrespondences () const |
| Getter for the precomputed correspondences between points in the input dataset and points in the scene dataset. | |
| std::vector< double > | getCharacteristicScales () const |
| Getter for the vector of characteristic scales associated to each cluster. | |
| void | cluster (std::vector< Correspondences > &clustered_corrs) |
| Clusters the input correspondences belonging to different model instances. | |
| Public Member Functions inherited from pcl::PCLBase< PointModelT > | |
| 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 PointModelT & | operator[] (std::size_t pos) const |
| Override PointCloud operator[] to shorten code. | |
Protected Member Functions | |
| virtual void | clusterCorrespondences (std::vector< Correspondences > &clustered_corrs)=0 |
| The actual clustering method, should be implemented by each subclass. | |
| 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 Member Functions inherited from pcl::PCLBase< PointModelT > | |
| 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 | |
| SceneCloudConstPtr | scene_ |
| The scene cloud. | |
| CorrespondencesConstPtr | model_scene_corrs_ |
| The correspondences between points in the input and the scene datasets. | |
| std::vector< double > | corr_group_scale_ |
| characteristic scale associated to each correspondence subset; if the cg algorithm can not handle scale invariance, the size of the vector will be 0. | |
| Protected Attributes inherited from pcl::PCLBase< PointModelT > | |
| 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. | |
Abstract base class for Correspondence Grouping algorithms.
Definition at line 54 of file correspondence_grouping.h.
| using pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::SceneCloud = pcl::PointCloud<PointSceneT> |
Definition at line 57 of file correspondence_grouping.h.
| using pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::SceneCloudConstPtr = typename SceneCloud::ConstPtr |
Definition at line 59 of file correspondence_grouping.h.
| using pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::SceneCloudPtr = typename SceneCloud::Ptr |
Definition at line 58 of file correspondence_grouping.h.
|
inline |
|
inlineoverride |
destructor.
Definition at line 65 of file correspondence_grouping.h.
References model_scene_corrs_, and scene_.
| void pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::cluster | ( | std::vector< Correspondences > & | clustered_corrs | ) |
Clusters the input correspondences belonging to different model instances.
| [out] | clustered_corrs | a vector containing the correspondences for each instance of the model found within the input data. |
Definition at line 49 of file correspondence_grouping.hpp.
References clusterCorrespondences(), corr_group_scale_, deinitCompute(), and initCompute().
|
protectedpure virtual |
The actual clustering method, should be implemented by each subclass.
| [out] | clustered_corrs | a vector containing the correspondences for each instance of the model found within the input data. |
Implemented in pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >.
Referenced by cluster().
|
inlineprotected |
This method should get called after finishing the actual computation.
Definition at line 191 of file correspondence_grouping.h.
Referenced by cluster(), pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::recognize(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::recognize().
|
inline |
Getter for the vector of characteristic scales associated to each cluster.
Definition at line 119 of file correspondence_grouping.h.
References corr_group_scale_.
|
inline |
Getter for the precomputed correspondences between points in the input dataset and points in the scene dataset.
Definition at line 109 of file correspondence_grouping.h.
References model_scene_corrs_.
|
inline |
Getter for the scene dataset.
Definition at line 86 of file correspondence_grouping.h.
References scene_.
|
inlineprotected |
This method should get called before starting the actual computation.
Internally, initCompute() does the following:
Definition at line 159 of file correspondence_grouping.h.
References pcl::PCLBase< PointT >::initCompute(), pcl::PCLBase< PointModelT >::input_, model_scene_corrs_, and scene_.
Referenced by cluster(), pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::recognize(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::recognize().
|
inlinevirtual |
Provide a pointer to the precomputed correspondences between points in the input dataset and points in the scene dataset.
The correspondences are going to be clustered into different model hypotheses by the algorithm.
| [in] | corrs | the correspondences between the model and the scene. |
Reimplemented in pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >.
Definition at line 98 of file correspondence_grouping.h.
References model_scene_corrs_.
|
inlinevirtual |
Provide a pointer to the scene dataset.
| [in] | scene | the const boost shared pointer to a PointCloud message. |
Reimplemented in pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >.
Definition at line 76 of file correspondence_grouping.h.
References scene_.
|
protected |
characteristic scale associated to each correspondence subset; if the cg algorithm can not handle scale invariance, the size of the vector will be 0.
Definition at line 142 of file correspondence_grouping.h.
Referenced by cluster(), and getCharacteristicScales().
|
protected |
The correspondences between points in the input and the scene datasets.
Definition at line 138 of file correspondence_grouping.h.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences(), getModelSceneCorrespondences(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::houghVoting(), initCompute(), setModelSceneCorrespondences(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setModelSceneCorrespondences(), and ~CorrespondenceGrouping().
|
protected |
The scene cloud.
Definition at line 133 of file correspondence_grouping.h.
Referenced by pcl::GeometricConsistencyGrouping< PointModelT, PointSceneT >::clusterCorrespondences(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences(), CorrespondenceGrouping(), getSceneCloud(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::houghVoting(), initCompute(), setSceneCloud(), pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setSceneCloud(), and ~CorrespondenceGrouping().