PCL study: point cloud feature - quick points feature histogram (FPFH) descriptor

Consider the point cloud is known that there are n points P, its point feature histogram (the PFH) Theoretical computational complexity is O (nk ^ 2), where k is the cloud point P is calculated for each feature point vector p the number of neighborhood. Computing for real-time or near real time applications, applications, dense point clouds point feature histogram (the PFH), is a major performance bottleneck. PFH is calculated in a simplified form, referred to as fast-point feature histogram FPFH (Fast Point Feature Histograms), FPFH to reduce the computational complexity of the algorithm, but still retains most of the characteristics identified PFH.

Steps:

第一步:先计算了每个查询点Pq的一系列值,并把它叫做SPFH(Simplified Point Feature Histgram)

第二步:每个点的最近邻是重新分配,SPFH值将用来权衡FPFH的值:

FPFH(\boldsymbol{p}_q) = SPFH(\boldsymbol{p}_q) + {1 \over k} \sum_{i=1}^k {{1 \over \omega_k} \cdot SPFH(\boldsymbol{p}_k)}

In the above formula, the weights  \omega_k in some given metric space, represents the query point  p_qand the adjacent points to  p_kthe distance between, and therefore can be used to assess a pair of points ( p_q, p_k, but if desired, can also \omega_kuse another metric representation. As shown in FIG 1 to help understand the importance of this aspect of the weights, which is represented by point p_qas the center k of the neighborhood of influence. 

_images/fpfh_diagram.png

1 point p_qas the center of the neighborhood scope FIG k

Accordingly, for a query point is known p_q, the algorithm first uses only p_qbetween it and the points in the neighborhood of response (red line in the figure above described), to estimate its value SPFH, it is clear that this calculation PFH less than standard the interconnection between points in the neighborhood. All points of the point cloud data sets have to perform this calculation to obtain SPFH, followed by the use of its neighboring points p_kSPFH value and the p_qSPFH value back right point recalculation, resulting in p_qa final FPFH value of the point. Calculating the added calculation FPFH connection, he expressed as a black line in the figure above. As shown above, some of the important points (the p_qpoints directly connected) is repeated counted twice (represented by a thick line in the drawing), while the other indirectly connected by the thin black line.

The difference between PFH and FPFH

The main difference between the calculated FPFH PFH and summarized as follows:

1.FPFH没有对全互连 点的所有邻近点的计算参数进行统计,从图12-18中可以看到,因此可能漏掉了一些重要的点对,而这些漏掉的对点可能对捕获查询点周围的几何特征有贡献。

2.PFH特征模型是对查询点周围的一个精确的邻域半径内,而FPFH还包括半径r范围以外的额外点对(不过在2r内);

3.因为重新权重计算的方式,所以FPFH结合SPFH值,重新捕获邻近重要点对的几何信息;

4.由于大大地降低了FPFH的整体复杂性,因此FPFH有可能使用在实时应用中;

5.通过分解三元组,简化了合成的直方图。也就是简单生成d分离特征直方图,对每个特征维度来单独绘制,并把它们连接在一起(见下2图)。

 _images/fpfh_theory.jpg

And FIG. 2 PFH schematic FPFH

Estimated FPFH feature

Rapid point feature histogram FPFH implemented point cloud library as pcl_features part of the library. The default implementation uses 11 FPFH statistical subintervals (e.g.: four feature values in each of its parameter space will be divided into 11), wherein the histogram is calculated separately and then combined 33 come to a floating-point value feature vector elements, which is stored in a pcl :: FPFHSignature33 point type. The following code segment of the input data set will all point estimates a set of feature values FPFH.

 

#include 

#include           //fpfh特征估计类头文件声明

...//其他相关操作

pcl::PointCloud<pcl::PointXYZ>::Ptrcloud(new pcl::PointCloud<pcl::PointXYZ>);

pcl::PointCloud<pcl::Normal>::Ptrnormals(new pcl::PointCloud<pcl::Normal>());

...//打开点云文件估计法线等

//创建FPFH估计对象fpfh,并把输入数据集cloud和法线normals传递给它。

pcl::FPFHEstimation<pcl::PointXYZ,pcl::Normal,pcl::FPFHSignature33> fpfh;

fpfh.setInputCloud(cloud);

fpfh.setInputNormals(normals);

//如果点云是类型为PointNormal,则执行fpfh.setInputNormals (cloud);

//创建一个空的kd树对象tree,并把它传递给FPFH估计对象。

//基于已知的输入数据集,建立kdtree

pcl::search::KdTree<PointXYZ>::Ptrtree(new pcl::search::KdTree<PointXYZ>);

fpfh.setSearchMethod(tree);

//输出数据集

pcl::PointCloud<pcl::FPFHSignature33>::Ptrfpfhs(new pcl::PointCloud<pcl::FPFHSignature33>());

//使用所有半径在5厘米范围内的邻元素

//注意:此处使用的半径必须要大于估计表面法线时使用的半径!!!

fpfh.setRadiusSearch(0.05);

//计算获取特征向量

fpfh.compute(*fpfhs);

// fpfhs->points.size ()应该和input cloud->points.size ()有相同的大小,即每个点有一个特征向量

Calculating the actual internal FPFHEstimation class only performs the following operations:

对点云P中的每个点p

第一步:

1.得到:math:`p`的邻域元素

2. 计算每一对:math:`p, p_k`的三个角度参数值(其中:math:`p_k`是:math:`p`的邻元素)

3.把所有结果统计输出到一个SPFH直方图

第二步:

1.得到:math:`p`的最近邻元素

2.使用:math:`p`的每一个SPFH和一个权重计算式,来计算最终:math:`p`的FPFH

Utilize OpenMP improve speed FPFH

For users demanding computing speed, PCL provides another implementation of a FPFH estimation, which uses multi-core / standardized using OpenMP development patterns to improve the calculation speed. The class name is pcl :: FPFHEstimationOMP, and 100% of its application program interface (API) threaded compatible pcl :: FPFHEstimation, which makes it suitable as a replacement element. 8 core system may be implemented exactly the same OpenMP core computing systems within a single 6-8 times faster calculation time.

Guess you like

Origin blog.csdn.net/zfjBIT/article/details/93711546