PCL入门

pcl的入门

本博客主要是对外文的翻译,及其他资料的一些整理。

pcl 分割成好几个模块的库

Filters(滤波器)

Features(特征)

Keypoints(关键点)

Registration(注册)

KdTree:k-dimension tree(k维的树)

OcTree(八叉树)

Segmetation(分割)

Sample Consensus(采样一致)

Surface(表面)

Range Image(范围图)

I/O(输入输出)

Visualization(可视化)

Common(基础)

Search(搜索)


初步介绍


Filters

滤波器的作用是降噪。因为测量误差,一些数据表现出大量的阴影点(发虚的点),这使得后面的3D处理变得更加的复杂。有些异常的值可以通过统计学分析来进行滤波,来除去那些不符合要求的点。这些分布稀疏的点的处理在pcl里面是基于计算点的近邻分布。对于每一个点来说,每个点和他所有临近点的距离都会被计算。假设他们是呈现标准正态分布,那些平均距离大于全局距离标准正态分布的点都将被认为是异样点而去除。

Filters在linux下的位置

头文件:

$(PCL_PREFIX)/pcl-1.6/pcl/filters/

二进制文件:

$(PCL_PREFIX)/bin/


Features

特征库包含了一些3D特征评估的数据机构与机制。3D特征通过一些3D点云,位置,空间来代表。描述了以点旁边的平均信息基础的几何模式。下面的图展示了一个简单的例子,一个圈圈住了k个最近邻。

Features在linux下的位置

头文件:

$(PCL_PREFIX)/pcl-1.6/pcl/features/

二进制文件:

$(PCL_PREFIX)/bin/


Keypoints

关键点库包含了两个主要的点云关键点算法。Keypoints(也称为感兴趣的点)是一些稳定的,有特色的,可以用作检测的点或者点云。这些keypoints小于所有点的个数,如果把他们与每个点上的特征描述器结合,就能组成一个简洁但是有代表性的描述原始数据的形式。


头文件:

$(PCL_PREFIX)/pcl-1.6/pcl/filters/ (你没有看错,就是这个库)

二进制文件:

$(PCL_PREFIX)/bin/



Registration

把几个数据集结合到一个总的数据集里面通常要使用一个叫做registration的技术。实现这个的关键的思想是鉴定数据之间相对应,找到使距离误差最小的转换。这个进程是重复的,因为一致性搜索往往受相对位置与角度的影响。只要误差一小于设定的误差,注册这个过程就宣告结束。registration 这个库可以对数据集进行多次操作,根据不同的一致性设置。(我的理解是你可以把对同样的数据,你可以设置不同的标准,你想可以让它结合得好一点,也可以让他结合得坏一点)。

头文件:

$(PCL_PREFIX)/pcl-1.6/pcl/filters/

二进制文件:

$(PCL_PREFIX)/bin/


Kd-tree


Kd-tree库包含了Kd-tree 数据结构,使用Flann,这使得它允许最近邻算法。

一个Kd-tree,是一个以空间为分割的数据结构存储了k维的点,使得可以进行有效率的范围搜索和最近邻搜索。最近邻搜索是一个核心操作,可以找到一组点的相关性或者定义一个点周围的近邻。

头文件:
 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/

Octree

Octree库包括了一些好的方法来创造分层的树的数据结构。这使得空间分割,缩减像素采样以及搜索操作成为可能。每一个八叉树要么就有8个子节点要么就没有。根节点描述了一个立方体的盒子,它压缩了所有的点。

头文件:
 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/

Segmentation
分割库包含了分割点云到明显聚类的算法。这些算法很适合处理由几个空间隔离的区域。

头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/

Sample Consensus

Sample Consensus库包含了SAmple Consensus方法,比如RANSAC方法和像平面与圆柱体一样的模型。这些能被自由的结合用来检测特定的模型和他们的参数在点云里面。


头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/


Surface

surface库处理与重构原来物体的表面。 Depending on the task at hand, this can be for example the hull, a mesh representation or a smoothed/resampled surface with normals.(这句话我翻译的不是很好,还是直接上原文吧)


头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/


Range Image

