1.Class pcl::Feature< PointInT, PointOutT >
类Feature是所有特征相关模块中其他类的基类,定义了所有描述子常用的函数接口。
#include <pcl/features/feature.h>
Feature ()
// 空构造函数
virtual ~Feature ()
// 空析构函数
void setSearchSurface (const PointCloudInConstPtr &cloud)
// 设置搜索时近邻的来源点云,参数cloud指向搜索时被搜索的点云对象,常常用稠密的原始点云,而不用稀疏的下采样后的点云,在特征描述和提取中查询点往往是关键点。
PointCloudInConstPtr getSearchSurface () const
// 获得搜索时近邻的来源点云指针。
void setSearchMethod (const KdTreePtr &tree)
// 设置搜索时所用的搜索机制,参数tree指向搜索时所用的搜索对象,例如 kd-tree, octree等对象。
KdTreePtr getSearchMethod () const
// 获取设置搜索时所用的搜索机制
double getSearchParameter () const
// 获得搜索时的内参
void setKSearch (int k)
// 设置搜索时所用的k近邻个数,参数k为设置搜索近邻个数。
int getKSearch () const
// 设置搜索时所用的k近邻个数,
void setRadiusSearch (double radius)
// 设置搜索时所用的球半径,参数radius为设置搜索球体半径。
double getRadiusSearch () const
// 获得搜索时所用的球半径。
void compute (PointCloudOut &output)
// 计算特征描述子重载函数,在子类中实现不同的具体计算,参数output存储计算之后得到的特征描述子点云对象。
virtual void setInputCloud (const PointCloudConstPtr &cloud)
// 设置输入点云,参数cloud指向输入点云对象。
virtual void setIndices (const IndicesPtr &indices)
// 与setInputCloud配合使用, indices为指向点云索引向量的指针引用,如果设置了此函数则算法的输入点云为indices中索引向量指定的点云集合,否则为setInput-Cloud设置的整个输入点云。
virtual void setIndices (const IndicesConstPtr &indices)
// 同上,只是要求indices不能被函数改变。
virtual void setIndices (const PointIndicesConstPtr &indices)
// 同上,但indices是 PointIndices 的结构体链表,可以看做是点云索引向量指针的链表理解。
virtual void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
// 与setInputCloud 配合使用,此函数只限于有序点云,如果设置了此函数,则算法的输入点云为第row_start行,第 col_start列开始, nb_rows行和 nb_cols列限定的矩形区域所覆盖的点云,否则为setInputCloud设置的整个输入点云。
2.Class pcl::ShapeContext3DEstimation< PointInT, PointNT, PointOutT >
类ShapeContext3DEstimation实现了3D形状内容描述子(3D shape context descriptor)算法,详细可参考文献(Recognizing Objects in Range Data Using Regional Point Descriptors) ,其可以用于三维模型的识别、检索等领域。
#include <pcl/features/3dsc.h>
ShapeContext3DEstimation (bool random=false)
// 构造函数
virtual ~ShapeContext3DEstimation ()
// 析构函数
size_t getAzimuthBins ()
// 获得沿方向角划分的数目。
size_t getElevationBins ()
// 获得沿俯仰角划分的数目。
size_t getRadiusBins ()
// 获得沿径向划分的数目。
void setMinimalRadius (double radius)
// 设置最小径向半径。
double getMinimalRadius ()
// 获得最小径向半径。
void setPointDensityRadius (double radius)
// 设置点密度半径,该半径用于计算局部点密度密度=该半径内的点数。
double getPointDensityRadius ()
// 获得点密度半径。
void setInputNormals (const PointCloudNConstPtr &normals)
// 设置输入点云对应的法线数据对象。
void compute (PointCloudOut &output)
// 计算输出,output的类型默认为pcl:: ShapeContext,其有两个成员,一为rffloat[9],存储以当前计算点为圆心的局部坐标系,另一为desc std::vector<float>存储计算得到的特征向量
3.Class pcl::BOARDLocalReferenceFrameEstimation< PointInT, PointNT, PointOutT >
类BOARDLocalReferenceFrameEstimation实现文献(On the repeatability of the local reference frame for partial shape matching)中讲的局部坐标系估计方法,该方法在估计局部坐标系时对处理点云边缘或有孔洞处有特殊的处理方式,比以往常用的局部坐标系估计方法稳定,可重复性好。
#include <pcl/features/board.h>
BOARDLocalReferenceFrameEstimation ()
// 构造函数
virtual ~BOARDLocalReferenceFrameEstimation ()
// 空析构函数
void setTangentRadius (float radius)
// 设置估计x,y坐标轴时所用的最远点距离。
float getTangentRadius () const
// 获得估计x,y坐标轴时所用的最远点距离。
void setFindHoles (bool find_holes)
// 设置在估计局部坐标系时是否考虑孔洞的因素。
bool getFindHoles () const
// 获得在估计局部坐标系时是否考虑孔洞的因素。
void setMarginThresh (float margin_thresh)
// 设置在搜索半径的百分比超过该搜索半径比例的搜索区域点作为边界支撑域处理。
float getMarginThresh () const
// 获得搜索边缘阈值。
void setCheckMarginArraySize (int size)
// 设置在边界支撑域搜索孔洞时,对边界支撑域的细分数。
int getCheckMarginArraySize () const
// 获得在边界支撑域搜索孔洞时,对边界支撑域的细分数。
void setHoleSizeProbThresh (float prob_thresh)
// 假设在搜索的支撑域上有一个孔洞,设置该孔洞在局部xy平面上支撑圆周对应弧形区域所占的角度比例最小值,即所占比例小于该值则认为不是孔洞或缺失区域。
float getHoleSizeProbThresh () const
// 获得该孔洞在局部xy平面上支撑圆周对应弧形区域所占的角度比例最小值
void setSteepThresh (float steep_thresh)
// 假设探测到一孔洞,设置孔洞边缘的法线与孔洞平面的法线的偏离阈值,来判断是否有法线偏离严重的点。
float getSteepThresh () const
Gets the minimum steepness that the normals of the points situated on the borders of the hole, with reference to the normal of the best point found by the algorithm, must have in order to be considered in the calculation of the Reference Frame. More...
void compute (PointCloudOut &output)
// 计算输出output存储局部坐标系数据结构,其点类型为ReferenceFrame。
4.Class pcl::BoundaryEstimation< PointInT, PointNT, PointOutT >
类BoundaryEstimation实现估计一组点集是否处于指定点的投影区域的边缘位置。
#include <pcl/features/boundary.h>
BoundaryEstimation ()
// 空构造函数
bool isBoundaryPoint (const pcl::PointCloud< PointInT > &cloud, int q_idx, const std::vector< int > &indices, const Eigen::Vector4f &u, const Eigen::Vector4f &v, const float angle_threshold)
// 判断某点是否在给定点集投影到平面上的投影区域的边缘,参数cloud指向输入点云,q_idx需要判断是否在边沿上的点索引,indices需要投影到平面上点集合的索引,u、v确定投影平面,利用void getCoordinateSystemOnPlane ( const PointNT&p_coeff, Eigen::Vector4f &u, Eigen:: Vector4f &v)获取, angle_threshold 为判断时需要的阈值角度。
bool isBoundaryPoint (const pcl::PointCloud< PointInT > &cloud, const PointInT &q_point, const std::vector< int > &indices, const Eigen::Vector4f &u, const Eigen::Vector4f &v, const float angle_threshold)
// 判断某点是否在给定点集投影到平面上的投影区域的边缘,参数cloud指向输入点云,q_point需要判断是否在边沿上的点指针,indices需要投影到平面上点集合的索引,u、v确定投影平面,利用void getCoordinateSystemOnPlane ( const PointNT&p_coeff, Eigen::Vector4f &u, Eigen:: Vector4f &v)获取, angle_threshold 为判断时需要的阈值角度。
void setAngleThreshold (float angle)
// 设置将点标记为边界或规则的决定边界(角度阈值)。
float getAngleThreshold ()
// 获得将点标记为边界或规则的决定边界(角度阈值)。
void getCoordinateSystemOnPlane (const PointNT &p_coeff, Eigen::Vector4f &u, Eigen::Vector4f &v)
// 通过平面参数p_coeff 获取u、v向量,用于isBoundaryPoint函数参数获取。
void setInputNormals (const PointCloudNConstPtr &normals)
// 设置输入点云的法线,normals为指向输入点云法线的指针引用。
virtual void setInputCloud (const PointCloudConstPtr &cloud)
// 设置投影所需的点云,cloud为指向输入点云的指针引用。
5.Class pcl::CRHEstimation< PointInT, PointNT, PointOutT >
类CRHEstimation实现摄像头旋转直方图描述子CRH (Camera Roll Histogram)计算算法,利用该算子主要进行刚体对象的位姿估计,详细见文献(CAD -Model Recognition and 6DOF Pose Estimation Using 3D Cues)。
#include <pcl/features/crh.h>
CRHEstimation ()
// 构造函数
void setViewPoint (float vpx, float vpy, float vpz)
// 设置计算算子时需要的视点,vpx,vpy,xpz分别为视点的三维坐标。
void getViewPoint (float &vpx, float &vpy, float &vpz)
// 获得计算算子时需要的视点,vpx,vpy,xpz分别存储视点的三维坐标。
void setCentroid (Eigen::Vector4f ¢roid)
// 设置中心点坐标,centroid为中心点坐标的引用。
void setSearchMethod (const KdTreePtr &tree)
// 设置内部计算时需要的搜索方法,是kd-tree或者octree等的对象指针。
void compute (PointCloudOut &output)
// output存储计算得到的CRH描述子,建议PointCloudOut为pcl:: Histogram
6.Class pcl::CVFHEstimation< PointInT, PointNT, PointOutT >
类CVFHEstimation实现聚类视点直方图CVFH(Clustered Viewpoint Feature Histogram)描述子的计算,该描述算子主要是针对解决有残缺的点云识别问题而提出的,详细见文献(CAD - Model Recognition and 6DOF Pose Estimation Using 3D Cues)。
#include <pcl/features/cvfh.h>
CVFHEstimation ()
// 空构造函数
void filterNormalsWithHighCurvature (const pcl::PointCloud< PointNT