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
總結
- 上一篇: ajax获取get请求,get请求
- 下一篇: Python小白的数学建模课-A2.20