點集的視點特徵直方圖的評估

轉載:http://m.blog.csdn.net/article/details?id=51106621

VFH(Viewpoint Feature Histgram)視角特徵直方圖描述器,可以很直觀的表現點的聚類在處理聚類識別與6DOF位姿估計。

下面的圖像展示了一個VFH識別和位姿估計的例子。給一些訓練集,除了左下角的那個杯子,用來學習,用左下角的杯子作爲檢測。

VFH源於FPFH描述器,因爲它的速度與區別能力,我們決定利用FPFH的識別結果,但是在保持比例不變的情況下增加了一個視角變量。

我們在物體識別和位姿檢測上的貢獻是擴展了FPFH使其能夠評估整個物體的聚類,並且計算了額外的視角方向和法線之間的額外數據。爲了做到這一點,我們使用了把視角方向混合到法線方向的計算中去。

 

視點成分是通過收集角度直方圖來計算的,這個角度是由每個法線產生的。注意,我們並不意味着對每個法線的視角具有伸縮不變性,而是意味着從視點方向到每個法線的方向轉換。第二個成分是測量相對水平,傾斜和偏轉角度就像上一節FPFH裏面講的那樣,不過現在是通過視點方向和表面法線方向來測量。

我們把這個新的組合特徵叫做VFH,下圖表明瞭這是由2部分組成的:

1.一個視點方向組成

2.一個表面形狀組成包括擴展的FPFH

要使用VFH在pcl裏面得通過pcl_features這個庫。

PFH和FPFH與VFH的主要區別是,對於一個給定的點雲數據集,只有一個單一的VFH描述器被預估,而PFH/FPFH將有和點雲裏面相同的點的數量的輸入。

下面是一個代碼段。

#include <pcl/point_types.h>
#include <pcl/features/vfh.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 VFH estimation class, and pass the input dataset+normals to it
  pcl::VFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::VFHSignature308> vfh;
  vfh.setInputCloud (cloud);
  vfh.setInputNormals (normals);
  // alternatively, if cloud is of type PointNormal, do vfh.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<pcl::PointXYZ>::Ptr tree (new pcl::search::KdTree<pcl::PointXYZ> ());
  vfh.setSearchMethod (tree);

  // Output datasets
  pcl::PointCloud<pcl::VFHSignature308>::Ptr vfhs (new pcl::PointCloud<pcl::VFHSignature308> ());

  // Compute the features
  vfh.compute (*vfhs);

  // vfhs->points.size () should be of size 1*
}

我們可以看到這比以前使用的FPFH和PFH更簡單了,只要輸入點雲即可。

可視化VFH特徵,libpcl_visualization包含了一個特殊的PCLHistogramVisulization類,也是通過pcl_viewer來顯示VFH圖。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章