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 <string>
44 
45 #include <pcl/pcl_base.h>
46 #include <pcl/common/io.h> // for getFields
47 #include <pcl/search/kdtree.h>
48 #include <pcl/memory.h>
49 #include <pcl/pcl_macros.h>
50 
51 #include <pcl/registration/correspondence_types.h>
52 
53 namespace pcl
54 {
55  namespace registration
56  {
57  /** \brief Abstract @b CorrespondenceEstimationBase class.
58  * All correspondence estimation methods should inherit from this.
59  * \author Radu B. Rusu
60  * \ingroup registration
61  */
62  template <typename PointSource, typename PointTarget, typename Scalar = float>
63  class CorrespondenceEstimationBase: public PCLBase<PointSource>
64  {
65  public:
66  using Ptr = shared_ptr<CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> >;
67  using ConstPtr = shared_ptr<const CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> >;
68 
69  // using PCLBase<PointSource>::initCompute;
74 
76  using KdTreePtr = typename KdTree::Ptr;
77 
79  using KdTreeReciprocalPtr = typename KdTree::Ptr;
80 
84 
88 
90 
91  /** \brief Empty constructor. */
93  : corr_name_ ("CorrespondenceEstimationBase")
94  , tree_ (new pcl::search::KdTree<PointTarget>)
95  , tree_reciprocal_ (new pcl::search::KdTree<PointSource>)
96  , target_ ()
99  , target_cloud_updated_ (true)
100  , source_cloud_updated_ (true)
101  , force_no_recompute_ (false)
103  {
104  }
105 
106  /** \brief Empty destructor */
108 
109  /** \brief Provide a pointer to the input source
110  * (e.g., the point cloud that we want to align to the target)
111  *
112  * \param[in] cloud the input point cloud source
113  */
114  inline void
116  {
117  source_cloud_updated_ = true;
119  input_fields_ = pcl::getFields<PointSource> ();
120  }
121 
122  /** \brief Get a pointer to the input point cloud dataset target. */
123  inline PointCloudSourceConstPtr const
125  {
126  return (input_ );
127  }
128 
129  /** \brief Provide a pointer to the input target
130  * (e.g., the point cloud that we want to align the input source to)
131  * \param[in] cloud the input point cloud target
132  */
133  inline void
135 
136  /** \brief Get a pointer to the input point cloud dataset target. */
137  inline PointCloudTargetConstPtr const
138  getInputTarget () { return (target_ ); }
139 
140 
141  /** \brief See if this rejector requires source normals */
142  virtual bool
144  { return (false); }
145 
146  /** \brief Abstract method for setting the source normals */
147  virtual void
149  {
150  PCL_WARN ("[pcl::registration::%s::setSourceNormals] This class does not require input source normals", getClassName ().c_str ());
151  }
152 
153  /** \brief See if this rejector requires target normals */
154  virtual bool
156  { return (false); }
157 
158  /** \brief Abstract method for setting the target normals */
159  virtual void
161  {
162  PCL_WARN ("[pcl::registration::%s::setTargetNormals] This class does not require input target normals", getClassName ().c_str ());
163  }
164 
165  /** \brief Provide a pointer to the vector of indices that represent the
166  * input source point cloud.
167  * \param[in] indices a pointer to the vector of indices
168  */
169  inline void
170  setIndicesSource (const IndicesPtr &indices)
171  {
172  setIndices (indices);
173  }
174 
175  /** \brief Get a pointer to the vector of indices used for the source dataset. */
176  inline IndicesPtr const
177  getIndicesSource () { return (indices_); }
178 
179  /** \brief Provide a pointer to the vector of indices that represent the input target point cloud.
180  * \param[in] indices a pointer to the vector of indices
181  */
182  inline void
183  setIndicesTarget (const IndicesPtr &indices)
184  {
185  target_cloud_updated_ = true;
186  target_indices_ = indices;
187  }
188 
189  /** \brief Get a pointer to the vector of indices used for the target dataset. */
190  inline IndicesPtr const
192 
193  /** \brief Provide a pointer to the search object used to find correspondences in
194  * the target cloud.
195  * \param[in] tree a pointer to the spatial search object.
196  * \param[in] force_no_recompute If set to true, this tree will NEVER be
197  * recomputed, regardless of calls to setInputTarget. Only use if you are
198  * confident that the tree will be set correctly.
199  */
200  inline void
202  bool force_no_recompute = false)
203  {
204  tree_ = tree;
205  if (force_no_recompute)
206  {
207  force_no_recompute_ = true;
208  }
209  // Since we just set a new tree, we need to check for updates
210  target_cloud_updated_ = true;
211  }
212 
213  /** \brief Get a pointer to the search method used to find correspondences in the
214  * target cloud. */
215  inline KdTreePtr
217  {
218  return (tree_);
219  }
220 
221  /** \brief Provide a pointer to the search object used to find correspondences in
222  * the source cloud (usually used by reciprocal correspondence finding).
223  * \param[in] tree a pointer to the spatial search object.
224  * \param[in] force_no_recompute If set to true, this tree will NEVER be
225  * recomputed, regardless of calls to setInputSource. Only use if you are
226  * extremely confident that the tree will be set correctly.
227  */
228  inline void
230  bool force_no_recompute = false)
231  {
232  tree_reciprocal_ = tree;
233  if ( force_no_recompute )
234  {
236  }
237  // Since we just set a new tree, we need to check for updates
238  source_cloud_updated_ = true;
239  }
240 
241  /** \brief Get a pointer to the search method used to find correspondences in the
242  * source cloud. */
243  inline KdTreeReciprocalPtr
245  {
246  return (tree_reciprocal_);
247  }
248 
249  /** \brief Determine the correspondences between input and target cloud.
250  * \param[out] correspondences the found correspondences (index of query point, index of target point, distance)
251  * \param[in] max_distance maximum allowed distance between correspondences
252  */
253  virtual void
255  double max_distance = std::numeric_limits<double>::max ()) = 0;
256 
257  /** \brief Determine the reciprocal correspondences between input and target cloud.
258  * A correspondence is considered reciprocal if both Src_i has Tgt_i as a
259  * correspondence, and Tgt_i has Src_i as one.
260  *
261  * \param[out] correspondences the found correspondences (index of query and target point, distance)
262  * \param[in] max_distance maximum allowed distance between correspondences
263  */
264  virtual void
266  double max_distance = std::numeric_limits<double>::max ()) = 0;
267 
268  /** \brief Provide a boost shared pointer to the PointRepresentation to be used
269  * when searching for nearest neighbors.
270  *
271  * \param[in] point_representation the PointRepresentation to be used by the
272  * k-D tree for nearest neighbor search
273  */
274  inline void
276  {
277  point_representation_ = point_representation;
278  }
279 
280  /** \brief Clone and cast to CorrespondenceEstimationBase */
282 
283  protected:
284  /** \brief The correspondence estimation method name. */
285  std::string corr_name_;
286 
287  /** \brief A pointer to the spatial search object used for the target dataset. */
289 
290  /** \brief A pointer to the spatial search object used for the source dataset. */
292 
293 
294 
295  /** \brief The input point cloud dataset target. */
297 
298  /** \brief The target point cloud dataset indices. */
300 
301  /** \brief The point representation used (internal). */
303 
304  /** \brief The transformed input source point cloud dataset. */
306 
307  /** \brief The types of input point fields available. */
308  std::vector<pcl::PCLPointField> input_fields_;
309 
310  /** \brief Abstract class get name method. */
311  inline const std::string&
312  getClassName () const { return (corr_name_); }
313 
314  /** \brief Internal computation initialization. */
315  bool
316  initCompute ();
317 
318  /** \brief Internal computation initialization for reciprocal correspondences. */
319  bool
321 
322  /** \brief Variable that stores whether we have a new target cloud, meaning we need to pre-process it again.
323  * This way, we avoid rebuilding the kd-tree for the target cloud every time the determineCorrespondences () method
324  * is called. */
326  /** \brief Variable that stores whether we have a new source cloud, meaning we need to pre-process it again.
327  * This way, we avoid rebuilding the reciprocal kd-tree for the source cloud every time the determineCorrespondences () method
328  * is called. */
330  /** \brief A flag which, if set, means the tree operating on the target cloud
331  * will never be recomputed*/
333 
334  /** \brief A flag which, if set, means the tree operating on the source cloud
335  * will never be recomputed*/
337 
338  };
339 
340  /** \brief @b CorrespondenceEstimation represents the base class for
341  * determining correspondences between target and query point
342  * sets/features.
343  *
344  * Code example:
345  *
346  * \code
347  * pcl::PointCloud<pcl::PointXYZRGBA>::Ptr source, target;
348  * // ... read or fill in source and target
349  * pcl::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointXYZ> est;
350  * est.setInputSource (source);
351  * est.setInputTarget (target);
352  *
353  * pcl::Correspondences all_correspondences;
354  * // Determine all reciprocal correspondences
355  * est.determineReciprocalCorrespondences (all_correspondences);
356  * \endcode
357  *
358  * \author Radu B. Rusu, Michael Dixon, Dirk Holz
359  * \ingroup registration
360  */
361  template <typename PointSource, typename PointTarget, typename Scalar = float>
362  class CorrespondenceEstimation : public CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>
363  {
364  public:
365  using Ptr = shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar> >;
366  using ConstPtr = shared_ptr<const CorrespondenceEstimation<PointSource, PointTarget, Scalar> >;
367 
382 
384  using KdTreePtr = typename KdTree::Ptr;
385 
389 
393 
395 
396  /** \brief Empty constructor. */
398  {
399  corr_name_ = "CorrespondenceEstimation";
400  }
401 
402  /** \brief Empty destructor */
404 
405  /** \brief Determine the correspondences between input and target cloud.
406  * \param[out] correspondences the found correspondences (index of query point, index of target point, distance)
407  * \param[in] max_distance maximum allowed distance between correspondences
408  */
409  void
411  double max_distance = std::numeric_limits<double>::max ()) override;
412 
413  /** \brief Determine the reciprocal correspondences between input and target cloud.
414  * A correspondence is considered reciprocal if both Src_i has Tgt_i as a
415  * correspondence, and Tgt_i has Src_i as one.
416  *
417  * \param[out] correspondences the found correspondences (index of query and target point, distance)
418  * \param[in] max_distance maximum allowed distance between correspondences
419  */
420  void
422  double max_distance = std::numeric_limits<double>::max ()) override;
423 
424 
425  /** \brief Clone and cast to CorrespondenceEstimationBase */
427  clone () const override
428  {
430  return (copy);
431  }
432  };
433  }
434 }
435 
436 #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:191
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:388
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:124
pcl::registration::CorrespondenceEstimationBase::requiresSourceNormals
virtual bool requiresSourceNormals() const
See if this rejector requires source normals.
Definition: correspondence_estimation.h:143
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:115
pcl::registration::CorrespondenceEstimation::KdTreePtr
typename KdTree::Ptr KdTreePtr
Definition: correspondence_estimation.h:384
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition: correspondence_estimation.h:86
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::KdTreeReciprocalPtr
typename KdTree::Ptr KdTreeReciprocalPtr
Definition: correspondence_estimation.h:79
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:55
pcl::registration::CorrespondenceEstimationBase::initCompute
bool initCompute()
Internal computation initialization.
Definition: correspondence_estimation.hpp:74
pcl::PCLBase
PCL base class.
Definition: pcl_base.h:69
pcl::registration::CorrespondenceEstimationBase
Abstract CorrespondenceEstimationBase class.
Definition: correspondence_estimation.h:63
pcl::registration::CorrespondenceEstimation::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition: correspondence_estimation.h:391
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:216
pcl::registration::CorrespondenceEstimation::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition: correspondence_estimation.h:387
pcl::registration::CorrespondenceEstimationBase::tree_reciprocal_
KdTreeReciprocalPtr tree_reciprocal_
A pointer to the spatial search object used for the source dataset.
Definition: correspondence_estimation.h:291
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:244
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:87
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:183
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition: correspondence_estimation.h:82
pcl::registration::CorrespondenceEstimationBase::initComputeReciprocal
bool initComputeReciprocal()
Internal computation initialization for reciprocal correspondences.
Definition: correspondence_estimation.hpp:99
pcl::registration::CorrespondenceEstimationBase::point_representation_
PointRepresentationConstPtr point_representation_
The point representation used (internal).
Definition: correspondence_estimation.h:302
pcl::registration::CorrespondenceEstimationBase::input_transformed_
PointCloudTargetPtr input_transformed_
The transformed input source point cloud dataset.
Definition: correspondence_estimation.h:305
pcl::registration::CorrespondenceEstimationBase::getClassName
const std::string & getClassName() const
Abstract class get name method.
Definition: correspondence_estimation.h:312
pcl::registration::CorrespondenceEstimation::~CorrespondenceEstimation
~CorrespondenceEstimation()
Empty destructor.
Definition: correspondence_estimation.h:403
pcl::registration::CorrespondenceEstimationBase::target_
PointCloudTargetConstPtr target_
The input point cloud dataset target.
Definition: correspondence_estimation.h:296
pcl::registration::CorrespondenceEstimationBase::getInputTarget
const PointCloudTargetConstPtr getInputTarget()
Get a pointer to the input point cloud dataset target.
Definition: correspondence_estimation.h:138
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:275
pcl::PCLPointCloud2::ConstPtr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
Definition: PCLPointCloud2.h:36
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::Ptr
shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, float > > Ptr
Definition: correspondence_estimation.h:66
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::ConstPtr
shared_ptr< const CorrespondenceEstimationBase< PointSource, PointTarget, float > > ConstPtr
Definition: correspondence_estimation.h:67
pcl::search::KdTree::PointRepresentationConstPtr
typename PointRepresentation< PointT >::ConstPtr PointRepresentationConstPtr
Definition: kdtree.h:80
pcl::registration::CorrespondenceEstimation::CorrespondenceEstimation
CorrespondenceEstimation()
Empty constructor.
Definition: correspondence_estimation.h:397
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:201
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:365
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:120
pcl::registration::CorrespondenceEstimationBase::CorrespondenceEstimationBase
CorrespondenceEstimationBase()
Empty constructor.
Definition: correspondence_estimation.h:92
pcl::registration::CorrespondenceEstimation
CorrespondenceEstimation represents the base class for determining correspondences between target and...
Definition: correspondence_estimation.h:362
pcl::registration::CorrespondenceEstimationBase::corr_name_
std::string corr_name_
The correspondence estimation method name.
Definition: correspondence_estimation.h:285
pcl::registration::CorrespondenceEstimation::clone
CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const override
Clone and cast to CorrespondenceEstimationBase.
Definition: correspondence_estimation.h:427
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::KdTreePtr
typename KdTree::Ptr KdTreePtr
Definition: correspondence_estimation.h:76
pcl::registration::CorrespondenceEstimationBase::requiresTargetNormals
virtual bool requiresTargetNormals() const
See if this rejector requires target normals.
Definition: correspondence_estimation.h:155
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointRepresentationConstPtr
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition: correspondence_estimation.h:89
pcl::registration::CorrespondenceEstimationBase::setTargetNormals
virtual void setTargetNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the target normals.
Definition: correspondence_estimation.h:160
pcl::registration::CorrespondenceEstimation::ConstPtr
shared_ptr< const CorrespondenceEstimation< PointSource, PointTarget, Scalar > > ConstPtr
Definition: correspondence_estimation.h:366
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:170
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:325
pcl::PointCloud< PointSource >::Ptr
shared_ptr< PointCloud< PointSource > > Ptr
Definition: point_cloud.h:406
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:177
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:332
pcl::registration::CorrespondenceEstimationBase::target_indices_
IndicesPtr target_indices_
The target point cloud dataset indices.
Definition: correspondence_estimation.h:299
pcl::registration::CorrespondenceEstimationBase::tree_
KdTreePtr tree_
A pointer to the spatial search object used for the target dataset.
Definition: correspondence_estimation.h:288
pcl::registration::CorrespondenceEstimation::PointRepresentationConstPtr
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition: correspondence_estimation.h:394
pcl::registration::CorrespondenceEstimationBase< PointSource, PointTarget, float >::PointCloudSourceConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition: correspondence_estimation.h:83
pcl::PointCloud< PointSource >::ConstPtr
shared_ptr< const PointCloud< PointSource > > ConstPtr
Definition: point_cloud.h:407
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:392
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:329
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:308
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:336
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:178
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:229
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl::registration::CorrespondenceEstimationBase::~CorrespondenceEstimationBase
~CorrespondenceEstimationBase()
Empty destructor.
Definition: correspondence_estimation.h:107