W3cubDocs

/PointCloudLibrary

Class implementing a 3D correspondence grouping algorithm that can deal with multiple instances of a model template found into a given scene. More...

#include <pcl/recognition/cg/hough_3d.h>

Public Types

using ModelRfCloud = pcl::PointCloud< PointModelRfT >
using ModelRfCloudPtr = typename ModelRfCloud::Ptr
using ModelRfCloudConstPtr = typename ModelRfCloud::ConstPtr
using SceneRfCloud = pcl::PointCloud< PointSceneRfT >
using SceneRfCloudPtr = typename SceneRfCloud::Ptr
using SceneRfCloudConstPtr = typename SceneRfCloud::ConstPtr
using PointCloud = pcl::PointCloud< PointModelT >
using PointCloudPtr = typename PointCloud::Ptr
using PointCloudConstPtr = typename PointCloud::ConstPtr
using SceneCloudConstPtr = typename pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::SceneCloudConstPtr
- Public Types inherited from pcl::CorrespondenceGrouping< PointModelT, PointSceneT >
using SceneCloud = pcl::PointCloud< PointSceneT >
using SceneCloudPtr = typename SceneCloud::Ptr
using SceneCloudConstPtr = typename SceneCloud::ConstPtr
- Public Types inherited from pcl::PCLBase< PointModelT >
using PointCloud = pcl::PointCloud< PointModelT >
using PointCloudPtr = typename PointCloud::Ptr
using PointCloudConstPtr = typename PointCloud::ConstPtr
using PointIndicesPtr = PointIndices::Ptr
using PointIndicesConstPtr = PointIndices::ConstPtr

Public Member Functions

