Point Cloud Library (PCL)  1.9.1-dev
hough_3d.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2012, Willow Garage, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of Willow Garage, Inc. nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  * $Id:$
37  *
38  */
39 
40 #pragma once
41 
42 #include <pcl/recognition/cg/correspondence_grouping.h>
43 #include <pcl/recognition/boost.h>
44 #include <pcl/pcl_macros.h>
45 #include <pcl/point_types.h>
46 
47 #include <unordered_map>
48 
49 namespace pcl
50 {
51  namespace recognition
52  {
53  /** \brief HoughSpace3D is a 3D voting space. Cast votes can be interpolated in order to better deal with approximations introduced by bin quantization. A weight can also be associated with each vote.
54  * \author Federico Tombari (original), Tommaso Cavallari (PCL port)
55  * \ingroup recognition
56  */
57  class PCL_EXPORTS HoughSpace3D
58  {
59 
60  public:
62 
63  using Ptr = boost::shared_ptr<HoughSpace3D>;
64 
65  /** \brief Constructor
66  *
67  * \param[in] min_coord minimum (x,y,z) coordinates of the Hough space
68  * \param[in] bin_size size of each bing of the Hough space.
69  * \param[in] max_coord maximum (x,y,z) coordinates of the Hough space.
70  */
71  HoughSpace3D (const Eigen::Vector3d &min_coord, const Eigen::Vector3d &bin_size, const Eigen::Vector3d &max_coord);
72 
73  /** \brief Reset all cast votes. */
74  void
75  reset ();
76 
77  /** \brief Casting a vote for a given position in the Hough space.
78  *
79  * \param[in] single_vote_coord coordinates of the vote being cast (in absolute coordinates)
80  * \param[in] weight weight associated with the vote.
81  * \param[in] voter_id the numeric id of the voter. Useful to trace back the voting correspondence, if the vote is returned by findMaxima as part of a maximum of the Hough Space.
82  * \return the index of the bin in which the vote has been cast.
83  */
84  int
85  vote (const Eigen::Vector3d &single_vote_coord, double weight, int voter_id);
86 
87  /** \brief Vote for a given position in the 3D space. The weight is interpolated between the bin pointed by single_vote_coord and its neighbors.
88  *
89  * \param[in] single_vote_coord coordinates of the vote being cast.
90  * \param[in] weight weight associated with the vote.
91  * \param[in] voter_id the numeric id of the voter. Useful to trace back the voting correspondence, if the vote is returned by findMaxima as a part of a maximum of the Hough Space.
92  * \return the index of the bin in which the vote has been cast.
93  */
94  int
95  voteInt (const Eigen::Vector3d &single_vote_coord, double weight, int voter_id);
96 
97  /** \brief Find the bins with most votes.
98  *
99  * \param[in] min_threshold the minimum number of votes to be included in a bin in order to have its value returned.
100  * If set to a value between -1 and 0 the Hough space maximum_vote is found and the returned values are all the votes greater than -min_threshold * maximum_vote.
101  * \param[out] maxima_values the list of Hough Space bin values greater than min_threshold.
102  * \param[out] maxima_voter_ids for each value returned, a list of the voter ids who cast a vote in that position.
103  * \return The min_threshold used, either set by the user or found by this method.
104  */
105  double
106  findMaxima (double min_threshold, std::vector<double> & maxima_values, std::vector<std::vector<int> > &maxima_voter_ids);
107 
108  protected:
109 
110  /** \brief Minimum coordinate in the Hough Space. */
111  Eigen::Vector3d min_coord_;
112 
113  /** \brief Size of each bin in the Hough Space. */
114  Eigen::Vector3d bin_size_;
115 
116  /** \brief Number of bins for each dimension. */
117  Eigen::Vector3i bin_count_;
118 
119  /** \brief Used to access hough_space_ as if it was a matrix. */
120  int partial_bin_products_[4];
121 
122  /** \brief Total number of bins in the Hough Space. */
124 
125  /** \brief The Hough Space. */
126  std::vector<double> hough_space_;
127 
128  /** \brief List of voters for each bin. */
129  std::unordered_map<int, std::vector<int> > voter_ids_;
130  };
131  }
132 
133  /** \brief Class implementing a 3D correspondence grouping algorithm that can deal with multiple instances of a model template
134  * found into a given scene. Each correspondence casts a vote for a reference point in a 3D Hough Space.
135  * The remaining 3 DOF are taken into account by associating each correspondence with a local Reference Frame.
136  * The suggested PointModelRfT is pcl::ReferenceFrame
137  *
138  * \note If you use this code in any academic work, please cite the original paper:
139  * - F. Tombari, L. Di Stefano:
140  * Object recognition in 3D scenes with occlusions and clutter by Hough voting.
141  * 2010, Fourth Pacific-Rim Symposium on Image and Video Technology
142  *
143  * \author Federico Tombari (original), Tommaso Cavallari (PCL port)
144  * \ingroup recognition
145  */
146  template<typename PointModelT, typename PointSceneT, typename PointModelRfT = pcl::ReferenceFrame, typename PointSceneRfT = pcl::ReferenceFrame>
147  class Hough3DGrouping : public CorrespondenceGrouping<PointModelT, PointSceneT>
148  {
149  public:
153 
157 
159  using PointCloudPtr = typename PointCloud::Ptr;
161 
163 
164  /** \brief Constructor */
166  : input_rf_ ()
167  , scene_rf_ ()
168  , needs_training_ (true)
169  ,hough_threshold_ (-1)
170  , hough_bin_size_ (1.0)
171  , use_interpolation_ (true)
172  , use_distance_weight_ (false)
173  , local_rf_normals_search_radius_ (0.0f)
174  , local_rf_search_radius_ (0.0f)
175  , hough_space_initialized_ (false)
176  {}
177 
178  /** \brief Provide a pointer to the input dataset.
179  * \param[in] cloud the const boost shared pointer to a PointCloud message.
180  */
181  inline void
182  setInputCloud (const PointCloudConstPtr &cloud) override
183  {
185  needs_training_ = true;
186  hough_space_initialized_ = false;
187  input_rf_.reset();
188  }
189 
190  /** \brief Provide a pointer to the input dataset's reference frames.
191  * Each point in the reference frame cloud should be the reference frame of
192  * the correspondent point in the input dataset.
193  *
194  * \param[in] input_rf the pointer to the input cloud's reference frames.
195  */
196  inline void
198  {
199  input_rf_ = input_rf;
200  needs_training_ = true;
201  hough_space_initialized_ = false;
202  }
203 
204  /** \brief Getter for the input dataset's reference frames.
205  * Each point in the reference frame cloud should be the reference frame of
206  * the correspondent point in the input dataset.
207  *
208  * \return the pointer to the input cloud's reference frames.
209  */
210  inline ModelRfCloudConstPtr
211  getInputRf () const
212  {
213  return (input_rf_);
214  }
215 
216  /** \brief Provide a pointer to the scene dataset (i.e. the cloud in which the algorithm has to search for instances of the input model)
217  *
218  * \param[in] scene the const boost shared pointer to a PointCloud message.
219  */
220  inline void
221  setSceneCloud (const SceneCloudConstPtr &scene) override
222  {
223  scene_ = scene;
224  hough_space_initialized_ = false;
225  scene_rf_.reset();
226  }
227 
228  /** \brief Provide a pointer to the scene dataset's reference frames.
229  * Each point in the reference frame cloud should be the reference frame of
230  * the correspondent point in the scene dataset.
231  *
232  * \param[in] scene_rf the pointer to the scene cloud's reference frames.
233  */
234  inline void
236  {
237  scene_rf_ = scene_rf;
238  hough_space_initialized_ = false;
239  }
240 
241  /** \brief Getter for the scene dataset's reference frames.
242  * Each point in the reference frame cloud should be the reference frame of
243  * the correspondent point in the scene dataset.
244  *
245  * \return the pointer to the scene cloud's reference frames.
246  */
247  inline SceneRfCloudConstPtr
248  getSceneRf () const
249  {
250  return (scene_rf_);
251  }
252 
253  /** \brief Provide a pointer to the precomputed correspondences between points in the input dataset and
254  * points in the scene dataset. The correspondences are going to be clustered into different model instances
255  * by the algorithm.
256  *
257  * \param[in] corrs the correspondences between the model and the scene.
258  */
259  inline void
261  {
262  model_scene_corrs_ = corrs;
263  hough_space_initialized_ = false;
264  }
265 
266  /** \brief Sets the minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud.
267  *
268  * \param[in] threshold the threshold for the Hough space voting, if set between -1 and 0 the maximum vote in the
269  * entire space is automatically calculated and -threshold the maximum value is used as a threshold. This means
270  * that a value between -1 and 0 should be used only if at least one instance of the model is always present in
271  * the scene, or if this false positive can be filtered later.
272  */
273  inline void
274  setHoughThreshold (double threshold)
275  {
276  hough_threshold_ = threshold;
277  }
278 
279  /** \brief Gets the minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud.
280  *
281  * \return the threshold for the Hough space voting.
282  */
283  inline double
285  {
286  return (hough_threshold_);
287  }
288 
289  /** \brief Sets the size of each bin into the Hough space.
290  *
291  * \param[in] bin_size the size of each Hough space's bin.
292  */
293  inline void
294  setHoughBinSize (double bin_size)
295  {
296  hough_bin_size_ = bin_size;
297  hough_space_initialized_ = false;
298  }
299 
300  /** \brief Gets the size of each bin into the Hough space.
301  *
302  * \return the size of each Hough space's bin.
303  */
304  inline double
306  {
307  return (hough_bin_size_);
308  }
309 
310  /** \brief Sets whether the vote casting procedure interpolates
311  * the score between neighboring bins of the Hough space or not.
312  *
313  * \param[in] use_interpolation the algorithm should interpolate the vote score between neighboring bins.
314  */
315  inline void
316  setUseInterpolation (bool use_interpolation)
317  {
318  use_interpolation_ = use_interpolation;
319  hough_space_initialized_ = false;
320  }
321 
322  /** \brief Gets whether the vote casting procedure interpolates
323  * the score between neighboring bins of the Hough space or not.
324  *
325  * \return if the algorithm should interpolate the vote score between neighboring bins.
326  */
327  inline bool
329  {
330  return (use_interpolation_);
331  }
332 
333  /** \brief Sets whether the vote casting procedure uses the correspondence's distance as a score.
334  *
335  * \param[in] use_distance_weight the algorithm should use the weighted distance when calculating the Hough voting score.
336  */
337  inline void
338  setUseDistanceWeight (bool use_distance_weight)
339  {
340  use_distance_weight_ = use_distance_weight;
341  hough_space_initialized_ = false;
342  }
343 
344  /** \brief Gets whether the vote casting procedure uses the correspondence's distance as a score.
345  *
346  * \return if the algorithm should use the weighted distance when calculating the Hough voting score.
347  */
348  inline bool
350  {
351  return (use_distance_weight_);
352  }
353 
354  /** \brief If the Local reference frame has not been set for either the model cloud or the scene cloud,
355  * this algorithm makes the computation itself but needs a suitable search radius to compute the normals
356  * in order to subsequently compute the RF (if not set a default 15 nearest neighbors search is performed).
357  *
358  * \param[in] local_rf_normals_search_radius the normals search radius for the local reference frame calculation.
359  */
360  inline void
361  setLocalRfNormalsSearchRadius (float local_rf_normals_search_radius)
362  {
363  local_rf_normals_search_radius_ = local_rf_normals_search_radius;
364  needs_training_ = true;
365  hough_space_initialized_ = false;
366  }
367 
368  /** \brief If the Local reference frame has not been set for either the model cloud or the scene cloud,
369  * this algorithm makes the computation itself but needs a suitable search radius to compute the normals
370  * in order to subsequently compute the RF (if not set a default 15 nearest neighbors search is performed).
371  *
372  * \return the normals search radius for the local reference frame calculation.
373  */
374  inline float
376  {
377  return (local_rf_normals_search_radius_);
378  }
379 
380  /** \brief If the Local reference frame has not been set for either the model cloud or the scene cloud,
381  * this algorithm makes the computation itself but needs a suitable search radius to do so.
382  * \attention This parameter NEEDS to be set if the reference frames are not precomputed externally,
383  * otherwise the recognition results won't be correct.
384  *
385  * \param[in] local_rf_search_radius the search radius for the local reference frame calculation.
386  */
387  inline void
388  setLocalRfSearchRadius (float local_rf_search_radius)
389  {
390  local_rf_search_radius_ = local_rf_search_radius;
391  needs_training_ = true;
392  hough_space_initialized_ = false;
393  }
394 
395  /** \brief If the Local reference frame has not been set for either the model cloud or the scene cloud,
396  * this algorithm makes the computation itself but needs a suitable search radius to do so.
397  * \attention This parameter NEEDS to be set if the reference frames are not precomputed externally,
398  * otherwise the recognition results won't be correct.
399  *
400  * \return the search radius for the local reference frame calculation.
401  */
402  inline float
404  {
405  return (local_rf_search_radius_);
406  }
407 
408  /** \brief 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.
409  * 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.
410  *
411  * \return true if the training had been successful or false if errors have occurred.
412  */
413  bool
414  train ();
415 
416  /** \brief The main function, recognizes instances of the model into the scene set by the user.
417  *
418  * \param[out] transformations a vector containing one transformation matrix for each instance of the model recognized into the scene.
419  *
420  * \return true if the recognition had been successful or false if errors have occurred.
421  */
422  bool
423  recognize (std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > &transformations);
424 
425  /** \brief The main function, recognizes instances of the model into the scene set by the user.
426  *
427  * \param[out] transformations a vector containing one transformation matrix for each instance of the model recognized into the scene.
428  * \param[out] clustered_corrs a vector containing the correspondences for each instance of the model found within the input data (the same output of clusterCorrespondences).
429  *
430  * \return true if the recognition had been successful or false if errors have occurred.
431  */
432  bool
433  recognize (std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > &transformations, std::vector<pcl::Correspondences> &clustered_corrs);
434 
435  protected:
439 
440  /** \brief The input Rf cloud. */
442 
443  /** \brief The scene Rf cloud. */
445 
446  /** \brief If the training of the Hough space is needed; set on change of either the input cloud or the input_rf. */
448 
449  /** \brief The result of the training. The vector between each model point and the centroid of the model adjusted by its local reference frame.*/
450  std::vector<Eigen::Vector3f, Eigen::aligned_allocator<Eigen::Vector3f> > model_votes_;
451 
452  /** \brief The minimum number of votes in the Hough space needed to infer the presence of a model instance into the scene cloud. */
454 
455  /** \brief The size of each bin of the hough space. */
457 
458  /** \brief Use the interpolation between neighboring Hough bins when casting votes. */
460 
461  /** \brief Use the weighted correspondence distance when casting votes. */
463 
464  /** \brief Normals search radius for the potential Rf calculation. */
466 
467  /** \brief Search radius for the potential Rf calculation. */
469 
470  /** \brief The Hough space. */
472 
473  /** \brief Transformations found by clusterCorrespondences method. */
474  std::vector<Eigen::Matrix4f, Eigen::aligned_allocator<Eigen::Matrix4f> > found_transformations_;
475 
476  /** \brief 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.
477  * Reset on the change of any parameter except the hough_threshold.
478  */
480 
481  /** \brief Cluster the input correspondences in order to distinguish between different instances of the model into the scene.
482  *
483  * \param[out] model_instances a vector containing the clustered correspondences for each model found on the scene.
484  * \return true if the clustering had been successful or false if errors have occurred.
485  */
486  void
487  clusterCorrespondences (std::vector<Correspondences> &model_instances) override;
488 
489  /* \brief Finds the transformation matrix between the input and the scene cloud for a set of correspondences using a RANSAC algorithm.
490  * \param[in] the scene cloud in which the PointSceneT has been converted to PointModelT.
491  * \param[in] corrs a set of correspondences.
492  * \param[out] transform the transformation matrix between the input cloud and the scene cloud that aligns the found correspondences.
493  * \return true if the recognition had been successful or false if errors have occurred.
494  */
495  //bool
496  //getTransformMatrix (const PointCloudConstPtr &scene_cloud, const Correspondences &corrs, Eigen::Matrix4f &transform);
497 
498  /** \brief The Hough space voting procedure.
499  * \return true if the voting had been successful or false if errors have occurred.
500  */
501  bool
502  houghVoting ();
503 
504  /** \brief Computes the reference frame for an input cloud.
505  * \param[in] input the input cloud.
506  * \param[out] rf the resulting reference frame.
507  */
508  template<typename PointType, typename PointRfType> void
509  computeRf (const typename pcl::PointCloud<PointType>::ConstPtr &input, pcl::PointCloud<PointRfType> &rf);
510  };
511 }
512 
513 #ifdef PCL_NO_PRECOMPILE
514 #include <pcl/recognition/impl/cg/hough_3d.hpp>
515 #endif
Eigen::Vector3i bin_count_
Number of bins for each dimension.
Definition: hough_3d.h:117
std::vector< double > hough_space_
The Hough Space.
Definition: hough_3d.h:126
float getLocalRfSearchRadius() const
If the Local reference frame has not been set for either the model cloud or the scene cloud...
Definition: hough_3d.h:403
float getLocalRfNormalsSearchRadius() const
If the Local reference frame has not been set for either the model cloud or the scene cloud...
Definition: hough_3d.h:375
int total_bins_count_
Total number of bins in the Hough Space.
Definition: hough_3d.h:123
boost::shared_ptr< HoughSpace3D > Ptr
Definition: hough_3d.h:63
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
void setUseDistanceWeight(bool use_distance_weight)
Sets whether the vote casting procedure uses the correspondence&#39;s distance as a score.
Definition: hough_3d.h:338
typename ModelRfCloud::ConstPtr ModelRfCloudConstPtr
Definition: hough_3d.h:152
typename SceneCloud::ConstPtr SceneCloudConstPtr
typename PointCloud::Ptr PointCloudPtr
Definition: hough_3d.h:159
SceneRfCloudConstPtr scene_rf_
The scene Rf cloud.
Definition: hough_3d.h:444
double getHoughThreshold() const
Gets the minimum number of votes in the Hough space needed to infer the presence of a model instance ...
Definition: hough_3d.h:284
typename ModelRfCloud::Ptr ModelRfCloudPtr
Definition: hough_3d.h:151
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...
Definition: hough_3d.h:361
SceneRfCloudConstPtr getSceneRf() const
Getter for the scene dataset&#39;s reference frames.
Definition: hough_3d.h:248
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Definition: pcl_macros.h:344
float local_rf_normals_search_radius_
Normals search radius for the potential Rf calculation.
Definition: hough_3d.h:465
bool hough_space_initialized_
Whether the Hough space already contains the correct votes for the current input parameters and so th...
Definition: hough_3d.h:479
Eigen::Vector3d bin_size_
Size of each bin in the Hough Space.
Definition: hough_3d.h:114
pcl::recognition::HoughSpace3D::Ptr hough_space_
The Hough space.
Definition: hough_3d.h:471
bool use_distance_weight_
Use the weighted correspondence distance when casting votes.
Definition: hough_3d.h:462
bool getUseDistanceWeight() const
Gets whether the vote casting procedure uses the correspondence&#39;s distance as a score.
Definition: hough_3d.h:349
void setInputRf(const ModelRfCloudConstPtr &input_rf)
Provide a pointer to the input dataset&#39;s reference frames.
Definition: hough_3d.h:197
bool needs_training_
If the training of the Hough space is needed; set on change of either the input cloud or the input_rf...
Definition: hough_3d.h:447
void setSceneCloud(const SceneCloudConstPtr &scene) override
Provide a pointer to the scene dataset (i.e.
Definition: hough_3d.h:221
boost::shared_ptr< const Correspondences > CorrespondencesConstPtr
void setModelSceneCorrespondences(const CorrespondencesConstPtr &corrs) override
Provide a pointer to the precomputed correspondences between points in the input dataset and points i...
Definition: hough_3d.h:260
Hough3DGrouping()
Constructor.
Definition: hough_3d.h:165
ModelRfCloudConstPtr input_rf_
The input Rf cloud.
Definition: hough_3d.h:441
boost::shared_ptr< PointCloud< PointT > > Ptr
Definition: point_cloud.h:429
bool use_interpolation_
Use the interpolation between neighboring Hough bins when casting votes.
Definition: hough_3d.h:459
Class implementing a 3D correspondence grouping algorithm that can deal with multiple instances of a ...
Definition: hough_3d.h:147
PointCloud represents the base class in PCL for storing collections of 3D points. ...
Abstract base class for Correspondence Grouping algorithms.
float local_rf_search_radius_
Search radius for the potential Rf calculation.
Definition: hough_3d.h:468
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
Definition: point_cloud.h:430
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
Definition: pcl_base.hpp:65
void setInputCloud(const PointCloudConstPtr &cloud) override
Provide a pointer to the input dataset.
Definition: hough_3d.h:182
double hough_threshold_
The minimum number of votes in the Hough space needed to infer the presence of a model instance into ...
Definition: hough_3d.h:453
void setHoughThreshold(double threshold)
Sets the minimum number of votes in the Hough space needed to infer the presence of a model instance ...
Definition: hough_3d.h:274
Eigen::Vector3d min_coord_
Minimum coordinate in the Hough Space.
Definition: hough_3d.h:111
std::vector< Eigen::Vector3f, Eigen::aligned_allocator< Eigen::Vector3f > > model_votes_
The result of the training.
Definition: hough_3d.h:450
typename SceneRfCloud::Ptr SceneRfCloudPtr
Definition: hough_3d.h:155
ModelRfCloudConstPtr getInputRf() const
Getter for the input dataset&#39;s reference frames.
Definition: hough_3d.h:211
std::vector< Eigen::Matrix4f, Eigen::aligned_allocator< Eigen::Matrix4f > > found_transformations_
Transformations found by clusterCorrespondences method.
Definition: hough_3d.h:474
typename PointCloud::ConstPtr PointCloudConstPtr
Definition: hough_3d.h:160
void setUseInterpolation(bool use_interpolation)
Sets whether the vote casting procedure interpolates the score between neighboring bins of the Hough ...
Definition: hough_3d.h:316
double hough_bin_size_
The size of each bin of the hough space.
Definition: hough_3d.h:456
double getHoughBinSize() const
Gets the size of each bin into the Hough space.
Definition: hough_3d.h:305
HoughSpace3D is a 3D voting space.
Definition: hough_3d.h:57
std::unordered_map< int, std::vector< int > > voter_ids_
List of voters for each bin.
Definition: hough_3d.h:129
bool getUseInterpolation() const
Gets whether the vote casting procedure interpolates the score between neighboring bins of the Hough ...
Definition: hough_3d.h:328
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...
Definition: hough_3d.h:388
typename SceneRfCloud::ConstPtr SceneRfCloudConstPtr
Definition: hough_3d.h:156
void setSceneRf(const SceneRfCloudConstPtr &scene_rf)
Provide a pointer to the scene dataset&#39;s reference frames.
Definition: hough_3d.h:235
void setHoughBinSize(double bin_size)
Sets the size of each bin into the Hough space.
Definition: hough_3d.h:294