range_image这个库包含两个类用来表示和使用range images.Range image又叫深度图,像素值代表了到传感器的距离。如果了解了摄像机的矫正系数,一个范围图就能被转换成点云。


头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/

I/O

I/O库包含了读写点云文件(PCD:point cloud data),也包括了从传感器里面获取点云的的类和方法。

头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/

Visualization

visualization库是用来根据点云数据快速建立模型与可视化点云数据。就像OpenCV里面的highgui程序用来显示2D图像一般。

头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/filters/
二进制文件
 $(PCL_PREFIX)/bin/

Comman

common库包含了一般的数据结构和方法在大多数pcl库里面使用的。核心数据结构包括点云类和大多数的点云类型。也包含一些数值函数,比如计算距离/模,均值和方差,角度转换,几何转换等等。

头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/common/   (终于换了一个库了,对于linux真的有点奇怪)
二进制文件
 $(PCL_PREFIX)/bin/

Search

search库提供了很多方法来搜索最近邻通过使用不同的数据结构。

头文件:

 $(PCL_PREFIX)/pcl-1.6/pcl/search/
二进制文件
 $(PCL_PREFIX)/bin/

Binaries

这里包含了一些快捷的引用对于一些常用的PCL里面的工具
pcl_viewer:一个快速的工具用来可视化PCD文件。
语法:pcl_viewer <file_name 1...N>.<pcd or vtk> <options>,选项可以是:
-bc r,g,b = background color
-fc r,g,b = foreground color
-ps X = point size (1..64)
-opaque X = rendered point cloud opacity (0..1)
-ax n = enable on-screen display of XYZ axes and scale them to n
-ax_pos X,Y,Z = if axes are enabled, set their X,Y,Z position in space (default 0,0,0)
-cam (*) = use given camera settings as initial view
(*) [Clipping Range / Focal Point / Position / ViewUp / Distance / Field of View Y / Window Size / Window Pos] or use a <filename.cam> that contains the same information.
-multiview 0/1 = enable/disable auto-multi viewport rendering (default disabled)
-normals 0/X = disable/enable the display of every Xth point’s surface normal as lines (default disabled) -normals_scale X = resize the normal unit vector size to X (default 0.02)
-pc 0/X = disable/enable the display of every Xth point’s principal curvatures as lines (default disabled) -pc_scale X = resize the principal curvatures vectors size to X (default 0.02)


Usage example:

pcl_viewer -multiview 1 data/partial_cup_model.pcddata/partial_cup_model.pcd data/partial_cup_model.pcd



pcd_convert_NaN_nan: converts “NaN” values to “nan” values.(Note: Starting with PCL version 1.0.1 the string representation for NaN is “nan”.)
Usage example:
pcd_convert_NaN_nan input.pcd output.pcd
convert_pcd_ascii_binary: converts PCD (Point Cloud Data) files from ASCII to binary and viceversa.
Usage example:
convert_pcd_ascii_binary <file_in.pcd> <file_out.pcd> 0/1/2(ascii/binary/binary_compressed) [precision (ASCII)]
concatenate_points_pcd: concatenates the points of two or more PCD (Point Cloud Data) files into a single PCD file.
Usage example:
concatenate_points_pcd <filename 1..N.pcd>
(Note: the resulting PCD file will be ``output.pcd``)
pcd2vtk: converts PCD (Point Cloud Data) files to the VTK format.
Usage example:
pcd2vtk input.pcd output.vtk
pcd2ply: converts PCD (Point Cloud Data) files to the PLY format.
Usage example:
pcd2ply input.pcd output.ply
mesh2pcd: convert a CAD model to a PCD (Point Cloud Data) file, using ray tracing operations.
Syntax is: mesh2pcd input.{ply,obj} output.pcd <options>, where options are:
-level X = tesselated sphere level (default: 2)
-resolution X = the sphere resolution in angle increments (default: 100 deg)
-leaf_size X = the XYZ leaf size for the VoxelGrid – for data reduction (default: 0.010000 m)
octree_viewer: allows the visualization of octrees
Syntax is: octree_viewer <file_name.pcd> <octree resolution>
Usage example:
Example: ./octree_viewer ../../test/bunny.pcd 0.02


  • 5
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值