Point Cloud Library (PCL)  1.11.1-dev
correspondence_estimation.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2011, Willow Garage, Inc.
6  * Copyright (c) 2012-, Open Perception, Inc.
7  *
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  *
14  * * Redistributions of source code must retain the above copyright
15  * notice, this list of conditions and the following disclaimer.
16  * * Redistributions in binary form must reproduce the above
17  * copyright notice, this list of conditions and the following
18  * disclaimer in the documentation and/or other materials provided
19  * with the distribution.
20  * * Neither the name of the copyright holder(s) nor the names of its
21  * contributors may be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35  * POSSIBILITY OF SUCH DAMAGE.
36  *
37  * $Id$
38  *
39  */
40 
41 #pragma once
42 
43 #include <pcl/common/io.h> // for getFields
44 #include <pcl/registration/correspondence_types.h>
45 #include <pcl/search/kdtree.h>
46 #include <pcl/memory.h>
47 #include <pcl/pcl_base.h>
48 #include <pcl/pcl_macros.h>
49 
50 #include <string>
51 
52 namespace pcl {
53 namespace registration {
54 /** \brief Abstract @b CorrespondenceEstimationBase class.
55  * All correspondence estimation methods should inherit from this.
56  * \author Radu B. Rusu
57  * \ingroup registration
58  */
59 template <typename PointSource, typename PointTarget, typename Scalar = float>
60 class CorrespondenceEstimationBase : public PCLBase<PointSource> {
61 public:
62  using Ptr =
63  shared_ptr<CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>>;
64  using ConstPtr =
65  shared_ptr<const CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>>;
66 
67  // using PCLBase<PointSource>::initCompute;
72 
74  using KdTreePtr = typename KdTree::Ptr;
75 
77  using KdTreeReciprocalPtr = typename KdTree::Ptr;
78 
82 
86 
88 
89  /** \brief Empty constructor. */
91  : corr_name_("CorrespondenceEstimationBase")
92  , tree_(new pcl::search::KdTree<PointTarget>)
93  , tree_reciprocal_(new pcl::search::KdTree<PointSource>)
94  , target_()
97  , target_cloud_updated_(true)
98  , source_cloud_updated_(true)
99  , force_no_recompute_(false)
101  {}
102 
103  /** \brief Empty destructor */
105 
106  /** \brief Provide a pointer to the input source
107  * (e.g., the point cloud that we want to align to the target)
108  *
109  * \param[in] cloud the input point cloud source
110  */
111  inline void
113  {
114  source_cloud_updated_ = true;
116  input_fields_ = pcl::getFields<PointSource>();
117  }
118 
119  /** \brief Get a pointer to the input point cloud dataset target. */
120  inline PointCloudSourceConstPtr const
122  {
123  return (input_);
124  }
125 
126  /** \brief Provide a pointer to the input target
127  * (e.g., the point cloud that we want to align the input source to)
128  * \param[in] cloud the input point cloud target
129  */
130  inline void
132 
133  /** \brief Get a pointer to the input point cloud dataset target. */
134  inline PointCloudTargetConstPtr const
136  {
137  return (target_);
138  }
139 
140  /** \brief See if this rejector requires source normals */
141  virtual bool
143  {
144  return (false);
145  }
146 
147  /** \brief Abstract method for setting the source normals */
149  {
150  PCL_WARN("[pcl::registration::%s::setSourceNormals] This class does not require "
151  "input source normals\n",
152  getClassName().c_str());
153  }
154 
155  /** \brief See if this rejector requires target normals */
156  virtual bool
158  {
159  return (false);
160  }
161 
162  /** \brief Abstract method for setting the target normals */
164  {
165  PCL_WARN("[pcl::registration::%s::setTargetNormals] This class does not require "
166  "input target normals\n",
167  getClassName().c_str());
168  }
169 
170  /** \brief Provide a pointer to the vector of indices that represent the
171  * input source point cloud.
172  * \param[in] indices a pointer to the vector of indices
173  */
174  inline void
175  setIndicesSource(const IndicesPtr& indices)
176  {
177  setIndices(indices);
178  }
179 
180  /** \brief Get a pointer to the vector of indices used for the source dataset. */
181  inline IndicesPtr const
183  {
184  return (indices_);
185  }
186 
187  /** \brief Provide a pointer to the vector of indices that represent the input target
188  * point cloud. \param[in] indices a pointer to the vector of indices
189  */
190  inline void
191  setIndicesTarget(const IndicesPtr& indices)
192  {
193  target_cloud_updated_ = true;
194  target_indices_ = indices;
195  }
196 
197  /** \brief Get a pointer to the vector of indices used for the target dataset. */
198  inline IndicesPtr const
200  {
201  return (target_indices_);
202  }
203 
204  /** \brief Provide a pointer to the search object used to find correspondences in
205  * the target cloud.
206  * \param[in] tree a pointer to the spatial search object.
207  * \param[in] force_no_recompute If set to true, this tree will NEVER be
208  * recomputed, regardless of calls to setInputTarget. Only use if you are
209  * confident that the tree will be set correctly.
210  */
211  inline void
212  setSearchMethodTarget(const KdTreePtr& tree, bool force_no_recompute = false)
213  {
214  tree_ = tree;
215  force_no_recompute_ = force_no_recompute;
216  // Since we just set a new tree, we need to check for updates
217  target_cloud_updated_ = true;
218  }
219 
220  /** \brief Get a pointer to the search method used to find correspondences in the
221  * target cloud. */
222  inline KdTreePtr
224  {
225  return (tree_);
226  }
227 
228  /** \brief Provide a pointer to the search object used to find correspondences in
229  * the source cloud (usually used by reciprocal correspondence finding).
230  * \param[in] tree a pointer to the spatial search object.
231  * \param[in] force_no_recompute If set to true, this tree will NEVER be
232  * recomputed, regardless of calls to setInputSource. Only use if you are
233  * extremely confident that the tree will be set correctly.
234  */
235  inline void
237  bool force_no_recompute = false)
238  {
239  tree_reciprocal_ = tree;
240  force_no_recompute_reciprocal_ = force_no_recompute;
241  // Since we just set a new tree, we need to check for updates
242  source_cloud_updated_ = true;
243  }
244 
245  /** \brief Get a pointer to the search method used to find correspondences in the
246  * source cloud. */
247  inline KdTreeReciprocalPtr
249  {
250  return (tree_reciprocal_);
251  }
252 
253  /** \brief Determine the correspondences between input and target cloud.
254  * \param[out] correspondences the found correspondences (index of query point, index
255  * of target point, distance) \param[in] max_distance maximum allowed distance between
256  * correspondences
257  */
258  virtual void
260  pcl::Correspondences& correspondences,
261  double max_distance = std::numeric_limits<double>::max()) = 0;
262 
263  /** \brief Determine the reciprocal correspondences between input and target cloud.
264  * A correspondence is considered reciprocal if both Src_i has Tgt_i as a
265  * correspondence, and Tgt_i has Src_i as one.
266  *
267  * \param[out] correspondences the found correspondences (index of query and target
268  * point, distance) \param[in] max_distance maximum allowed distance between
269  * correspondences
270  */
271  virtual void
273  pcl::Correspondences& correspondences,
274  double max_distance = std::numeric_limits<double>::max()) = 0;
275 
276  /** \brief Provide a boost shared pointer to the PointRepresentation to be used
277  * when searching for nearest neighbors.
278  *
279  * \param[in] point_representation the PointRepresentation to be used by the
280  * k-D tree for nearest neighbor search
281  */
282  inline void
284  {
285  point_representation_ = point_representation;
286  }
287 
288  /** \brief Clone and cast to CorrespondenceEstimationBase */
290  clone() const = 0;
291 
292 protected:
293  /** \brief The correspondence estimation method name. */
294  std::string corr_name_;
295 
296  /** \brief A pointer to the spatial search object used for the target dataset. */
298 
299  /** \brief A pointer to the spatial search object used for the source dataset. */
301 
302  /** \brief The input point cloud dataset target. */
304 
305  /** \brief The target point cloud dataset indices. */
307 
308  /** \brief The point representation used (internal). */
310 
311  /** \brief The transformed input source point cloud dataset. */
313 
314  /** \brief The types of input point fields available. */
315  std::vector<pcl::PCLPointField> input_fields_;
316 
317  /** \brief Abstract class get name method. */
318  inline const std::string&
319  getClassName() const
320  {
321  return (corr_name_);
322  }
323 
324  /** \brief Internal computation initialization. */
325  bool
326  initCompute();
327 
328  /** \brief Internal computation initialization for reciprocal correspondences. */
329  bool
331 
332  /** \brief Variable that stores whether we have a new target cloud, meaning we need to
333  * pre-process it again. This way, we avoid rebuilding the kd-tree for the target
334  * cloud every time the determineCorrespondences () method is called. */
336  /** \brief Variable that stores whether we have a new source cloud, meaning we need to
337  * pre-process it again. This way, we avoid rebuilding the reciprocal kd-tree for the
338  * source cloud every time the determineCorrespondences () method is called. */
340  /** \brief A flag which, if set, means the tree operating on the target cloud
341  * will never be recomputed*/
343 
344  /** \brief A flag which, if set, means the tree operating on the source cloud
345  * will never be recomputed*/
347 };
348 
349 /** \brief @b CorrespondenceEstimation represents the base class for
350  * determining correspondences between target and query point
351  * sets/features.
352  *
353  * Code example:
354  *
355  * \code
356  * pcl::PointCloud<pcl::PointXYZRGBA>::Ptr source, target;
357  * // ... read or fill in source and target
358  * pcl::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointXYZ> est;
359  * est.setInputSource (source);
360  * est.setInputTarget (target);
361  *
362  * pcl::Correspondences all_correspondences;
363  * // Determine all reciprocal correspondences
364  * est.determineReciprocalCorrespondences (all_correspondences);
365  * \endcode
366  *
367  * \author Radu B. Rusu, Michael Dixon, Dirk Holz
368  * \ingroup registration
369  */
370 template <typename PointSource, typename PointTarget, typename Scalar = float>
372 : public CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> {
373 public:
374  using Ptr = shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar>>;
375  using ConstPtr =
376  shared_ptr<const CorrespondenceEstimation<PointSource, PointTarget, Scalar>>;
377 
396 
398  using KdTreePtr = typename KdTree::Ptr;
399 
403 
407 
409 
410  /** \brief Empty constructor. */
411  CorrespondenceEstimation() { corr_name_ = "CorrespondenceEstimation"; }
412 
413  /** \brief Empty destructor */
415 
416  /** \brief Determine the correspondences between input and target cloud.
417  * \param[out] correspondences the found correspondences (index of query point, index
418  * of target point, distance) \param[in] max_distance maximum allowed distance between
419  * correspondences
420  */
421  void
423  pcl::Correspondences& correspondences,
424  double max_distance = std::numeric_limits<double>::max()) override;
425 
426  /** \brief Determine the reciprocal correspondences between input and target cloud.
427  * A correspondence is considered reciprocal if both Src_i has Tgt_i as a
428  * correspondence, and Tgt_i has Src_i as one.
429  *
430  * \param[out] correspondences the found correspondences (index of query and target
431  * point, distance) \param[in] max_distance maximum allowed distance between
432  * correspondences
433  */
434  void
436  pcl::Correspondences& correspondences,
437  double max_distance = std::numeric_limits<double>::max()) override;
438 
439  /** \brief Clone and cast to CorrespondenceEstimationBase */
441  clone() const override
442  {
444  return (copy);
445  }
446 };
447 } // namespace registration
448 } // namespace pcl
449 
450 #include <pcl/registration/impl/correspondence_estimation.hpp>
pcl::registration::CorrespondenceEstimationBase::getIndicesTarget
const IndicesPtr getIndicesTarget()
Get a pointer to the vector of indices used for the target dataset.
Definition: correspondence_estimation.h:199
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl
Definition: convolution.h:46
pcl::registration::CorrespondenceEstimation::PointCloudSourceConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition: correspondence_estimation.h:402
pcl::IndicesPtr
shared_ptr< Indices > IndicesPtr
Definition: pcl_base.h:58
pcl::PCLBase< PointSource >::input_
PointCloudConstPtr input_
The input point cloud dataset.
Definition: pcl_base.h:147
pcl::registration::CorrespondenceEstimationBase::getInputSource
const PointCloudSourceConstPtr getInputSource()
Get a pointer to the input point cloud dataset target.
Definition: correspondence_estimation.h:121
pcl::registration::CorrespondenceEstimationBase::requiresSourceNormals
virtual bool requiresSourceNormals() const
See if this rejector requires source normals.
Definition: correspondence_estimation.h:142
pcl::registration::CorrespondenceEstimationBase::setInputSource
void setInputSource(const PointCloudSourceConstPtr &cloud)
Provide a pointer to the input source (e.g., the point cloud that we want to align to the target)
Definition: correspondence_estimation.h:112
pcl::registration::CorrespondenceEstimation::KdTreePtr
typename KdTree::Ptr KdTreePtr
Definition: correspondence_estimation.h:398
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition: correspondence_estimation.h:84
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::KdTreeReciprocalPtr
typename KdTree::Ptr KdTreeReciprocalPtr
Definition: correspondence_estimation.h:77
pcl::registration::CorrespondenceEstimationBase::setInputTarget
void setInputTarget(const PointCloudTargetConstPtr &cloud)
Provide a pointer to the input target (e.g., the point cloud that we want to align the input source t...
Definition: correspondence_estimation.hpp:53
pcl::registration::CorrespondenceEstimationBase::initCompute
bool initCompute()
Internal computation initialization.
Definition: correspondence_estimation.hpp:73
pcl::PCLBase
PCL base class.
Definition: pcl_base.h:69
pcl::registration::CorrespondenceEstimationBase
Abstract CorrespondenceEstimationBase class.
Definition: correspondence_estimation.h:60
pcl::registration::CorrespondenceEstimation::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition: correspondence_estimation.h:405
pcl::registration::CorrespondenceEstimationBase::getSearchMethodTarget
KdTreePtr getSearchMethodTarget() const
Get a pointer to the search method used to find correspondences in the target cloud.
Definition: correspondence_estimation.h:223
pcl::registration::CorrespondenceEstimation::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition: correspondence_estimation.h:401
pcl::registration::CorrespondenceEstimationBase::tree_reciprocal_
KdTreeReciprocalPtr tree_reciprocal_
A pointer to the spatial search object used for the source dataset.
Definition: correspondence_estimation.h:300
pcl::PointCloud< PointSource >
pcl::registration::CorrespondenceEstimationBase::getSearchMethodSource
KdTreeReciprocalPtr getSearchMethodSource() const
Get a pointer to the search method used to find correspondences in the source cloud.
Definition: correspondence_estimation.h:248
pcl::PCLBase::setInputCloud
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
Definition: pcl_base.hpp:65
pcl::registration::CorrespondenceEstimationBase::determineReciprocalCorrespondences
virtual void determineReciprocalCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())=0
Determine the reciprocal correspondences between input and target cloud.
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudTargetConstPtr
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition: correspondence_estimation.h:85
pcl::search::KdTree::Ptr
shared_ptr< KdTree< PointT, Tree > > Ptr
Definition: kdtree.h:75
pcl::registration::CorrespondenceEstimationBase::clone
virtual CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const =0
Clone and cast to CorrespondenceEstimationBase.
pcl::registration::CorrespondenceEstimationBase::setIndicesTarget
void setIndicesTarget(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represent the input target point cloud.
Definition: correspondence_estimation.h:191
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition: correspondence_estimation.h:80
pcl::registration::CorrespondenceEstimationBase::initComputeReciprocal
bool initComputeReciprocal()
Internal computation initialization for reciprocal correspondences.
Definition: correspondence_estimation.hpp:97
pcl::registration::CorrespondenceEstimationBase::point_representation_
PointRepresentationConstPtr point_representation_
The point representation used (internal).
Definition: correspondence_estimation.h:309
pcl::registration::CorrespondenceEstimationBase::input_transformed_
PointCloudTargetPtr input_transformed_
The transformed input source point cloud dataset.
Definition: correspondence_estimation.h:312
pcl::registration::CorrespondenceEstimationBase::getClassName
const std::string & getClassName() const
Abstract class get name method.
Definition: correspondence_estimation.h:319
pcl::registration::CorrespondenceEstimation::~CorrespondenceEstimation
~CorrespondenceEstimation()
Empty destructor.
Definition: correspondence_estimation.h:414
pcl::registration::CorrespondenceEstimationBase::target_
PointCloudTargetConstPtr target_
The input point cloud dataset target.
Definition: correspondence_estimation.h:303
pcl::registration::CorrespondenceEstimationBase::getInputTarget
const PointCloudTargetConstPtr getInputTarget()
Get a pointer to the input point cloud dataset target.
Definition: correspondence_estimation.h:135
pcl::registration::CorrespondenceEstimationBase::setPointRepresentation
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a boost shared pointer to the PointRepresentation to be used when searching for nearest neigh...
Definition: correspondence_estimation.h:283
pcl::PCLPointCloud2::ConstPtr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
Definition: PCLPointCloud2.h:36
pcl::registration::CorrespondenceEstimationBase::Ptr
shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > Ptr
Definition: correspondence_estimation.h:63
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::ConstPtr
shared_ptr< const CorrespondenceEstimationBase< PointSource, PointTarget, float > > ConstPtr
Definition: correspondence_estimation.h:65
pcl::search::KdTree::PointRepresentationConstPtr
typename PointRepresentation< PointT >::ConstPtr PointRepresentationConstPtr
Definition: kdtree.h:80
pcl::registration::CorrespondenceEstimation::CorrespondenceEstimation
CorrespondenceEstimation()
Empty constructor.
Definition: correspondence_estimation.h:411
pcl::registration::CorrespondenceEstimationBase::setSearchMethodTarget
void setSearchMethodTarget(const KdTreePtr &tree, bool force_no_recompute=false)
Provide a pointer to the search object used to find correspondences in the target cloud.
Definition: correspondence_estimation.h:212
pcl::search::KdTree
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
Definition: kdtree.h:61
pcl::registration::CorrespondenceEstimation::Ptr
shared_ptr< CorrespondenceEstimation< PointSource, PointTarget, Scalar > > Ptr
Definition: correspondence_estimation.h:374
pcl::PCLBase< PointSource >::setIndices
virtual void setIndices(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data.
Definition: pcl_base.hpp:72
pcl::registration::CorrespondenceEstimation::determineCorrespondences
void determineCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
Determine the correspondences between input and target cloud.
Definition: correspondence_estimation.hpp:117
pcl::registration::CorrespondenceEstimationBase::CorrespondenceEstimationBase
CorrespondenceEstimationBase()
Empty constructor.
Definition: correspondence_estimation.h:90
pcl::registration::CorrespondenceEstimation
CorrespondenceEstimation represents the base class for determining correspondences between target and...
Definition: correspondence_estimation.h:371
pcl::registration::CorrespondenceEstimationBase::corr_name_
std::string corr_name_
The correspondence estimation method name.
Definition: correspondence_estimation.h:294
pcl::registration::CorrespondenceEstimation::clone
CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const override
Clone and cast to CorrespondenceEstimationBase.
Definition: correspondence_estimation.h:441
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::KdTreePtr
typename KdTree::Ptr KdTreePtr
Definition: correspondence_estimation.h:74
pcl::registration::CorrespondenceEstimationBase::requiresTargetNormals
virtual bool requiresTargetNormals() const
See if this rejector requires target normals.
Definition: correspondence_estimation.h:157
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointRepresentationConstPtr
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition: correspondence_estimation.h:87
pcl::registration::CorrespondenceEstimationBase::setTargetNormals
virtual void setTargetNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the target normals.
Definition: correspondence_estimation.h:163
pcl::registration::CorrespondenceEstimation::ConstPtr
shared_ptr< const CorrespondenceEstimation< PointSource, PointTarget, Scalar > > ConstPtr
Definition: correspondence_estimation.h:376
pcl::registration::CorrespondenceEstimationBase::setIndicesSource
void setIndicesSource(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represent the input source point cloud.
Definition: correspondence_estimation.h:175
pcl::registration::CorrespondenceEstimationBase::target_cloud_updated_
bool target_cloud_updated_
Variable that stores whether we have a new target cloud, meaning we need to pre-process it again.
Definition: correspondence_estimation.h:335
pcl::PointCloud< PointSource >::Ptr
shared_ptr< PointCloud< PointSource > > Ptr
Definition: point_cloud.h:407
pcl::PCLBase< PointSource >::indices_
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition: pcl_base.h:150
pcl::registration::CorrespondenceEstimationBase::getIndicesSource
const IndicesPtr getIndicesSource()
Get a pointer to the vector of indices used for the source dataset.
Definition: correspondence_estimation.h:182
pcl::registration::CorrespondenceEstimationBase::force_no_recompute_
bool force_no_recompute_
A flag which, if set, means the tree operating on the target cloud will never be recomputed.
Definition: correspondence_estimation.h:342
pcl::registration::CorrespondenceEstimationBase::target_indices_
IndicesPtr target_indices_
The target point cloud dataset indices.
Definition: correspondence_estimation.h:306
pcl::registration::CorrespondenceEstimationBase::tree_
KdTreePtr tree_
A pointer to the spatial search object used for the target dataset.
Definition: correspondence_estimation.h:297
pcl::registration::CorrespondenceEstimation::PointRepresentationConstPtr
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition: correspondence_estimation.h:408
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudSourceConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition: correspondence_estimation.h:81
pcl::PointCloud< PointSource >::ConstPtr
shared_ptr< const PointCloud< PointSource > > ConstPtr
Definition: point_cloud.h:408
pcl::registration::CorrespondenceEstimationBase::setSourceNormals
virtual void setSourceNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the source normals.
Definition: correspondence_estimation.h:148
pcl::registration::CorrespondenceEstimation::PointCloudTargetConstPtr
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition: correspondence_estimation.h:406
pcl::registration::CorrespondenceEstimationBase::source_cloud_updated_
bool source_cloud_updated_
Variable that stores whether we have a new source cloud, meaning we need to pre-process it again.
Definition: correspondence_estimation.h:339
pcl::registration::CorrespondenceEstimationBase::determineCorrespondences
virtual void determineCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())=0
Determine the correspondences between input and target cloud.
pcl::registration::CorrespondenceEstimationBase::input_fields_
std::vector< pcl::PCLPointField > input_fields_
The types of input point fields available.
Definition: correspondence_estimation.h:315
pcl::Correspondences
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Definition: correspondence.h:89
pcl::registration::CorrespondenceEstimationBase::force_no_recompute_reciprocal_
bool force_no_recompute_reciprocal_
A flag which, if set, means the tree operating on the source cloud will never be recomputed.
Definition: correspondence_estimation.h:346
pcl::registration::CorrespondenceEstimation::determineReciprocalCorrespondences
void determineReciprocalCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
Determine the reciprocal correspondences between input and target cloud.
Definition: correspondence_estimation.hpp:174
pcl::registration::CorrespondenceEstimationBase::setSearchMethodSource
void setSearchMethodSource(const KdTreeReciprocalPtr &tree, bool force_no_recompute=false)
Provide a pointer to the search object used to find correspondences in the source cloud (usually used...
Definition: correspondence_estimation.h:236
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl::registration::CorrespondenceEstimationBase::~CorrespondenceEstimationBase
~CorrespondenceEstimationBase()
Empty destructor.
Definition: correspondence_estimation.h:104