Point Cloud Library (PCL)
1.11.1-dev
|
43 #include <pcl/common/io.h>
44 #include <pcl/registration/correspondence_types.h>
45 #include <pcl/search/kdtree.h>
47 #include <pcl/pcl_base.h>
53 namespace registration {
59 template <
typename Po
intSource,
typename Po
intTarget,
typename Scalar =
float>
63 shared_ptr<CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>>;
65 shared_ptr<const CorrespondenceEstimationBase<PointSource, PointTarget, Scalar>>;
150 PCL_WARN(
"[pcl::registration::%s::setSourceNormals] This class does not require "
151 "input source normals\n",
165 PCL_WARN(
"[pcl::registration::%s::setTargetNormals] This class does not require "
166 "input target normals\n",
237 bool force_no_recompute =
false)
261 double max_distance = std::numeric_limits<double>::max()) = 0;
274 double max_distance = std::numeric_limits<double>::max()) = 0;
318 inline const std::string&
370 template <
typename Po
intSource,
typename Po
intTarget,
typename Scalar =
float>
374 using Ptr = shared_ptr<CorrespondenceEstimation<PointSource, PointTarget, Scalar>>;
376 shared_ptr<const CorrespondenceEstimation<PointSource, PointTarget, Scalar>>;
424 double max_distance = std::numeric_limits<double>::max())
override;
437 double max_distance = std::numeric_limits<double>::max())
override;
450 #include <pcl/registration/impl/correspondence_estimation.hpp>
const IndicesPtr getIndicesTarget()
Get a pointer to the vector of indices used for the target dataset.
Defines all the PCL and non-PCL macros used.
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
shared_ptr< Indices > IndicesPtr
PointCloudConstPtr input_
The input point cloud dataset.
const PointCloudSourceConstPtr getInputSource()
Get a pointer to the input point cloud dataset target.
virtual bool requiresSourceNormals() const
See if this rejector requires source normals.
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)
typename KdTree::Ptr KdTreePtr
typename PointCloudTarget::Ptr PointCloudTargetPtr
typename KdTree::Ptr KdTreeReciprocalPtr
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...
bool initCompute()
Internal computation initialization.
Abstract CorrespondenceEstimationBase class.
typename PointCloudTarget::Ptr PointCloudTargetPtr
KdTreePtr getSearchMethodTarget() const
Get a pointer to the search method used to find correspondences in the target cloud.
typename PointCloudSource::Ptr PointCloudSourcePtr
KdTreeReciprocalPtr tree_reciprocal_
A pointer to the spatial search object used for the source dataset.
KdTreeReciprocalPtr getSearchMethodSource() const
Get a pointer to the search method used to find correspondences in the source cloud.
virtual void setInputCloud(const PointCloudConstPtr &cloud)
Provide a pointer to the input dataset.
virtual void determineReciprocalCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())=0
Determine the reciprocal correspondences between input and target cloud.
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
shared_ptr< KdTree< PointT, Tree > > Ptr
virtual CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const =0
Clone and cast to CorrespondenceEstimationBase.
void setIndicesTarget(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represent the input target point cloud.
typename PointCloudSource::Ptr PointCloudSourcePtr
bool initComputeReciprocal()
Internal computation initialization for reciprocal correspondences.
PointRepresentationConstPtr point_representation_
The point representation used (internal).
PointCloudTargetPtr input_transformed_
The transformed input source point cloud dataset.
const std::string & getClassName() const
Abstract class get name method.
~CorrespondenceEstimation()
Empty destructor.
PointCloudTargetConstPtr target_
The input point cloud dataset target.
const PointCloudTargetConstPtr getInputTarget()
Get a pointer to the input point cloud dataset target.
void setPointRepresentation(const PointRepresentationConstPtr &point_representation)
Provide a boost shared pointer to the PointRepresentation to be used when searching for nearest neigh...
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > Ptr
shared_ptr< const CorrespondenceEstimationBase< PointSource, PointTarget, float > > ConstPtr
typename PointRepresentation< PointT >::ConstPtr PointRepresentationConstPtr
CorrespondenceEstimation()
Empty constructor.
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.
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
shared_ptr< CorrespondenceEstimation< PointSource, PointTarget, Scalar > > Ptr
virtual void setIndices(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represents the input data.
void determineCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
Determine the correspondences between input and target cloud.
CorrespondenceEstimationBase()
Empty constructor.
CorrespondenceEstimation represents the base class for determining correspondences between target and...
std::string corr_name_
The correspondence estimation method name.
CorrespondenceEstimationBase< PointSource, PointTarget, Scalar >::Ptr clone() const override
Clone and cast to CorrespondenceEstimationBase.
typename KdTree::Ptr KdTreePtr
virtual bool requiresTargetNormals() const
See if this rejector requires target normals.
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
virtual void setTargetNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the target normals.
shared_ptr< const CorrespondenceEstimation< PointSource, PointTarget, Scalar > > ConstPtr
void setIndicesSource(const IndicesPtr &indices)
Provide a pointer to the vector of indices that represent the input source point cloud.
bool target_cloud_updated_
Variable that stores whether we have a new target cloud, meaning we need to pre-process it again.
shared_ptr< PointCloud< PointSource > > Ptr
IndicesPtr indices_
A pointer to the vector of point indices to use.
const IndicesPtr getIndicesSource()
Get a pointer to the vector of indices used for the source dataset.
bool force_no_recompute_
A flag which, if set, means the tree operating on the target cloud will never be recomputed.
IndicesPtr target_indices_
The target point cloud dataset indices.
KdTreePtr tree_
A pointer to the spatial search object used for the target dataset.
typename KdTree::PointRepresentationConstPtr PointRepresentationConstPtr
typename PointCloudSource::ConstPtr PointCloudSourceConstPtr
shared_ptr< const PointCloud< PointSource > > ConstPtr
virtual void setSourceNormals(pcl::PCLPointCloud2::ConstPtr)
Abstract method for setting the source normals.
typename PointCloudTarget::ConstPtr PointCloudTargetConstPtr
bool source_cloud_updated_
Variable that stores whether we have a new source cloud, meaning we need to pre-process it again.
virtual void determineCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())=0
Determine the correspondences between input and target cloud.
std::vector< pcl::PCLPointField > input_fields_
The types of input point fields available.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
bool force_no_recompute_reciprocal_
A flag which, if set, means the tree operating on the source cloud will never be recomputed.
void determineReciprocalCorrespondences(pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max()) override
Determine the reciprocal correspondences between input and target cloud.
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...
Defines functions, macros and traits for allocating and using memory.
~CorrespondenceEstimationBase()
Empty destructor.