PCL简介

  • 处理2D/3D点云,包括I/O、滤波、特征提取、配准、可视化,以及一些点云变换等底层操作
  • BSD开源协议
  • 以库的形式给出,不同模块可以分别编译,是通过ccmake .. 设置一些CMake变量实现

数据格式

  • PointXYZ

  •   struct PointXYZ{
      	float x, y, z, padding;
      }
      /*The most efficient way for SSE-enabled processors, is to store the 3 dimensions as floats, followed by an extra float for padding*/
    

PCL的几大模块

I/O

  • PCD格式

    • 并不是“为了发明儿发明”,而是之前的有各种各样的缺点

      • PLY - a polygon file format, developed at Stanford University by Turk et al
      • STL - a file format native to the stereolithography CAD software created by 3D Systems
      • OBJ - a geometry definition file format first developed by Wavefront Technologies
      • X3D - the ISO standard XML-based file format for representing 3D computer graphics data
    • 格式说明

      • FIELDS:说明点云含有的信息,可能是xyz+{color|surface mode}
      • 重点是区分organizedunorganized的点云,前者表示有结构的,即既有宽又有高;后者高是1(只有一行数据)
      • VIEWPOINT:观测点,可以理解为相机的位置,默认无平移无旋转
      • DATA:数据真正存放的地方
    • 优点

    1. the ability to store and process organized point cloud datasets – this is of extreme importance for real time applications, and research areas such as augmented reality, robotics, etc;

    2. binary mmap/munmap data types are the fastest possible way of loading and saving data to disk.

    3. storing different data types (all primitives supported: char, short, int, float, double) allows the point cloud data to be flexible and efficient with respect to storage and processing. Invalid point dimensions are usually stored as NAN types.

    4. n-D histograms for feature descriptors – very important for 3D perception/computer vision applications

  • OpenNI驱动:用于从支持OpenNI协议的设备读取点云

数据结构

KD-Tree

  • K维二叉树(以二维举例来理解即可)
  • 优点:可以O()地查询K近邻

Octree

  • 八叉树
  • 和KD-Tree相比?可以实现降采样,切分

滤波器

  • 能够滤除外点(主要是测量误差引起=>菜鸟无人车在雨雪雾天气
  • 基于的是概率的方法,即对于一个点检测它周围点的分布,如果发现不符合概率分布就剔除

​ 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, keypoints, Surface检测

  • 特征检测
    • 对于一个点P,找它的K邻近邻居们,然后做特征值分解,求法向量(法向量就代表了特征
    • 特征值分解的原理?
  • 关键点检测
    • NARF keypoints
  • 表面检测
    • 随机采样一致性(RANSAC算法)
    • 有一个模型(比如平面、圆柱……),先假定一些点是符合这个模型,然后算其它所有点和这些“内点”的差距,如果小于一定值就可以认为这些内点是真的内点(真的符合这个模型)
    • 回顾:戴老师讲过的霍夫变换也可以实现检测

Segmentation

  • 聚类,分出桌子和地面

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.

深度图的处理

  • 可以深度图转点云

Visualization