correspondence_estimation.h
/*
* Software License Agreement (BSD License)
*
* Point Cloud Library (PCL) - www.pointclouds.org
* Copyright (c) 2010-2011, Willow Garage, Inc.
* Copyright (c) 2012-, Open Perception, Inc.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of the copyright holder(s) nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
*/
#ifndef PCL_REGISTRATION_CORRESPONDENCE_ESTIMATION_H_
#define PCL_REGISTRATION_CORRESPONDENCE_ESTIMATION_H_
#include <string>
#include <pcl/pcl_base.h>
#include <pcl/common/transforms.h>
#include <pcl/search/kdtree.h>
#include <pcl/pcl_macros.h>
#include <pcl/registration/correspondence_types.h>
namespace pcl
{
namespace registration
{
/** \brief Abstract @b CorrespondenceEstimationBase class.
* All correspondence estimation methods should inherit from this.
* \author Radu B. Rusu
* \ingroup registration
*/
template <typename PointSource, typename PointTarget, typename Scalar = float>
class CorrespondenceEstimationBase: public PCLBase<PointSource>
{
public:
typedef boost::shared_ptr<CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> > Ptr;
typedef boost::shared_ptr<const CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> > ConstPtr;
// using PCLBase<PointSource>::initCompute;
using PCLBase<PointSource>::deinitCompute;
using PCLBase<PointSource>::input_;
using PCLBase<PointSource>::indices_;
using PCLBase<PointSource>::setIndices;
typedef pcl::search::KdTree<PointTarget> KdTree;
typedef typename KdTree::Ptr KdTreePtr;
typedef pcl::search::KdTree<PointSource> KdTreeReciprocal;
typedef typename KdTree::Ptr KdTreeReciprocalPtr;
typedef pcl::PointCloud<PointSource> PointCloudSource;
typedef typename PointCloudSource::Ptr PointCloudSourcePtr;
typedef typename PointCloudSource::ConstPtr PointCloudSourceConstPtr;
typedef pcl::PointCloud<PointTarget> PointCloudTarget;
typedef typename PointCloudTarget::Ptr PointCloudTargetPtr;
typedef typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr;
typedef typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr;
/** \brief Empty constructor. */
CorrespondenceEstimationBase ()
: corr_name_ ("CorrespondenceEstimationBase")
, tree_ (new pcl::search::KdTree<PointTarget>)
, tree_reciprocal_ (new pcl::search::KdTree<PointSource>)
, target_ ()
, target_indices_ ()
, point_representation_ ()
, input_transformed_ ()
, input_fields_ ()
, target_cloud_updated_ (true)
, source_cloud_updated_ (true)
, force_no_recompute_ (false)
, force_no_recompute_reciprocal_ (false)
{
}
/** \brief Empty destructor */
virtual ~CorrespondenceEstimationBase () {}
/** \brief Provide a pointer to the input source
* (e.g., the point cloud that we want to align to the target)
*
* \param[in] cloud the input point cloud source
*/
PCL_DEPRECATED ("[pcl::registration::CorrespondenceEstimationBase::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.")
void
setInputCloud (const PointCloudSourceConstPtr &cloud);
/** \brief Get a pointer to the input point cloud dataset target. */
PCL_DEPRECATED ("[pcl::registration::CorrespondenceEstimationBase::getInputCloud] getInputCloud is deprecated. Please use getInputSource instead.")
PointCloudSourceConstPtr const
getInputCloud ();
/** \brief Provide a pointer to the input source
* (e.g., the point cloud that we want to align to the target)
*
* \param[in] cloud the input point cloud source
*/
inline void
setInputSource (const PointCloudSourceConstPtr &cloud)
{
source_cloud_updated_ = true;
PCLBase<PointSource>::setInputCloud (cloud);
pcl::getFields (*cloud, input_fields_);
}
/** \brief Get a pointer to the input point cloud dataset target. */
inline PointCloudSourceConstPtr const
getInputSource ()
{
return (input_ );
}
/** \brief Provide a pointer to the input target
* (e.g., the point cloud that we want to align the input source to)
* \param[in] cloud the input point cloud target
*/
inline void
setInputTarget (const PointCloudTargetConstPtr &cloud);
/** \brief Get a pointer to the input point cloud dataset target. */
inline PointCloudTargetConstPtr const
getInputTarget () { return (target_ ); }
/** \brief See if this rejector requires source normals */
virtual bool
requiresSourceNormals () const
{ return (false); }
/** \brief Abstract method for setting the source normals */
virtual void
setSourceNormals (pcl::PCLPointCloud2::ConstPtr /*cloud2*/)
{
PCL_WARN ("[pcl::registration::%s::setSourceNormals] This class does not require input source normals", getClassName ().c_str ());
}
/** \brief See if this rejector requires target normals */
virtual bool
requiresTargetNormals () const
{ return (false); }
/** \brief Abstract method for setting the target normals */
virtual void
setTargetNormals (pcl::PCLPointCloud2::ConstPtr /*cloud2*/)
{
PCL_WARN ("[pcl::registration::%s::setTargetNormals] This class does not require input target normals", getClassName ().c_str ());
}
/** \brief Provide a pointer to the vector of indices that represent the
* input source point cloud.
* \param[in] indices a pointer to the vector of indices
*/
inline void
setIndicesSource (const IndicesPtr &indices)
{
setIndices (indices);
}
/** \brief Get a pointer to the vector of indices used for the source dataset. */
inline IndicesPtr const
getIndicesSource () { return (indices_); }
/** \brief Provide a pointer to the vector of indices that represent the input target point cloud.
* \param[in] indices a pointer to the vector of indices
*/
inline void
setIndicesTarget (const IndicesPtr &indices)
{
target_cloud_updated_ = true;
target_indices_ = indices;
}
/** \brief Get a pointer to the vector of indices used for the target dataset. */
inline IndicesPtr const
getIndicesTarget () { return (target_indices_); }
/** \brief Provide a pointer to the search object used to find correspondences in
* the target cloud.
* \param[in] tree a pointer to the spatial search object.
* \param[in] force_no_recompute If set to true, this tree will NEVER be
* recomputed, regardless of calls to setInputTarget. Only use if you are
* confident that the tree will be set correctly.
*/
inline void
setSearchMethodTarget (const KdTreePtr &tree,
bool force_no_recompute = false)
{
tree_ = tree;
if (force_no_recompute)
{
force_no_recompute_ = true;
}
// Since we just set a new tree, we need to check for updates
target_cloud_updated_ = true;
}
/** \brief Get a pointer to the search method used to find correspondences in the
* target cloud. */
inline KdTreePtr
getSearchMethodTarget () const
{
return (tree_);
}
/** \brief Provide a pointer to the search object used to find correspondences in
* the source cloud (usually used by reciprocal correspondence finding).
* \param[in] tree a pointer to the spatial search object.
* \param[in] force_no_recompute If set to true, this tree will NEVER be
* recomputed, regardless of calls to setInputSource. Only use if you are
* extremely confident that the tree will be set correctly.
*/
inline void
setSearchMethodSource (const KdTreeReciprocalPtr &tree,
bool force_no_recompute = false)
{
tree_reciprocal_ = tree;
if ( force_no_recompute )
{
force_no_recompute_reciprocal_ = true;
}
// Since we just set a new tree, we need to check for updates
source_cloud_updated_ = true;
}
/** \brief Get a pointer to the search method used to find correspondences in the
* source cloud. */
inline KdTreeReciprocalPtr
getSearchMethodSource () const
{
return (tree_reciprocal_);
}
/** \brief Determine the correspondences between input and target cloud.
* \param[out] correspondences the found correspondences (index of query point, index of target point, distance)
* \param[in] max_distance maximum allowed distance between correspondences
*/
virtual void
determineCorrespondences (pcl::Correspondences &correspondences,
double max_distance = std::numeric_limits<double>::max ()) = 0;
/** \brief Determine the reciprocal correspondences between input and target cloud.
* A correspondence is considered reciprocal if both Src_i has Tgt_i as a
* correspondence, and Tgt_i has Src_i as one.
*
* \param[out] correspondences the found correspondences (index of query and target point, distance)
* \param[in] max_distance maximum allowed distance between correspondences
*/
virtual void
determineReciprocalCorrespondences (pcl::Correspondences &correspondences,
double max_distance = std::numeric_limits<double>::max ()) = 0;
/** \brief Provide a boost shared pointer to the PointRepresentation to be used
* when searching for nearest neighbors.
*
* \param[in] point_representation the PointRepresentation to be used by the
* k-D tree for nearest neighbor search
*/
inline void
setPointRepresentation (const PointRepresentationConstPtr &point_representation)
{
point_representation_ = point_representation;
}
/** \brief Clone and cast to CorrespondenceEstimationBase */
virtual boost::shared_ptr< CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> > clone () const = 0;
protected:
/** \brief The correspondence estimation method name. */
std::string corr_name_;
/** \brief A pointer to the spatial search object used for the target dataset. */
KdTreePtr tree_;
/** \brief A pointer to the spatial search object used for the source dataset. */
KdTreeReciprocalPtr tree_reciprocal_;
/** \brief The input point cloud dataset target. */
PointCloudTargetConstPtr target_;
/** \brief The target point cloud dataset indices. */
IndicesPtr target_indices_;
/** \brief The point representation used (internal). */
PointRepresentationConstPtr point_representation_;
/** \brief The transformed input source point cloud dataset. */
PointCloudTargetPtr input_transformed_;
/** \brief The types of input point fields available. */
std::vector<pcl::PCLPointField> input_fields_;
/** \brief Abstract class get name method. */
inline const std::string&
getClassName () const { return (corr_name_); }
/** \brief Internal computation initalization. */
bool
initCompute ();
/** \brief Internal computation initalization for reciprocal correspondences. */
bool
initComputeReciprocal ();
/** \brief Variable that stores whether we have a new target cloud, meaning we need to pre-process it again.
* This way, we avoid rebuilding the kd-tree for the target cloud every time the determineCorrespondences () method
* is called. */
bool target_cloud_updated_;
/** \brief Variable that stores whether we have a new source cloud, meaning we need to pre-process it again.
* This way, we avoid rebuilding the reciprocal kd-tree for the source cloud every time the determineCorrespondences () method
* is called. */
bool source_cloud_updated_;
/** \brief A flag which, if set, means the tree operating on the target cloud
* will never be recomputed*/
bool force_no_recompute_;
/** \brief A flag which, if set, means the tree operating on the source cloud
* will never be recomputed*/
bool force_no_recompute_reciprocal_;
};
/** \brief @b CorrespondenceEstimation represents the base class for
* determining correspondences between target and query point
* sets/features.
*
* Code example:
*
* \code
* pcl::PointCloud<pcl::PointXYZRGBA>::Ptr source, target;
* // ... read or fill in source and target
* pcl::CorrespondenceEstimation<pcl::PointXYZ, pcl::PointXYZ> est;
* est.setInputSource (source);
* est.setInputTarget (target);
*
* pcl::Correspondences all_correspondences;
* // Determine all reciprocal correspondences
* est.determineReciprocalCorrespondences (all_correspondences);
* \endcode
*
* \author Radu B. Rusu, Michael Dixon, Dirk Holz
* \ingroup registration
*/
template <typename PointSource, typename PointTarget, typename Scalar = float>
class CorrespondenceEstimation : public CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>
{
public:
typedef boost::shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar> > Ptr;
typedef boost::shared_ptr<const CorrespondenceEstimation<PointSource, PointTarget, Scalar> > ConstPtr;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::point_representation_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::input_transformed_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::tree_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::tree_reciprocal_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::target_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::corr_name_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::target_indices_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::getClassName;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::initCompute;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::initComputeReciprocal;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::input_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::indices_;
using CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::input_fields_;
using PCLBase<PointSource>::deinitCompute;
typedef pcl::search::KdTree<PointTarget> KdTree;
typedef typename pcl::search::KdTree<PointTarget>::Ptr KdTreePtr;
typedef pcl::PointCloud<PointSource> PointCloudSource;
typedef typename PointCloudSource::Ptr PointCloudSourcePtr;
typedef typename PointCloudSource::ConstPtr PointCloudSourceConstPtr;
typedef pcl::PointCloud<PointTarget> PointCloudTarget;
typedef typename PointCloudTarget::Ptr PointCloudTargetPtr;
typedef typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr;
typedef typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr;
/** \brief Empty constructor. */
CorrespondenceEstimation ()
{
corr_name_ = "CorrespondenceEstimation";
}
/** \brief Empty destructor */
virtual ~CorrespondenceEstimation () {}
/** \brief Determine the correspondences between input and target cloud.
* \param[out] correspondences the found correspondences (index of query point, index of target point, distance)
* \param[in] max_distance maximum allowed distance between correspondences
*/
virtual void
determineCorrespondences (pcl::Correspondences &correspondences,
double max_distance = std::numeric_limits<double>::max ());
/** \brief Determine the reciprocal correspondences between input and target cloud.
* A correspondence is considered reciprocal if both Src_i has Tgt_i as a
* correspondence, and Tgt_i has Src_i as one.
*
* \param[out] correspondences the found correspondences (index of query and target point, distance)
* \param[in] max_distance maximum allowed distance between correspondences
*/
virtual void
determineReciprocalCorrespondences (pcl::Correspondences &correspondences,
double max_distance = std::numeric_limits<double>::max ());
/** \brief Clone and cast to CorrespondenceEstimationBase */
virtual boost::shared_ptr< CorrespondenceEstimationBase<PointSource, PointTarget, Scalar> >
clone () const
{
Ptr copy (new CorrespondenceEstimation<PointSource, PointTarget, Scalar> (*this));
return (copy);
}
};
}
}
#include <pcl/registration/impl/correspondence_estimation.hpp>
#endif /* PCL_REGISTRATION_CORRESPONDENCE_ESTIMATION_H_ */
pcl::search::KdTree< PointTarget >
pcl::registration::CorrespondenceEstimation::PointRepresentationConstPtr
KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition: correspondence_estimation.h:410
pcl::registration::CorrespondenceEstimationBase::getClassName
const std::string & getClassName() const
Abstract class get name method.
Definition: correspondence_estimation.h:328
pcl::registration::CorrespondenceEstimationBase::setSourceNormals
virtual void setSourceNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the source normals.
Definition: correspondence_estimation.h:164
pcl::registration::CorrespondenceEstimationBase::CorrespondenceEstimationBase
CorrespondenceEstimationBase()
Empty constructor.
Definition: correspondence_estimation.h:92
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:348
pcl::registration::CorrespondenceEstimation::Ptr
boost::shared_ptr< CorrespondenceEstimation< PointSource, PointTarget, Scalar > > Ptr
Definition: correspondence_estimation.h:381
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:245
pcl::registration::CorrespondenceEstimationBase::getIndicesTarget
IndicesPtr const getIndicesTarget()
Get a pointer to the vector of indices used for the target dataset.
Definition: correspondence_estimation.h:207
pcl::IndicesPtr
boost::shared_ptr< std::vector< int > > IndicesPtr
Definition: pcl_base.h:60
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:345
pcl::registration::CorrespondenceEstimationBase::target_
PointCloudTargetConstPtr target_
The input point cloud dataset target.
Definition: correspondence_estimation.h:312
pcl::registration::CorrespondenceEstimationBase::corr_name_
std::string corr_name_
The correspondence estimation method name.
Definition: correspondence_estimation.h:301
pcl
Definition: cloud_iterator.h:46
pcl::registration::CorrespondenceEstimationBase::KdTreePtr
KdTree::Ptr KdTreePtr
Definition: correspondence_estimation.h:76
pcl::registration::CorrespondenceEstimation::CorrespondenceEstimation
CorrespondenceEstimation()
Empty constructor.
Definition: correspondence_estimation.h:413
pcl::registration::CorrespondenceEstimation::KdTreePtr
pcl::search::KdTree< PointTarget >::Ptr KdTreePtr
Definition: correspondence_estimation.h:400
pcl::PCLBase< PointSource >::indices_
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition: pcl_base.h:153
pcl::registration::CorrespondenceEstimationBase::getInputSource
PointCloudSourceConstPtr const getInputSource()
Get a pointer to the input point cloud dataset target.
Definition: correspondence_estimation.h:140
pcl::registration::CorrespondenceEstimation::KdTree
pcl::search::KdTree< PointTarget > KdTree
Definition: correspondence_estimation.h:399
pcl::registration::CorrespondenceEstimationBase::setInputCloud
void setInputCloud(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.hpp:48
pcl::registration::CorrespondenceEstimationBase::point_representation_
PointRepresentationConstPtr point_representation_
The point representation used (internal).
Definition: correspondence_estimation.h:318
pcl::registration::CorrespondenceEstimation::PointCloudTarget
pcl::PointCloud< PointTarget > PointCloudTarget
Definition: correspondence_estimation.h:406
pcl::registration::CorrespondenceEstimationBase::PointCloudSourcePtr
PointCloudSource::Ptr PointCloudSourcePtr
Definition: correspondence_estimation.h:82
pcl::registration::CorrespondenceEstimationBase::requiresTargetNormals
virtual bool requiresTargetNormals() const
See if this rejector requires target normals.
Definition: correspondence_estimation.h:171
pcl::registration::CorrespondenceEstimationBase::KdTree
pcl::search::KdTree< PointTarget > KdTree
Definition: correspondence_estimation.h:75
pcl::KdTree::Ptr
boost::shared_ptr< KdTree< PointT > > Ptr
Definition: kdtree.h:71
pcl::registration::CorrespondenceEstimation::PointCloudTargetPtr
PointCloudTarget::Ptr PointCloudTargetPtr
Definition: correspondence_estimation.h:407
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:232
pcl::registration::CorrespondenceEstimationBase::getIndicesSource
IndicesPtr const getIndicesSource()
Get a pointer to the vector of indices used for the source dataset.
Definition: correspondence_estimation.h:193
pcl::registration::CorrespondenceEstimationBase::input_fields_
std::vector< pcl::PCLPointField > input_fields_
The types of input point fields available.
Definition: correspondence_estimation.h:324
pcl::registration::CorrespondenceEstimationBase::requiresSourceNormals
virtual bool requiresSourceNormals() const
See if this rejector requires source normals.
Definition: correspondence_estimation.h:159
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:291
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:341
pcl::registration::CorrespondenceEstimation::PointCloudTargetConstPtr
PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition: correspondence_estimation.h:408
pcl::PointCloud< PointSource >::Ptr
boost::shared_ptr< PointCloud< PointSource > > Ptr
Definition: point_cloud.h:428
pcl::registration::CorrespondenceEstimation::~CorrespondenceEstimation
virtual ~CorrespondenceEstimation()
Empty destructor.
Definition: correspondence_estimation.h:419
pcl::registration::CorrespondenceEstimationBase::PointCloudTargetPtr
PointCloudTarget::Ptr PointCloudTargetPtr
Definition: correspondence_estimation.h:86
pcl::registration::CorrespondenceEstimationBase::getInputCloud
PointCloudSourceConstPtr const getInputCloud()
Get a pointer to the input point cloud dataset target.
Definition: correspondence_estimation.hpp:55
pcl::registration::CorrespondenceEstimationBase::target_indices_
IndicesPtr target_indices_
The target point cloud dataset indices.
Definition: correspondence_estimation.h:315
pcl::registration::CorrespondenceEstimation::PointCloudSourcePtr
PointCloudSource::Ptr PointCloudSourcePtr
Definition: correspondence_estimation.h:403
pcl::registration::CorrespondenceEstimationBase::initCompute
bool initCompute()
Internal computation initalization.
Definition: correspondence_estimation.hpp:81
pcl::search::KdTree::Ptr
boost::shared_ptr< KdTree< PointT, Tree > > Ptr
Definition: kdtree.h:79
pcl::registration::CorrespondenceEstimationBase::PointCloudTarget
pcl::PointCloud< PointTarget > PointCloudTarget
Definition: correspondence_estimation.h:85
pcl::registration::CorrespondenceEstimation::PointCloudSourceConstPtr
PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition: correspondence_estimation.h:404
pcl::registration::CorrespondenceEstimationBase::PointCloudTargetConstPtr
PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition: correspondence_estimation.h:87
pcl::registration::CorrespondenceEstimationBase::KdTreeReciprocal
pcl::search::KdTree< PointSource > KdTreeReciprocal
Definition: correspondence_estimation.h:78
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::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:131
pcl::registration::CorrespondenceEstimationBase::input_transformed_
PointCloudTargetPtr input_transformed_
The transformed input source point cloud dataset.
Definition: correspondence_estimation.h:321
pcl::registration::CorrespondenceEstimation::ConstPtr
boost::shared_ptr< const CorrespondenceEstimation< PointSource, PointTarget, Scalar > > ConstPtr
Definition: correspondence_estimation.h:382
pcl::registration::CorrespondenceEstimationBase::getInputTarget
PointCloudTargetConstPtr const getInputTarget()
Get a pointer to the input point cloud dataset target.
Definition: correspondence_estimation.h:154
pcl::registration::CorrespondenceEstimationBase::tree_
KdTreePtr tree_
A pointer to the spatial search object used for the target dataset.
Definition: correspondence_estimation.h:304
pcl::PCLBase
PCL base class.
Definition: pcl_base.h:68
pcl::Correspondences
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Definition: correspondence.h:92
pcl::registration::CorrespondenceEstimationBase::KdTreeReciprocalPtr
KdTree::Ptr KdTreeReciprocalPtr
Definition: correspondence_estimation.h:79
pcl::PointCloud::ConstPtr
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
Definition: point_cloud.h:429
pcl::PCLPointCloud2::ConstPtr
boost::shared_ptr< ::pcl::PCLPointCloud2 const > ConstPtr
Definition: PCLPointCloud2.h:52
pcl::registration::CorrespondenceEstimationBase::clone
virtual boost::shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > clone() const =0
Clone and cast to CorrespondenceEstimationBase.
pcl::PointCloud< PointSource >
pcl::registration::CorrespondenceEstimationBase::initComputeReciprocal
bool initComputeReciprocal()
Internal computation initalization for reciprocal correspondences.
Definition: correspondence_estimation.hpp:106
pcl::PCLBase< PointSource >::setIndices
virtual void setIndices(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data.
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::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:199
pcl::KdTree::PointRepresentationConstPtr
boost::shared_ptr< const PointRepresentation > PointRepresentationConstPtr
Definition: kdtree.h:68
pcl::registration::CorrespondenceEstimation::clone
virtual boost::shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > clone() const
Clone and cast to CorrespondenceEstimationBase.
Definition: correspondence_estimation.h:443
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:352
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:62
pcl::PCLBase::setInputCloud
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
Definition: pcl_base.hpp:66
pcl::registration::CorrespondenceEstimationBase::setTargetNormals
virtual void setTargetNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the target normals.
Definition: correspondence_estimation.h:176
pcl::PCLBase< PointSource >::input_
PointCloudConstPtr input_
The input point cloud dataset.
Definition: pcl_base.h:150
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:217
pcl::registration::CorrespondenceEstimation
CorrespondenceEstimation represents the base class for determining correspondences between target and...
Definition: correspondence_estimation.h:378
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:260
pcl::registration::CorrespondenceEstimationBase::PointCloudSource
pcl::PointCloud< PointSource > PointCloudSource
Definition: correspondence_estimation.h:81
pcl::registration::CorrespondenceEstimationBase::PointRepresentationConstPtr
KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition: correspondence_estimation.h:89
pcl::registration::CorrespondenceEstimation::PointCloudSource
pcl::PointCloud< PointSource > PointCloudSource
Definition: correspondence_estimation.h:402
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:186
pcl::registration::CorrespondenceEstimationBase::~CorrespondenceEstimationBase
virtual ~CorrespondenceEstimationBase()
Empty destructor.
Definition: correspondence_estimation.h:109
pcl::registration::CorrespondenceEstimationBase::ConstPtr
boost::shared_ptr< const CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > ConstPtr
Definition: correspondence_estimation.h:67
pcl::getFields
void getFields(const pcl::PointCloud< PointT > &cloud, std::vector< pcl::PCLPointField > &fields)
Get the list of available fields (i.e., dimension/channel)
Definition: io.hpp:79
pcl::search::KdTree< PointTarget >::PointRepresentationConstPtr
boost::shared_ptr< const PointRepresentation< PointTarget > > PointRepresentationConstPtr
Definition: kdtree.h:84
pcl::registration::CorrespondenceEstimationBase::PointCloudSourceConstPtr
PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition: correspondence_estimation.h:83
pcl::registration::CorrespondenceEstimationBase::Ptr
boost::shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > Ptr
Definition: correspondence_estimation.h:66
pcl::registration::CorrespondenceEstimationBase::tree_reciprocal_
KdTreeReciprocalPtr tree_reciprocal_
A pointer to the spatial search object used for the source dataset.
Definition: correspondence_estimation.h:307
pcl::registration::CorrespondenceEstimationBase
Abstract CorrespondenceEstimationBase class.
Definition: correspondence_estimation.h:63