Point Cloud Library (PCL)  1.8.1-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT > Class Template Reference

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>

+ Inheritance diagram for pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >:

Public Types

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

Public Member Functions

 Hough3DGrouping ()
 Constructor. More...
 
void setInputCloud (const PointCloudConstPtr &cloud)
 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)
 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)
 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...
 
virtual ~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 ()
 Destructor. More...
 
PointCloudConstPtr const 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 (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used. More...
 
const PointModelT & operator[] (size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Protected Member Functions

void clusterCorrespondences (std::vector< Correspondences > &model_instances)
 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 boost::shared_ptr< const pcl::PointCloud< PointType > > &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...
 
boost::shared_ptr
< pcl::recognition::HoughSpace3D
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 145 of file hough_3d.h.

Member Typedef Documentation

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

Definition at line 148 of file hough_3d.h.

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

Definition at line 150 of file hough_3d.h.

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

Definition at line 149 of file hough_3d.h.

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

Definition at line 156 of file hough_3d.h.

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

Definition at line 158 of file hough_3d.h.

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

Definition at line 157 of file hough_3d.h.

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

Definition at line 160 of file hough_3d.h.

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

Definition at line 152 of file hough_3d.h.

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

Definition at line 154 of file hough_3d.h.

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

Definition at line 153 of file hough_3d.h.

Constructor & Destructor Documentation

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 163 of file hough_3d.h.

Member Function Documentation

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

Cluster the input correspondences in order to distinguish between different instances of the model into the scene.

Parameters
[out]model_instancesa vector containing the clustered correspondences for each model found on the scene.
Returns
true if the clustering had been successful or false if errors have occurred.

Implements pcl::CorrespondenceGrouping< PointModelT, PointSceneT >.

Definition at line 258 of file hough_3d.hpp.

References pcl::registration::CorrespondenceRejectorSampleConsensus< PointT >::setMaximumIterations().

template<typename PointModelT , typename PointSceneT , typename PointModelRfT , typename PointSceneRfT >
template<typename PointType , typename PointRfType >
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::computeRf ( const boost::shared_ptr< const pcl::PointCloud< PointType > > &  input,
pcl::PointCloud< PointRfType > &  rf 
)
protected
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_.

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_.

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_.

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_.

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_.

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_.

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_.

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_.

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 137 of file hough_3d.hpp.

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]transformationsa 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 333 of file hough_3d.hpp.

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]transformationsa vector containing one transformation matrix for each instance of the model recognized into the scene.
[out]clustered_corrsa 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 342 of file hough_3d.hpp.

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_sizethe 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_.

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]thresholdthe 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_.

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setInputCloud ( const PointCloudConstPtr cloud)
inlinevirtual
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_rfthe 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_.

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_radiusthe 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_.

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_radiusthe 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_.

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
void pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::setModelSceneCorrespondences ( const CorrespondencesConstPtr corrs)
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 instances by the algorithm.

Parameters
[in]corrsthe 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_.

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

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]scenethe 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_.

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_rfthe 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_.

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_weightthe 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_.

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_interpolationthe 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_.

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 84 of file hough_3d.hpp.

Member Data Documentation

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.

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
double pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_bin_size_
protected
template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
boost::shared_ptr<pcl::recognition::HoughSpace3D> pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_
protected

The Hough space.

Definition at line 472 of file hough_3d.h.

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::hough_space_initialized_
protected
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().

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
ModelRfCloudConstPtr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::input_rf_
protected
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
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
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.

template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::needs_training_
protected
template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
SceneRfCloudConstPtr pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::scene_rf_
protected
template<typename PointModelT , typename PointSceneT , typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
bool pcl::Hough3DGrouping< PointModelT, PointSceneT, PointModelRfT, PointSceneRfT >::use_distance_weight_
protected
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: