原文地址:http://pointclouds.org/documentation/tutorials/walkthrough.php#walkthrough

教程将带您浏览PCL安装的组件,同时对各个模块进行简短的概括列出其所处的位置以及和不同模块之间的相互关联

This tutorials will walk you through the components of your PCL installation, providing short descriptions of the modules, indicating where they are located and also listing the interaction between different components.

 

简介Overview

PCL包括多个子模块库。最重要的PCL模块库有如下:过滤器Filters特征Features关键点Keypoints注册RegistrationKd树Kd-tree八叉树Octree切分Segmentation、Sample Consensus、Surface、Range Image、文件读写I/O、Visualization、通用库Common、Search

PCL is split in a number of modular libraries. The most important set of released PCL modules is shown below:Filters、Features、Keypoints、Registration、Kd-tree、Octree、Segmentation、Sample Consensus、Surface、Range Image、I/O、Visualization、Common、Search

 

过滤器Filters

下图是一个噪音消除的示例。因为测量的误差,某些点集存在大量的阴影点,而这将使得局部点云的3D特征建立复杂化。通过对每个点的区的统计分析,削除未达到一定标准的点,可以将其中一些异常的数据点滤去。在PCL中稀疏噪音的消除方法是在输入的点集数据中计算各点到其邻区的分布概率。对于每个点,计算其到所有相邻点的距离,假定其结果应该是符合特定均值和标准差的高斯分布,定义全局的可容忍的平均值和标准差,将所有不在可容忍误差内的点都认为是噪音点而删除。

An example of noise removal is presented in the figure below. Due to measurement errors, certain datasets present a large number of shadow points. This complicates the estimation of local point cloud 3D features. Some of these outliers can be filtered by performing a statistical analysis on each point’s neighborhood, and trimming those that do not meet a certain criteria. The sparse outlier removal implementation in PCL is based on the computation of the distribution of point to neighbor distances in the input dataset. For each point, the mean distance from it to all its neighbors is computed. By assuming that the resulting distribution is Gaussian with a mean and a standard deviation, all points whose mean distances are outside an interval defined by the global distances mean and standard deviation can be considered as outliers and trimmed from the dataset.

特征Features

在3D特征教程里有一个例子展示了特征的基本理论。

特征库包括数据结构和从点云建立3D特征的方法。3D特征为对于特定点其周围的可用的几何关系信息,如特定的三维点、位置或空间。对于查询点周围的点云数据通常简称为k-neighborhood

下图为一个简单的查询点和它所选的k-neighborhood区域。

A theoretical primer explaining how features work in PCL can be found in the 3D Features tutorial.

The features library contains data structures and mechanisms for 3D feature estimation from point cloud data. 3D features are representations at certain 3D points, or positions, in space, which describe geometrical patterns based on the information available around the point. The data space selected around the query point is usually referred to as the k-neighborhood.

The following figure shows a simple example of a selected query point, and its selected k-neighborhood.

两个最广泛使用的几何点属性是曲面的曲率估计和查询点p的法线。利用点的k-neighborhood计算所得的这两个属性都可以作为本地特征。为了确定有效的k-neighborhood点云数据,输入的点云数据通常会按空间划分为多个小块区域,如八叉树或KD-trees,然后在这些区域中查找相邻的点数据。根据具体的应用情况,可以选择p点附近的固定数量的k个点或者是距离p点r距离内的所有点。毫无疑问,最简单的计算p点的法线和曲率变化的方法是在k-neighborhood点曲面中将特征分解计算(例如分别计算特征向量和特征值),当特征值最小时所相关的特征向量即可近似为p点的法向量,同时曲面的曲率变化可以通过如下公式计算得到:(曲率变化计算不理解其推导过程,后续理解后在详述)。

An example of two of the most widely used geometric point features are the underlying surface’s estimated curvature and normal at a query point p. Both of them are considered local features, as they characterize a point using the information provided by its k closest point neighbors. For determining these neighbors efficiently, the input dataset is usually split into smaller chunks using spatial decomposition techniques such as octrees or kD-trees (see the figure below - left: kD-tree, right: octree), and then closest point searches are performed in that space. Depending on the application one can opt for either determining a fixed number of k points in the vicinity of p, or all points which are found inside of a sphere of radius r centered at p. Unarguably, one the easiest methods for estimating the surface normals and curvature changes at a point p is to perform an eigendecomposition (i.e., compute the eigenvectors and eigenvalues) of the k-neighborhood point surface patch. Thus, the eigenvector corresponding to the smallest eigenvalue will approximate the surface normal n at point p, while the surface curvature change will be estimated from the eigenvalues as:

关键点Keypoints

关键点库含有两个点云集的关键点检测算法。关键点(也叫做兴趣点)是指在一副图像或者一个点云集中能够利用一个明确标准检测出来的稳定的、独特的点。一般情况下关键点的数量要远远少于点云集中的点数。通常将关键点信息和各个关键点的本地特征信息组合起来形成一组compact—yet descriptive—representation的原始数据。

下图是从一个深度图中生成NARF关键点的示例:

