1.Class pcl::registration::CorrespondenceEstimation< PointSource, PointTarget, Scalar >
类CorrespondenceEstimation是确定目标和查询点集(或特征)之间的对应关系的基类,输入为目标和源点云,输出为点对,即输出两组点云之间对应点集合。
#include <pcl/registration/correspondence_estimation.h>
CorrespondenceEstimation ()
// 空构造函数
virtual ~CorrespondenceEstimation ()
// 空析构函数
virtual void determineCorrespondences (pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())
// 确定输入点云和目标点云的对应关系:输入源点云和对应目标点云之间允许的最大距离max_distance,输出找到的对应关系(查询点索引、目标点索引和他们之间的距离)存储在correspondences中。
virtual void determineReciprocalCorrespondences (pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())
// 确定输入点云和目标点云的对应关系:输出找到的对应关系(查询点索引、目标点索引和他们之间的距离存储在correspondences中。该函数与上相同,但是查找的对应点是相互的。
virtual boost::shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > clone () const
// 复制并强制转换为CorrespondenceEstimationBase。
void setInputTarget (const PointCloudTargetConstPtr &cloud)
// 设置指向目标点云的指针cloud。
void setPointRepresentation (const PointRepresentationConstPtr &point_representation)
// 当对点进行比较的时,设置指向PointRepresentation 的 boost库共享指针 point_representation,点的表示实现对点到n维特征向量的转化,进而在对应点集搜索时使用kdtree进行搜索。
2.Class pcl::registration::CorrespondenceEstimationNormalShooting< PointSource, PointTarget, NormalT, Scalar >
类CorrespondenceEstimationNormalShooting实现通过法线计算输入点云和目标点云在最小距离约束下的对应点对。输入为目标和源点云,输出为点对,即输出两组点云之间对应点集合。
include <pcl/registration/correspondence_estimation_normal_shooting.h>
CorrespondenceEstimationNormalShooting ()
// 空构造函数
virtual ~CorrespondenceEstimationNormalShooting ()
// 空析构函数
void setSourceNormals (const NormalsConstPtr &normals)
// 设置根据计算输入点云得到的法线normals,注意这里的法线是源点云对应的法线,并非目标点云对应的法线。
NormalsConstPtr getSourceNormals () const
// 获得根据计算输入点云得到的法线normals。
bool requiresSourceNormals () const
// 查看此程序是否需要源法线。
void setSourceNormals (pcl::PCLPointCloud2::ConstPtr cloud2)
// 设置源法线的BLOB方法。
void determineCorrespondences (pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())
// 确定输入点云和目标点云的对应关系:输入源点云和对应目标点云之间允许的最大距离max_distance,输出找到的对应关系(查询点索引、目标点索引和他们之间的距离)存储在correspondences中。
virtual void determineReciprocalCorrespondences (pcl::Correspondences &correspondences, double max_distance=std::numeric_limits< double >::max())
// 确定输入点云和目标点云的对应关系:输出找到的对应关系(查询点索引、目标点索引和他们之间的距离存储在correspondences中。该函数与上相同,但是查找的对应点是相互的。
void setKSearch (unsigned int k)
// 设置在对目标点云进行邻近搜索时的邻近点的数量k。
unsigned int getKSearch () const
// 获得在对目标点云进行邻近搜索时的邻近点的数量k。
virtual boost::shared_ptr< CorrespondenceEstimationBase< PointSource, PointTarget, Scalar > > clone () const
// 复制并强制转换为CorrespondenceEstimationBase。
3.Class pcl::registration::CorrespondenceRejector
类CorrespondenceRejector是错误对应关系去除的接口定义的基类。
#include <pcl/registration/correspondence_rejection.h>
CorrespondenceRejector ()
// 空构造函数
virtual ~CorrespondenceRejector ()
// 空析构函数
virtual void setInputCorrespondences (const CorrespondencesConstPtr &correspondences)
// 设置指向输入对应关系的指针引用correspondences。
CorrespondencesConstPtr getInputCorrespondences ()
// 获得指向输入对应关系的指针引用
void getCorrespondences (pcl::Correspondences &correspondences)
// 调用对应关系去除方法,输出没有被去除的对应关系向量correspondences。
virtual void getRemainingCorrespondences (const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences)=0
// 得到在对原有的对应关系集进行去除操作后的有效对应关系列表:输人初始的对应关系列表original_correspondences,输出去除操作后仍保留的对应关系列表remaining_correspondences。
void getRejectedQueryIndices (const pcl::Correspondences &correspondences, std::vector< int > &indices)
// 确定已经被去除的查询点的索引:输入去除操作后的对应关系指针引用correspondences ,输出被去除的查询点索引的向量indices。
const std::string & getClassName () const
// 获取此类名称的字符串表示形式。
virtual bool requiresSourcePoints () const
// 查看此程序是否需要源点云。
virtual void setSourcePoints (pcl::PCLPointCloud2::ConstPtr)
// 设置源点云的抽象方法
virtual bool requiresSourceNormals () const
// 查看此程序是否需要源法线。
virtual void setSourceNormals (pcl::PCLPointCloud2::ConstPtr)
// 设置源法线的抽象方法。
virtual bool requiresTargetPoints () const
// 查看此程序是否需要目标点云。
virtual void setTargetPoints (pcl::PCLPointCloud2::ConstPtr)
// 设置目标点云的抽象方法
virtual bool requiresTargetNormals () const
// 查看此程序是否需要源目标法线。
virtual void setTargetNormals (pcl::PCLPointCloud2::ConstPtr)
// 设置目标法线的抽象方法。
4.Class pcl::registration::CorrespondenceRejectorDistance
类CorrespondenceRejectorDistance基于设定对应关系之间的距离阈值实现了一个简单的错误对应关系去除的算法。
#include <pcl/registration/correspondence_rejection_distance.h>
CorrespondenceRejectorDistance ()
// 空构造函数
virtual ~CorrespondenceRejectorDistance ()
// 空析构函数
void getRemainingCorrespondences (const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences)
// 得到在对原有的对应关系集进行去除操作后的有效对应关系列表:输人初始的对应关系列表original_correspondences,输出去除操作后仍保留的对应关系列表remaining_correspondences。
virtual void setMaximumDistance (float distance)
// 设置用于对应关系去除的最大距离distance,若对应关系中的点间距离大于设置的阈值则去除。
float getMaximumDistance ()
// 获得用于对应关系去除的最大距离distance
template<typename PointT >
void setInputCloud (const typename pcl::PointCloud< PointT >::ConstPtr &cloud)
// 输入一个源点云数据集cloud(必须包含XYZ数据),用于计算对应关系距离。
template<typename PointT >
void setInputSource (const typename pcl::PointCloud< PointT >::ConstPtr &cloud)
// 输入一个源点云数据集cloud(必须包含XYZ数据),用于计算对应关系距离。
template<typename PointT >
void setInputTarget (const typename pcl::PointCloud< PointT >::ConstPtr &target)
// 输入一个目标点云数据集target(必须包含XYZ数据),用于计算对应关系距离其他成员函数均为基类成员函数的具体实现,详情请参考基类class pcl: : regis-tration: :CorrespondenceRejector。
virtual bool requiresSourcePoints () const
// 查看此程序是否需要源点云。
virtual void setSourcePoints (pcl::PCLPointCloud2::ConstPtr)
// 设置源点云的抽象方法
virtual bool requiresTargetPoints () const
// 查看此程序是否需要目标点云。
virtual void setTargetPoints (pcl::PCLPointCloud2::ConstPtr)
// 设置目标点云的抽象方法
5.Class pcl::registration::CorrespondenceRejectorFeatures
类CorrespondenceRejectorFeatures基于测度对应点之间的特征描述子之间的不同实现了一个错误对应关系去除的算法,上面的类是测度欧氏空间(欧几里德度量)的距离特征的不同。
#include <pcl/registration/correspondence_rejection_features.h>
CorrespondenceRejectorFeatures ()
// 空构造函数
virtual ~CorrespondenceRejectorFeatures ()
// 空析构函数
void getRemainingCorrespondences (const pcl::Correspondences &original_correspondences, pcl::Correspondences &remaining_correspondences)
// 得到在对原有的对应关系集进行去除操作后的有效对应关系列表:输人初始的对应关系列表original_correspondences,输出去除操作后仍保留的对应关系列表remaining_correspondences。
template<typename FeatureT >
void setSourceFeature (const typename pcl::PointCloud< FeatureT >::ConstPtr &source_feature, const std::string &key)
// 设置指向源点云的特征描述子的指针source_feature,key是表征特征描述子的唯一标识符。
template<typename FeatureT >
pcl::PointCloud< FeatureT >::ConstPtr getSourceFeature (const std::string &key)
// 获得指向源点云的特征描述子的指针source_feature
template<typename FeatureT >
void setTargetFeature (const typename pcl::PointCloud< FeatureT >::ConstPtr &target_feature, const std::string &key)
// 设置指向目标点云的特征描述子的指针 target_feature, key是表征特征描述子的唯一标识符。
template<typename FeatureT >
pcl::PointCloud< FeatureT >::ConstPtr getTargetFeature (const std::string &key)
// 获得指向目标点云的特征描述子的指针 target_feature,
template<typename FeatureT >
void setDistanceThreshold (double thresh, const std::string &key)
// 在特征FeatureT(该类的模板参数,指定测度时使用的特征描述子类型)空间设定一个源点云里和目标点云的特征之间的强制距离阈值:输人距离阈值thresh和标志特征的字符串 key。
bool hasValidFeatures (