【问题标题】:Point Feature Histograms in PCL library output interpretationPCL库输出解释中的点特征直方图
【发布时间】:2017-03-27 05:02:48
【问题描述】:

我正在使用名为点云库 (PCL) 的库。特别是我正在尝试计算点特征直方图。我从网站上遵循了这段代码:

#include <pcl/point_types.h>
#include <pcl/features/pfh.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 PFH estimation class, and pass the input dataset+normals to it
  pcl::PFHEstimation<pcl::PointXYZ, pcl::Normal, pcl::PFHSignature125> pfh;
  pfh.setInputCloud (cloud);
  pfh.setInputNormals (normals);
  // alternatively, if cloud is of tpe PointNormal, do pfh.setInputNormals (cloud);

  // Create an empty kdtree representation, and pass it to the PFH 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> ());
  //pcl::KdTreeFLANN<pcl::PointXYZ>::Ptr tree (new pcl::KdTreeFLANN<pcl::PointXYZ> ()); -- older call for PCL 1.5-
  pfh.setSearchMethod (tree);

  // Output datasets
  pcl::PointCloud<pcl::PFHSignature125>::Ptr pfhs (new pcl::PointCloud<pcl::PFHSignature125> ());

  // 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!!!
  pfh.setRadiusSearch (0.05);

  // Compute the features
  pfh.compute (*pfhs);

  // pfhs->points.size () should have the same size as the input cloud->points.size ()*
}

我得到的输出是原始点云中每个点的 125 个值的数组。例如,如果我有一个包含 1000 个点的点云,其中每个点都包含 XYZ,那么将有 1000 * 125 个值。我能够理解为什么我有 125 个条目,每个条目对应一个 bin。 (假设 3 个特征和 5 个分区 5^3 = 125)

这篇文章帮助了一些人:PCL Point Feature Histograms - binning

很遗憾,我还有几个问题:

1) 为什么每点有 125 个直方图?是不是因为它测量了K-最近邻域中的点与当前点具有相似特征的点的百分比是多少,然后每个点都有自己的邻域?

2) 在某些方面,我看到所有 125 个条目都是零。为什么?

3) 绘制点特征直方图值如论文和网站所示:

网站: http://pointclouds.org/documentation/tutorials/pfh_estimation.php#pfh-estimation

纸张: https://pdfs.semanticscholar.org/5aee/411f0b4228ba63c85df0e8ed64cab5844aed.pdf

所显示的图表的 X 轴是 bin 的数量(在我的例子中是 125 个 bin)所以自然的问题是我们如何将每个点的 125 个值合并到一个图表中? 我尝试对适当的列进行简单的求和,并将它们按常数缩放,但我认为这是不对的。求和是指为每个点添加所有 bin[0],然后为每个点求和所有 bin[1],依此类推,直到 bin[124]。

我非常感谢任何帮助澄清这一点。 谢谢。

【问题讨论】:

    标签: c++ point-cloud-library


    【解决方案1】:

    PFH 描述符是一个局部描述符,因此直方图是针对给定的每个点计算的。您可能只想使用一个关键点或一组关键点。

    如果直方图在半径搜索范围内没有最近邻,则直方图的条目将为 0。

    至于图形,请尝试一次查看一个点的直方图。我认为将其合并到一个图表中是没有意义的。

    如果您对考虑所有点的全局描述符感兴趣,请查看 CVFH 描述符(Clustered Viewpoint Feature Histogram)或其他全局描述符。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-16
      • 2023-04-06
      • 1970-01-01
      • 2020-03-06
      • 2019-10-20
      相关资源
      最近更新 更多