The keypoints library contains implementations of two point cloud keypoint detection algorithms. Keypoints (also referred to as interest points) are points in an image or point cloud that are stable, distinctive, and can be identified using a well-defined detection criterion. Typically, the number of interest points in a point cloud will be much smaller than the total number of points in the cloud, and when used in combination with local feature descriptors at each keypoint, the keypoints and descriptors can be used to form a compact—yet descriptive—representation of the original data.

The figure below shows the output of NARF keypoints extraction from a range image:

注册Registration

将一些点集数据在统一的世界坐标系下组合起来即为注册。其关键在于确定各个点集之间的关联点,计算出各个关联点之间最近似的变换矩阵,对所有的原始数据集不停的重复此过程直到,直到出现各个点集之间的对齐误差小于指定的阈值,即可认为注册过程完成。

注册库包含了的大量的点云注册算法,其可以处理的点集数据不论是否为有序。例如,PCL在强注册算法下,可以将拒绝坏的点集而只将好的点集注册。

Combining several datasets into a global consistent model is usually performed using a technique called registration. The key idea is to identify corresponding points between the data sets and find a transformation that minimizes the distance (alignment error) between corresponding points. This process is repeated, since correspondence search is affected by the relative position and orientation of the data sets. Once the alignment errors fall below a given threshold, the registration is said to be complete.

The registration library implements a plethora of point cloud registration algorithms for both organized and unorganized (general purpose) datasets. For instance, PCL contains a set of powerful algorithms that allow the estimation of multiple sets of correspondences, as well as methods for rejecting bad correspondences, and estimating transformations in a robust manner.

Kd树Kd-tree

Kd树的基本原理可以在其基础教程里了解。

Kd树库的基础数据结构使用了FLANN以便可以快速的进行邻区搜索。

Kd树按空间划分生成叶子节点,各个叶子节点里存放点数据,其可以按半径搜索或邻区搜索。最近邻区搜索是点云处理中的一样核心操作,在点集之间确定关联点、特征描述、点的邻区搜索时都会用到。

A theoretical primer explaining how Kd-trees work can be found in the Kd-tree tutorial.

The kdtree library provides the kd-tree data-structure, using FLANN, that allows for fast nearest neighbor searches.

A Kd-tree (k-dimensional tree) is a space-partitioning data structure that stores a set of k-dimensional points in a tree structure that enables efficient range searches and nearest neighbor searches. Nearest neighbor searches are a core operation when working with point cloud data and can be used to find correspondences between groups of points or feature descriptors or to define the local neighborhood around a point or points.

八叉树Octree

 八叉树库提供了直接从点云数据创建树的方法。其可支持的操作有:空间分割、下采样、和搜索。每个八叉树的节点都有八个子节点或者没有子节点(叶节点)。根节点包含囊括所有点的立方体空间,每层深度的子节点都是上层空间按各轴除2的子空间。

八叉树通常用来作邻区搜索,如相邻区间内搜索、K邻区搜索、指定半径内搜索。八叉树会自动的调整根据点集数据调整其空间尺度。叶节点还提供了一些额外的操作,如空间的占有率查询、每空间单位内的点密度。库还提供了将八叉树编码为二进制文件以及从二进制文件解析为八叉树的功能。此外库中还使用了内存池技术减少了频繁内存的申请和释放开销,提高了八叉树的效率。

下图展示了一个八叉树的最底层的子节点空间。每个斯坦福兔表面的点即红色的点都在八叉树子节点空间内,这幅图就是有八叉树的viewer创建。

The octree library provides efficient methods for creating a hierarchical tree data structure from point cloud data. This enables spatial partitioning, downsampling and search operations on the point data set. Each octree node the has either eight children or no children. The root node describes a cubic bounding box which encapsulates all points. At every tree level, this space becomes subdivided by a factor of 2 which results in an increased voxel resolution.

The octree implementation provides efficient nearest neighbor search routines, such as “Neighbors within Voxel Search”, “K Nearest Neighbor Search” and “Neighbors within Radius Search”. It automatically adjusts its dimension to the point data set. A set of leaf node classes provide additional functionality, such as spacial “occupancy” and “point density per voxel” checks. Functions for serialization and deserialization enable to efficiently encode the octree structure into a binary format. Furthermore, a memory pool implementation reduces expensive memory allocation and deallocation operations in scenarios where octrees needs to be created at high rate.

The following figure illustrates the voxel bounding boxes of an octree nodes at lowest tree level. The octree voxels are surrounding every 3D point from the Stanford bunny’s surface. The red dots represent the point data. This image is created with the octree_viewer.

切分Segmentation

切分库包主要为将一个点云切分为多个片段簇。切分最适合处理由一些空间隔离区域组成的点云,在这种情况下,点云常常被分解为一些能够独立处理的簇。

关于簇的基本原理可以到其簇的提取教程里面了解。下面两幅图分别展示了片面模型(左)的切分和圆柱模型(右)的切分。

The segmentation library contains algorithms for segmenting a point cloud into distinct clusters. These algorithms are best suited for processing a point cloud that is composed of a number of spatially isolated regions. In such cases, clustering is often used to break the cloud down into its constituent parts, which can then be processed independently.

A theoretical primer explaining how clustering methods work can be found in the cluster extraction tutorial. The two figures illustrate the results of plane model segmentation (left) and cylinder model segmentation (right).

 

posted on 2012-11-02 19:18  scandgy  阅读(1078)  评论(0)    收藏  举报