Hough3DGrouping ()
Constructor. More...
void setInputCloud (const PointCloudConstPtr &cloud) override
Provide a pointer to the input dataset. More...
void setInputRf (const ModelRfCloudConstPtr &input_rf)
Provide a pointer to the input dataset's reference frames. More...
ModelRfCloudConstPtr getInputRf () const
Getter for the input dataset's reference frames. More...
void setSceneCloud (const SceneCloudConstPtr &scene) override
Provide a pointer to the scene dataset (i.e. More...
void setSceneRf (const SceneRfCloudConstPtr &scene_rf)
Provide a pointer to the scene dataset's reference frames. More...
SceneRfCloudConstPtr getSceneRf () const
Getter for the scene dataset's reference frames. More...
void setModelSceneCorrespondences (const CorrespondencesConstPtr &corrs) override
Provide a pointer to the precomputed correspondences between points in the input dataset and points in the scene dataset. More...
void setHoughThreshold (double threshold)
Sets the minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud. More...
double getHoughThreshold () const
Gets the minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud. More...
void setHoughBinSize (double bin_size)
Sets the size of each bin into the Hough space. More...
double getHoughBinSize () const
Gets the size of each bin into the Hough space. More...
void setUseInterpolation (bool use_interpolation)
Sets whether the vote casting procedure interpolates the score between neighboring bins of the Hough space or not. More...
bool getUseInterpolation () const
Gets whether the vote casting procedure interpolates the score between neighboring bins of the Hough space or not. More...
void setUseDistanceWeight (bool use_distance_weight)
Sets whether the vote casting procedure uses the correspondence's distance as a score. More...
bool getUseDistanceWeight () const
Gets whether the vote casting procedure uses the correspondence's distance as a score. More...
void setLocalRfNormalsSearchRadius (float local_rf_normals_search_radius)
If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to compute the normals in order to subsequently compute the RF (if not set a default 15 nearest neighbors search is performed). More...
float getLocalRfNormalsSearchRadius () const
If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to compute the normals in order to subsequently compute the RF (if not set a default 15 nearest neighbors search is performed). More...
void setLocalRfSearchRadius (float local_rf_search_radius)
If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to do so. More...
float getLocalRfSearchRadius () const
If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to do so. More...
bool train ()
Call this function after setting the input, the input_rf and the hough_bin_size parameters to perform an off line training of the algorithm. More...
bool recognize (std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > &transformations)
The main function, recognizes instances of the model into the scene set by the user. More...
bool recognize (std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > &transformations, std::vector< pcl::Correspondences > &clustered_corrs)
The main function, recognizes instances of the model into the scene set by the user. More...
- Public Member Functions inherited from pcl::CorrespondenceGrouping< PointModelT, PointSceneT >
CorrespondenceGrouping ()
Empty constructor. More...
~CorrespondenceGrouping ()
destructor. More...
SceneCloudConstPtr getSceneCloud () const
Getter for the scene dataset. More...
CorrespondencesConstPtr getModelSceneCorrespondences () const
Getter for the precomputed correspondences between points in the input dataset and points in the scene dataset. More...
std::vector< double > getCharacteristicScales () const
Getter for the vector of characteristic scales associated to each cluster. More...
void cluster (std::vector< Correspondences > &clustered_corrs)
Clusters the input correspondences belonging to different model instances. More...
- Public Member Functions inherited from pcl::PCLBase< PointModelT >
PCLBase ()
Empty constructor. More...
PCLBase (const PCLBase &base)
Copy constructor. More...
virtual ~PCLBase ()=default
Destructor. More...
const PointCloudConstPtr getInputCloud () const
Get a pointer to the input point cloud dataset. More...
virtual void setIndices (const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (const IndicesConstPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (const PointIndicesConstPtr &indices)
Provide a pointer to the vector of indices that represents the input data. More...
virtual void setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
Set the indices for the points laying within an interest region of the point cloud. More...
IndicesPtr getIndices ()
Get a pointer to the vector of indices used. More...
const IndicesConstPtr getIndices () const
Get a pointer to the vector of indices used. More...
const PointModelT & operator[] (std::size_t pos) const
Override PointCloud operator[] to shorten code. More...

Protected Member Functions

void clusterCorrespondences (std::vector< Correspondences > &model_instances) override
Cluster the input correspondences in order to distinguish between different instances of the model into the scene. More...
bool houghVoting ()
The Hough space voting procedure. More...
template<typename PointType , typename PointRfType >
void computeRf (const typename pcl::PointCloud< PointType >::ConstPtr &input, pcl::PointCloud< PointRfType > &rf)
Computes the reference frame for an input cloud. More...
- Protected Member Functions inherited from pcl::CorrespondenceGrouping< PointModelT, PointSceneT >
bool initCompute ()
This method should get called before starting the actual computation. More...
bool deinitCompute ()
This method should get called after finishing the actual computation. More...
- Protected Member Functions inherited from pcl::PCLBase< PointModelT >
bool initCompute ()
This method should get called before starting the actual computation. More...
bool deinitCompute ()
This method should get called after finishing the actual computation. More...

Protected Attributes

ModelRfCloudConstPtr input_rf_
The input Rf cloud. More...
SceneRfCloudConstPtr scene_rf_
The scene Rf cloud. More...
bool needs_training_
If the training of the Hough space is needed; set on change of either the input cloud or the input_rf. More...
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > model_votes_
The result of the training. More...
double hough_threshold_
The minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud. More...
double hough_bin_size_
The size of each bin of the hough space. More...
bool use_interpolation_
Use the interpolation between neighboring Hough bins when casting votes. More...
bool use_distance_weight_
Use the weighted correspondence distance when casting votes. More...
float local_rf_normals_search_radius_
Normals search radius for the potential Rf calculation. More...
float local_rf_search_radius_
Search radius for the potential Rf calculation. More...
pcl::recognition::HoughSpace3D::Ptr hough_space_
The Hough space. More...
std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > found_transformations_
Transformations found by clusterCorrespondences method. More...
bool hough_space_initialized_
Whether the Hough space already contains the correct votes for the current input parameters and so the cluster and recognize calls don't need to recompute each value. More...
- Protected Attributes inherited from pcl::CorrespondenceGrouping< PointModelT, PointSceneT >
SceneCloudConstPtr scene_
The scene cloud. More...
CorrespondencesConstPtr model_scene_corrs_
The correspondences between points in the input and the scene datasets. More...
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. More...
- Protected Attributes inherited from pcl::PCLBase< PointModelT >
PointCloudConstPtr input_
The input point cloud dataset. More...
IndicesPtr indices_
A pointer to the vector of point indices to use. More...
bool use_indices_
Set to true if point indices are used. More...
bool fake_indices_
If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...

Detailed Description

template<typename PointModelT, typename PointSceneT, typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
class pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >

Class implementing a 3D correspondence grouping algorithm that can deal with multiple instances of a model template found into a given scene.

Each correspondence casts a vote for a reference point in a 3D Hough Space. The remaining 3 DOF are taken into account by associating each correspondence with a local Reference Frame. The suggested PointModelRfT is pcl::ReferenceFrame

Note
If you use this code in any academic work, please cite the original paper:
  • F. Tombari, L. Di Stefano: Object recognition in 3D scenes with occlusions and clutter by Hough voting. 2010, Fourth Pacific-Rim Symposium on Image and Video Technology
Author
Federico Tombari (original), Tommaso Cavallari (PCL port)

Definition at line 148 of file hough_3d.h.

Member Typedef Documentation

ModelRfCloud

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::ModelRfCloud = pcl::PointCloud<PointModelRfT>

Definition at line 151 of file hough_3d.h.

ModelRfCloudConstPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::ModelRfCloudConstPtr = typename ModelRfCloud::ConstPtr

Definition at line 153 of file hough_3d.h.

ModelRfCloudPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::ModelRfCloudPtr = typename ModelRfCloud::Ptr

Definition at line 152 of file hough_3d.h.

PointCloud

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::PointCloud = pcl::PointCloud<PointModelT>

Definition at line 159 of file hough_3d.h.

PointCloudConstPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::PointCloudConstPtr = typename PointCloud::ConstPtr

Definition at line 161 of file hough_3d.h.

PointCloudPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::PointCloudPtr = typename PointCloud::Ptr

Definition at line 160 of file hough_3d.h.

SceneCloudConstPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::SceneCloudConstPtr = typename pcl::CorrespondenceGrouping<PointModelT, PointSceneT>::SceneCloudConstPtr

Definition at line 163 of file hough_3d.h.

SceneRfCloud

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::SceneRfCloud = pcl::PointCloud<PointSceneRfT>

Definition at line 155 of file hough_3d.h.

SceneRfCloudConstPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::SceneRfCloudConstPtr = typename SceneRfCloud::ConstPtr

Definition at line 157 of file hough_3d.h.

SceneRfCloudPtr

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
using pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::SceneRfCloudPtr = typename SceneRfCloud::Ptr

Definition at line 156 of file hough_3d.h.

Constructor & Destructor Documentation

Hough3DGrouping()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::Hough3DGrouping ( )
inline

Constructor.

Definition at line 166 of file hough_3d.h.

Member Function Documentation

clusterCorrespondences()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::clusterCorrespondences ( std::vector< Correspondences > & model_instances )
overrideprotectedvirtual

computeRf()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
template<typename PointType , typename PointRfType >
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::computeRf ( const typename pcl::PointCloud< PointType >::ConstPtr & input,
pcl::PointCloud< PointRfType > & rf
)
protected

getHoughBinSize()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
double pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getHoughBinSize ( ) const
inline

Gets the size of each bin into the Hough space.

Returns
the size of each Hough space's bin.

Definition at line 306 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_bin_size_.

getHoughThreshold()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
double pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getHoughThreshold ( ) const
inline

Gets the minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud.

Returns
the threshold for the Hough space voting.

Definition at line 285 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_threshold_.

getInputRf()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
ModelRfCloudConstPtr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getInputRf ( ) const
inline

Getter for the input dataset's reference frames.

Each point in the reference frame cloud should be the reference frame of the correspondent point in the input dataset.

Returns
the pointer to the input cloud's reference frames.

Definition at line 212 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::input_rf_.

getLocalRfNormalsSearchRadius()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
float pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getLocalRfNormalsSearchRadius ( ) const
inline

If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to compute the normals in order to subsequently compute the RF (if not set a default 15 nearest neighbors search is performed).

Returns
the normals search radius for the local reference frame calculation.

Definition at line 376 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::local_rf_normals_search_radius_.

getLocalRfSearchRadius()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
float pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getLocalRfSearchRadius ( ) const
inline

If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to do so.

Attention
This parameter NEEDS to be set if the reference frames are not precomputed externally, otherwise the recognition results won't be correct.
Returns
the search radius for the local reference frame calculation.

Definition at line 404 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::local_rf_search_radius_.

getSceneRf()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
SceneRfCloudConstPtr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getSceneRf ( ) const
inline

Getter for the scene dataset's reference frames.

Each point in the reference frame cloud should be the reference frame of the correspondent point in the scene dataset.

Returns
the pointer to the scene cloud's reference frames.

Definition at line 249 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::scene_rf_.

getUseDistanceWeight()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getUseDistanceWeight ( ) const
inline

Gets whether the vote casting procedure uses the correspondence's distance as a score.

Returns
if the algorithm should use the weighted distance when calculating the Hough voting score.

Definition at line 350 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_distance_weight_.

getUseInterpolation()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getUseInterpolation ( ) const
inline

Gets whether the vote casting procedure interpolates the score between neighboring bins of the Hough space or not.

Returns
if the algorithm should interpolate the vote score between neighboring bins.

Definition at line 329 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_interpolation_.

houghVoting()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::houghVoting
protected

The Hough space voting procedure.

Returns
true if the voting had been successful or false if errors have occurred.

Definition at line 138 of file hough_3d.hpp.

References pcl::geometry::distance().

recognize() [1/2]

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::recognize ( std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > & transformations )

The main function, recognizes instances of the model into the scene set by the user.

Parameters
[out] transformations a vector containing one transformation matrix for each instance of the model recognized into the scene.
Returns
true if the recognition had been successful or false if errors have occurred.

Definition at line 334 of file hough_3d.hpp.

recognize() [2/2]

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::recognize ( std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > & transformations,
std::vector< pcl::Correspondences > & clustered_corrs
)

The main function, recognizes instances of the model into the scene set by the user.

Parameters
[out] transformations a vector containing one transformation matrix for each instance of the model recognized into the scene.
[out] clustered_corrs a vector containing the correspondences for each instance of the model found within the input data (the same output of clusterCorrespondences).
Returns
true if the recognition had been successful or false if errors have occurred.

Definition at line 343 of file hough_3d.hpp.

setHoughBinSize()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setHoughBinSize ( double bin_size )
inline

Sets the size of each bin into the Hough space.

Parameters
[in] bin_size the size of each Hough space's bin.

Definition at line 295 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_bin_size_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_.

setHoughThreshold()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setHoughThreshold ( double threshold )
inline

Sets the minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud.

Parameters
[in] threshold the threshold for the Hough space voting, if set between -1 and 0 the maximum vote in the entire space is automatically calculated and -threshold the maximum value is used as a threshold. This means that a value between -1 and 0 should be used only if at least one instance of the model is always present in the scene, or if this false positive can be filtered later.

Definition at line 275 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_threshold_.

setInputCloud()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setInputCloud ( const PointCloudConstPtr & cloud )
inlineoverridevirtual

setInputRf()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setInputRf ( const ModelRfCloudConstPtr & input_rf )
inline

Provide a pointer to the input dataset's reference frames.

Each point in the reference frame cloud should be the reference frame of the correspondent point in the input dataset.

Parameters
[in] input_rf the pointer to the input cloud's reference frames.

Definition at line 198 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::input_rf_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::needs_training_.

setLocalRfNormalsSearchRadius()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setLocalRfNormalsSearchRadius ( float local_rf_normals_search_radius )
inline

If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to compute the normals in order to subsequently compute the RF (if not set a default 15 nearest neighbors search is performed).

Parameters
[in] local_rf_normals_search_radius the normals search radius for the local reference frame calculation.

Definition at line 362 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::local_rf_normals_search_radius_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::needs_training_.

setLocalRfSearchRadius()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setLocalRfSearchRadius ( float local_rf_search_radius )
inline

If the Local reference frame has not been set for either the model cloud or the scene cloud, this algorithm makes the computation itself but needs a suitable search radius to do so.

Attention
This parameter NEEDS to be set if the reference frames are not precomputed externally, otherwise the recognition results won't be correct.
Parameters
[in] local_rf_search_radius the search radius for the local reference frame calculation.

Definition at line 389 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::local_rf_search_radius_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::needs_training_.

setModelSceneCorrespondences()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setModelSceneCorrespondences ( const CorrespondencesConstPtr & corrs )
inlineoverridevirtual

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 instances by the algorithm.

Parameters
[in] corrs the correspondences between the model and the scene.

Reimplemented from pcl::CorrespondenceGrouping< PointModelT, PointSceneT >.

Definition at line 261 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, and pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::model_scene_corrs_.

setSceneCloud()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setSceneCloud ( const SceneCloudConstPtr & scene )
inlineoverridevirtual

Provide a pointer to the scene dataset (i.e.

the cloud in which the algorithm has to search for instances of the input model)

Parameters
[in] scene the const boost shared pointer to a PointCloud message.

Reimplemented from pcl::CorrespondenceGrouping< PointModelT, PointSceneT >.

Definition at line 222 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, pcl::CorrespondenceGrouping< PointModelT, PointSceneT >::scene_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::scene_rf_.

setSceneRf()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setSceneRf ( const SceneRfCloudConstPtr & scene_rf )
inline

Provide a pointer to the scene dataset's reference frames.

Each point in the reference frame cloud should be the reference frame of the correspondent point in the scene dataset.

Parameters
[in] scene_rf the pointer to the scene cloud's reference frames.

Definition at line 236 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::scene_rf_.

setUseDistanceWeight()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setUseDistanceWeight ( bool use_distance_weight )
inline

Sets whether the vote casting procedure uses the correspondence's distance as a score.

Parameters
[in] use_distance_weight the algorithm should use the weighted distance when calculating the Hough voting score.

Definition at line 339 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_distance_weight_.

setUseInterpolation()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setUseInterpolation ( bool use_interpolation )
inline

Sets whether the vote casting procedure interpolates the score between neighboring bins of the Hough space or not.

Parameters
[in] use_interpolation the algorithm should interpolate the vote score between neighboring bins.

Definition at line 317 of file hough_3d.h.

References pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_, and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_interpolation_.

train()

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::train

Call this function after setting the input, the input_rf and the hough_bin_size parameters to perform an off line training of the algorithm.

This might be useful if one wants to perform once and for all a pre-computation of votes that only concern the models, increasing the on-line efficiency of the grouping algorithm. The algorithm is automatically trained on the first invocation of the recognize method or the cluster method if this training function has not been manually invoked.

Returns
true if the training had been successful or false if errors have occurred.

Definition at line 85 of file hough_3d.hpp.

Member Data Documentation

found_transformations_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::found_transformations_
protected

Transformations found by clusterCorrespondences method.

Definition at line 475 of file hough_3d.h.

hough_bin_size_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
double pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_bin_size_
protected

hough_space_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
pcl::recognition::HoughSpace3D::Ptr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_
protected

The Hough space.

Definition at line 472 of file hough_3d.h.

hough_space_initialized_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_
protected

hough_threshold_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
double pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_threshold_
protected

The minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud.

Definition at line 454 of file hough_3d.h.

Referenced by pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::getHoughThreshold(), and pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setHoughThreshold().

input_rf_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
ModelRfCloudConstPtr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::input_rf_
protected

local_rf_normals_search_radius_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
float pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::local_rf_normals_search_radius_
protected

local_rf_search_radius_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
float pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::local_rf_search_radius_
protected

model_votes_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::model_votes_
protected

The result of the training.

The vector between each model point and the centroid of the model adjusted by its local reference frame.

Definition at line 451 of file hough_3d.h.

needs_training_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::needs_training_
protected

scene_rf_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
SceneRfCloudConstPtr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::scene_rf_
protected

use_distance_weight_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_distance_weight_
protected

use_interpolation_

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_interpolation_
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_1_hough3_d_grouping.html