本文我们一起学习一下Point Cloud Library的相关内容。PCL被分成了多个库,我们接下来分别看一下每个库的功能和内容是什么。原文见 https://pcl.readthedocs.io/projects/tutorials/en/master/walkthrough.html#
Filters
这一部分主要是对点云滤波,去噪或者outlier去除。由于估计噪声,一些点云中是有些阴影点的,这就使得local point cloud 3D features的估计变得更难。这些outliers 可以滤掉:首先进行a statistical analysis on each point’s neighborhood,then把不满足某个条件的点全扔掉。
比如 sparse outlier removal 这个技术。对于每个点,得到他到所有邻居距离的均值,并假设这个均值是Gaussian的。那么那些距平均距离在高斯tail地方的点都可以被当做outlier.
其他常见的任务包括:
- Filtering a PointCloud using a PassThrough filter: 在某个给定的维度上,将用户指定区域外的点删掉.
- Downsampling a PointCloud using a VoxelGrid filter: 降采样。
- Removing outliers using a StatisticalOutlierRemoval filter: 移除 sparse outliers from noisy data, using StatisticalRemoval.
- Projecting points using a parametric model: 投影 points to a parametric model (i.e., plane).
- Extracting indices from a PointCloud: extract a set of indices given by a segmentation algorithm.
- Removing outliers using a Conditional or RadiusOutlier removal: 移除 outliers from noisy data, using ConditionalRemoval, RadiusOutlierRemoval.
Features
这个库主要包含的是 data structures and mechanisms 使得我们可以从点云中估计3D feature。3D feature指的是在某个感兴趣的3D点的几何特征。
几何特征通常由某个点周围的 k k k closest point neighbors 的特征一起推算得到。为了找到这些邻居,我们需要使用空间分解技术,比如octrees or kD-trees,把三维空间分为多个小chunks 再寻找 k k k closest neighbors。当然,我们既可以找最近的 k k k 个,也可以找一个圆内的所有点。
两个最常用的features是
- underlying surface’s estimated curvature
- normal at a query point
确定surface normals and curvature changes 最简单的方法是对k-neighborhood point surface patch进行特征值分解。这样一来,最小特征值对应的特征向量便可以近似surface normal; 而 surface curvature change 可以从 eigenvalues 中估计 λ 0 λ 0 + λ 1 + λ 2 \frac{\lambda_0}{\lambda_0+\lambda_1+\lambda_2} λ0+λ1+λ2λ0 with λ 0 < λ 1 < λ 2 \lambda_0<\lambda_1<\lambda_2 λ0<λ1<λ2.