Loading...
Searching...
No Matches
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$
*
*/
#pragma once
#include <pcl/common/io.h> // for getFields
#include <pcl/registration/correspondence_types.h>
#include <pcl/search/kdtree.h>
#include <pcl/memory.h>
#include <pcl/pcl_base.h>
#include <pcl/pcl_macros.h>
#include <string>
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:
using Ptr =
shared_ptr<CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>>;
using ConstPtr =
shared_ptr<const CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>>;
// using PCLBase<PointSource>::initCompute;
using PCLBase<PointSource>::deinitCompute;
using PCLBase<PointSource>::input_;
using PCLBase<PointSource>::indices_;
using PCLBase<PointSource>::setIndices;
using KdTree = pcl::search::KdTree<PointTarget>;
using KdTreePtr = typename KdTree::Ptr;
using KdTreeConstPtr = typename KdTree::ConstPtr;
using KdTreeReciprocal = pcl::search::KdTree<PointSource>;
using KdTreeReciprocalPtr = typename KdTreeReciprocal::Ptr;
using KdTreeReciprocalConstPtr = typename KdTreeReciprocal::ConstPtr;
using PointCloudSource = pcl::PointCloud<PointSource>;
using PointCloudSourcePtr = typename PointCloudSource::Ptr;
using PointCloudSourceConstPtr = typename PointCloudSource::ConstPtr;
using PointCloudTarget = pcl::PointCloud<PointTarget>;
using PointCloudTargetPtr = typename PointCloudTarget::Ptr;
using PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr;
using PointRepresentationConstPtr = typename KdTree::PointRepresentationConstPtr;
using PointRepresentationReciprocalConstPtr =
typename KdTreeReciprocal::PointRepresentationConstPtr;
/** \brief Empty constructor. */
CorrespondenceEstimationBase()
: corr_name_("CorrespondenceEstimationBase")
, tree_(new pcl::search::KdTree<PointTarget>)
, tree_reciprocal_(new pcl::search::KdTree<PointSource>)
, target_()
, point_representation_()
, input_transformed_()
{}
/** \brief Empty destructor */
~CorrespondenceEstimationBase() override = default;
/** \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);
input_fields_ = pcl::getFields<PointSource>();
}
/** \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\n",
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\n",
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;
force_no_recompute_ = force_no_recompute;
// 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;
force_no_recompute_reciprocal_ = force_no_recompute;
// 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 for target cloud
* 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 Provide a boost shared pointer to the PointRepresentation for source cloud
* 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
setPointRepresentationReciprocal(
const PointRepresentationReciprocalConstPtr& point_representation_reciprocal)
{
point_representation_reciprocal_ = point_representation_reciprocal;
}
/** \brief Clone and cast to CorrespondenceEstimationBase */
virtual typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::Ptr
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 target point representation used (internal). */
PointRepresentationConstPtr point_representation_;
/** \brief The source point representation used (internal). */
PointRepresentationReciprocalConstPtr point_representation_reciprocal_;
/** \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 initialization. */
bool
initCompute();
/** \brief Internal computation initialization 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_{true};
/** \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_{true};
/** \brief A flag which, if set, means the tree operating on the target cloud
* will never be recomputed*/
bool force_no_recompute_{false};
/** \brief A flag which, if set, means the tree operating on the source cloud
* will never be recomputed*/
bool force_no_recompute_reciprocal_{false};
};
/** \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:
using Ptr = shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar>>;
using ConstPtr =
shared_ptr<const CorrespondenceEstimation<PointSource, PointTarget, Scalar>>;
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;
using KdTree =
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::KdTree;
using KdTreePtr = typename CorrespondenceEstimationBase<PointSource,
PointTarget,
Scalar>::KdTreePtr;
using KdTreeConstPtr = typename CorrespondenceEstimationBase<PointSource,
PointTarget,
Scalar>::KdTreeConstPtr;
using KdTreeReciprocal =
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::
KdTreeReciprocal;
using KdTreeReciprocalPtr =
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::
KdTreeReciprocalPtr;
using KdTreeReciprocalConstPtr =
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::
KdTreeReciprocalConstPtr;
using PointCloudSource = pcl::PointCloud<PointSource>;
using PointCloudSourcePtr = typename PointCloudSource::Ptr;
using PointCloudSourceConstPtr = typename PointCloudSource::ConstPtr;
using PointCloudTarget = pcl::PointCloud<PointTarget>;
using PointCloudTargetPtr = typename PointCloudTarget::Ptr;
using PointCloudTargetConstPtr = typename PointCloudTarget::ConstPtr;
using PointRepresentationConstPtr = typename KdTree::PointRepresentationConstPtr;
using PointRepresentationReciprocalConstPtr =
typename KdTreeReciprocal::PointRepresentationConstPtr;
/** \brief Empty constructor. */
CorrespondenceEstimation() { corr_name_ = "CorrespondenceEstimation"; }
/** \brief Empty destructor */
~CorrespondenceEstimation() override = default;
/** \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
*/
void
determineCorrespondences(
pcl::Correspondences& correspondences,
double max_distance = std::numeric_limits<double>::max()) override;
/** \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
*/
void
determineReciprocalCorrespondences(
pcl::Correspondences& correspondences,
double max_distance = std::numeric_limits<double>::max()) override;
/** \brief Clone and cast to CorrespondenceEstimationBase */
typename CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>::Ptr
clone() const override
{
Ptr copy(new CorrespondenceEstimation<PointSource, PointTarget, Scalar>(*this));
return (copy);
}
};
} // namespace registration
} // namespace pcl
#include <pcl/registration/impl/correspondence_estimation.hpp>
pcl::KdTree::PointRepresentationConstPtr
typename PointRepresentation::ConstPtr PointRepresentationConstPtr
Definition kdtree.h:66
pcl::PCLBase
PCL base class.
Definition pcl_base.h:70
pcl::PCLBase< PointSource >::input_
PointCloudConstPtr input_
The input point cloud dataset.
Definition pcl_base.h:147
pcl::PCLBase::setInputCloud
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
Definition pcl_base.hpp:65
pcl::PCLBase< PointSource >::indices_
IndicesPtr indices_
A pointer to the vector of point indices to use.
Definition pcl_base.h:150
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::PCLBase< PointSource >::deinitCompute
bool deinitCompute()
This method should get called after finishing the actual computation.
Definition pcl_base.hpp:175
pcl::PointCloud< PointSource >
pcl::PointCloud< PointSource >::Ptr
shared_ptr< PointCloud< PointSource > > Ptr
Definition point_cloud.h:413
pcl::PointCloud< PointSource >::ConstPtr
shared_ptr< const PointCloud< PointSource > > ConstPtr
Definition point_cloud.h:414
pcl::registration::CorrespondenceEstimationBase
Abstract CorrespondenceEstimationBase class.
Definition correspondence_estimation.h:60
pcl::registration::CorrespondenceEstimationBase::setPointRepresentationReciprocal
void setPointRepresentationReciprocal(const PointRepresentationReciprocalConstPtr &point_representation_reciprocal)
Provide a boost shared pointer to the PointRepresentation for source cloud to be used when searching ...
Definition correspondence_estimation.h:297
pcl::registration::CorrespondenceEstimationBase::PointRepresentationConstPtr
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition correspondence_estimation.h:89
pcl::registration::CorrespondenceEstimationBase::input_transformed_
PointCloudTargetPtr input_transformed_
The transformed input source point cloud dataset.
Definition correspondence_estimation.h:330
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:238
pcl::registration::CorrespondenceEstimationBase::target_
PointCloudTargetConstPtr target_
The input point cloud dataset target.
Definition correspondence_estimation.h:318
pcl::registration::CorrespondenceEstimationBase::getInputTarget
PointCloudTargetConstPtr const getInputTarget()
Get a pointer to the input point cloud dataset target.
Definition correspondence_estimation.h:135
pcl::registration::CorrespondenceEstimationBase::ConstPtr
shared_ptr< const CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > ConstPtr
Definition correspondence_estimation.h:65
pcl::registration::CorrespondenceEstimationBase::initCompute
bool initCompute()
Internal computation initialization.
Definition correspondence_estimation.hpp:73
pcl::registration::CorrespondenceEstimationBase::clone
virtual CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const =0
Clone and cast to CorrespondenceEstimationBase.
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::getIndicesTarget
IndicesPtr const getIndicesTarget()
Get a pointer to the vector of indices used for the target dataset.
Definition correspondence_estimation.h:201
pcl::registration::CorrespondenceEstimationBase::CorrespondenceEstimationBase
CorrespondenceEstimationBase()
Empty constructor.
Definition correspondence_estimation.h:94
pcl::registration::CorrespondenceEstimationBase::setPointRepresentation
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a boost shared pointer to the PointRepresentation for target cloud to be used when searching ...
Definition correspondence_estimation.h:285
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:357
pcl::registration::CorrespondenceEstimationBase::KdTreeConstPtr
typename KdTree::ConstPtr KdTreeConstPtr
Definition correspondence_estimation.h:75
pcl::registration::CorrespondenceEstimationBase::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition correspondence_estimation.h:82
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:214
pcl::registration::CorrespondenceEstimationBase::setSourceNormals
virtual void setSourceNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the source normals.
Definition correspondence_estimation.h:149
pcl::registration::CorrespondenceEstimationBase::PointCloudTargetConstPtr
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition correspondence_estimation.h:87
pcl::registration::CorrespondenceEstimationBase::point_representation_reciprocal_
PointRepresentationReciprocalConstPtr point_representation_reciprocal_
The source point representation used (internal).
Definition correspondence_estimation.h:327
pcl::registration::CorrespondenceEstimationBase::KdTreeReciprocalPtr
typename KdTreeReciprocal::Ptr KdTreeReciprocalPtr
Definition correspondence_estimation.h:78
pcl::registration::CorrespondenceEstimationBase::PointRepresentationReciprocalConstPtr
typename KdTreeReciprocal::PointRepresentationConstPtr PointRepresentationReciprocalConstPtr
Definition correspondence_estimation.h:91
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:250
pcl::registration::CorrespondenceEstimationBase::point_representation_
PointRepresentationConstPtr point_representation_
The target point representation used (internal).
Definition correspondence_estimation.h:324
pcl::registration::CorrespondenceEstimationBase::getIndicesSource
IndicesPtr const getIndicesSource()
Get a pointer to the vector of indices used for the source dataset.
Definition correspondence_estimation.h:184
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::CorrespondenceEstimationBase::requiresTargetNormals
virtual bool requiresTargetNormals() const
See if this rejector requires target normals.
Definition correspondence_estimation.h:158
pcl::registration::CorrespondenceEstimationBase::input_fields_
std::vector< pcl::PCLPointField > input_fields_
The types of input point fields available.
Definition correspondence_estimation.h:333
pcl::registration::CorrespondenceEstimationBase::requiresSourceNormals
virtual bool requiresSourceNormals() const
See if this rejector requires source normals.
Definition correspondence_estimation.h:142
pcl::registration::CorrespondenceEstimationBase::corr_name_
std::string corr_name_
The correspondence estimation method name.
Definition correspondence_estimation.h:309
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::getClassName
const std::string & getClassName() const
Abstract class get name method.
Definition correspondence_estimation.h:337
pcl::registration::CorrespondenceEstimationBase::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition correspondence_estimation.h:86
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:353
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:177
pcl::registration::CorrespondenceEstimationBase::tree_
KdTreePtr tree_
A pointer to the spatial search object used for the target dataset.
Definition correspondence_estimation.h:312
pcl::registration::CorrespondenceEstimationBase::KdTreePtr
typename KdTree::Ptr KdTreePtr
Definition correspondence_estimation.h:74
pcl::registration::CorrespondenceEstimationBase::getInputSource
PointCloudSourceConstPtr const getInputSource()
Get a pointer to the input point cloud dataset target.
Definition correspondence_estimation.h:121
pcl::registration::CorrespondenceEstimationBase::tree_reciprocal_
KdTreeReciprocalPtr tree_reciprocal_
A pointer to the spatial search object used for the source dataset.
Definition correspondence_estimation.h:315
pcl::registration::CorrespondenceEstimationBase::setTargetNormals
virtual void setTargetNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the target normals.
Definition correspondence_estimation.h:165
pcl::registration::CorrespondenceEstimationBase::KdTreeReciprocalConstPtr
typename KdTreeReciprocal::ConstPtr KdTreeReciprocalConstPtr
Definition correspondence_estimation.h:79
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::~CorrespondenceEstimationBase
~CorrespondenceEstimationBase() override=default
Empty destructor.
pcl::registration::CorrespondenceEstimationBase::initComputeReciprocal
bool initComputeReciprocal()
Internal computation initialization for reciprocal correspondences.
Definition correspondence_estimation.hpp:97
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:364
pcl::registration::CorrespondenceEstimationBase::target_indices_
IndicesPtr target_indices_
The target point cloud dataset indices.
Definition correspondence_estimation.h:321
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:193
pcl::registration::CorrespondenceEstimationBase::PointCloudSourceConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition correspondence_estimation.h:83
pcl::registration::CorrespondenceEstimationBase::Ptr
shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > Ptr
Definition correspondence_estimation.h:63
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:360
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:225
pcl::registration::CorrespondenceEstimation
CorrespondenceEstimation represents the base class for determining correspondences between target and...
Definition correspondence_estimation.h:390
pcl::registration::CorrespondenceEstimation::KdTreeReciprocalPtr
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreeReciprocalPtr KdTreeReciprocalPtr
Definition correspondence_estimation.h:428
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:146
pcl::registration::CorrespondenceEstimation::PointRepresentationReciprocalConstPtr
typename KdTreeReciprocal::PointRepresentationConstPtr PointRepresentationReciprocalConstPtr
Definition correspondence_estimation.h:444
pcl::registration::CorrespondenceEstimation::KdTreeReciprocalConstPtr
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreeReciprocalConstPtr KdTreeReciprocalConstPtr
Definition correspondence_estimation.h:432
pcl::registration::CorrespondenceEstimation::KdTree
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTree KdTree
Definition correspondence_estimation.h:416
pcl::registration::CorrespondenceEstimation::PointCloudSourceConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
Definition correspondence_estimation.h:436
pcl::registration::CorrespondenceEstimation::KdTreeConstPtr
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreeConstPtr KdTreeConstPtr
Definition correspondence_estimation.h:422
pcl::registration::CorrespondenceEstimation::PointCloudSourcePtr
typename PointCloudSource::Ptr PointCloudSourcePtr
Definition correspondence_estimation.h:435
pcl::registration::CorrespondenceEstimation::Ptr
shared_ptr< CorrespondenceEstimation< PointSource, PointTarget, Scalar > > Ptr
Definition correspondence_estimation.h:392
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:183
pcl::registration::CorrespondenceEstimation::ConstPtr
shared_ptr< const CorrespondenceEstimation< PointSource, PointTarget, Scalar > > ConstPtr
Definition correspondence_estimation.h:394
pcl::registration::CorrespondenceEstimation::PointRepresentationConstPtr
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
Definition correspondence_estimation.h:442
pcl::registration::CorrespondenceEstimation::~CorrespondenceEstimation
~CorrespondenceEstimation() override=default
Empty destructor.
pcl::registration::CorrespondenceEstimation::PointCloudTargetConstPtr
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
Definition correspondence_estimation.h:440
pcl::registration::CorrespondenceEstimation::KdTreePtr
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreePtr KdTreePtr
Definition correspondence_estimation.h:419
pcl::registration::CorrespondenceEstimation::clone
CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const override
Clone and cast to CorrespondenceEstimationBase.
Definition correspondence_estimation.h:477
pcl::registration::CorrespondenceEstimation::KdTreeReciprocal
typename CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::KdTreeReciprocal KdTreeReciprocal
Definition correspondence_estimation.h:425
pcl::registration::CorrespondenceEstimation::CorrespondenceEstimation
CorrespondenceEstimation()
Empty constructor.
Definition correspondence_estimation.h:447
pcl::registration::CorrespondenceEstimation::PointCloudTargetPtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
Definition correspondence_estimation.h:439
pcl::search::KdTree
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
Definition kdtree.h:62
pcl::search::KdTree::Ptr
shared_ptr< KdTree< PointT, Tree > > Ptr
Definition kdtree.h:75
pcl::search::KdTree::ConstPtr
shared_ptr< const KdTree< PointT, Tree > > ConstPtr
Definition kdtree.h:76
pcl::search::KdTree::PointRepresentationConstPtr
typename PointRepresentation< PointT >::ConstPtr PointRepresentationConstPtr
Definition kdtree.h:80
memory.h
Defines functions, macros and traits for allocating and using memory.
pcl
Definition convolution.h:46
pcl::Correspondences
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
Definition correspondence.h:89
pcl::IndicesPtr
shared_ptr< Indices > IndicesPtr
Definition pcl_base.h:58
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl::PCLPointCloud2::ConstPtr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
Definition PCLPointCloud2.h:36