日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

快速特征点直方图描述器(FPFH)

發(fā)布時(shí)間:2025/3/15 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 快速特征点直方图描述器(FPFH) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

PFH的理論上的時(shí)間復(fù)雜度是O(nk的平方),n是點(diǎn)的數(shù)量,k是最近鄰的個數(shù)。對于實(shí)時(shí)系統(tǒng)來說,這壓根就是不行的,所以作為PFH規(guī)劃的簡化版本,FPFH把計(jì)算復(fù)雜度減少成O(nk),但是還具有很好的和PFH差不多的區(qū)分能力。

第一步我們先計(jì)算了每個查詢點(diǎn)Pq的一系列值,并把它叫做SPFH(Simplified Point Feature Histgram)

第二步每個點(diǎn)的最近鄰是重新分配,SPFH值將用來權(quán)衡FPFH的值:

這里的Wk代表了兩點(diǎn)的距離。權(quán)重(weight)的組合是非常重要的,下面的圖顯示了這一點(diǎn):

可以看到越近的權(quán)重越大,線越粗。

因此,給定一個點(diǎn)Pq,這個算法第一步評估了SPFH的值,通過創(chuàng)造它和它的近鄰的匹配。這個過程將一直重復(fù),通過近鄰SPFH的值不停的改變權(quán)重,最終生成了Pq的FPFH。

PFH與FPFH之間的差異

1.FPFH沒有和它所有的近鄰有著聯(lián)系,因此可能會丟失一些值的匹配。

2.PFH模型可以更精確的描述表面,而FPFH則包括了額外的點(diǎn)的配對在半徑為r的圓的外面(最多不會超過2r)

3.因?yàn)闄?quán)重的組合,FPFH結(jié)合了SPFH的值并且重新獲取了一些點(diǎn)的近鄰。

4.FPFH復(fù)雜度大大降低,計(jì)算更快。

5.最終的直方圖是簡化了。

?

預(yù)估FPFH的特征值

FPFH的執(zhí)行使用了11個分發(fā)的子區(qū)間,和一個非相關(guān)的組合(33位的數(shù)組),把它存在pcl::FPFHSignature33這個點(diǎn)類型里面。

下面的代碼段,預(yù)估了一個所有點(diǎn)的FPFH的特征集合

#include <pcl/point_types.h> #include <pcl/features/fpfh.h>{pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);pcl::PointCloud<pcl::Normal>::Ptr normals (new pcl::PointCloud<pcl::Normal> ());... read, pass in or create a point cloud with normals ...... (note: you can create a single PointCloud<PointNormal> if you want) ...// Create the FPFH estimation class, and pass the input dataset+normals to itpcl::FPFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::FPFHSignature33> fpfh;fpfh.setInputCloud (cloud);fpfh.setInputNormals (normals);// alternatively, if cloud is of tpe PointNormal, do fpfh.setInputNormals (cloud);// Create an empty kdtree representation, and pass it to the FPFH estimation object.// Its content will be filled inside the object, based on the given input dataset (as no other search surface is given).pcl::search::KdTree<PointXYZ>::Ptr tree (new pcl::search::KdTree<PointXYZ>);fpfh.setSearchMethod (tree);// Output datasetspcl::PointCloud<pcl::FPFHSignature33>::Ptr fpfhs (new pcl::PointCloud<pcl::FPFHSignature33> ());// Use all neighbors in a sphere of radius 5cm// IMPORTANT: the radius used here has to be larger than the radius used to estimate the surface normals!!!fpfh.setRadiusSearch (0.05);// Compute the featuresfpfh.compute (*fpfhs);// fpfhs->points.size () should have the same size as the input cloud->points.size ()* }

調(diào)用FPFHEstimation時(shí)實(shí)際做了這么幾步

1.PFH的步驟

2.使用每個SPFH,通過一個權(quán)重組合來賦值給FPFH。

類似于PFH我們可以把這段代碼反正compute()函數(shù)前,進(jìn)行優(yōu)化

for (int i = 0; i < normals->points.size(); i++) {if (!pcl::isFinite<pcl::Normal>(normals->points[i])){PCL_WARN("normals[%d] is not finite\n", i);} }

我們可以用OpenMP進(jìn)行優(yōu)化

使用OpenMP可以進(jìn)行多線程計(jì)算。類名叫做pcl::FPFHEstimationOMP,

?

總結(jié)

以上是生活随笔為你收集整理的快速特征点直方图描述器(FPFH)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。