点云基础

Point Clouds

 A point cloud is a data structure used to represent a collection of multi-dimensional points and is commonly used to represent three-dimensional data.
 In a 3D point cloud, the points usually represent the X, Y, and Z geometric coordinates of an underlying sampled surface. When color information is present, the point cloud becomes 4D.

1.IO

PCD File Format
A simple file format for storing multi-dimensional point data. It consists of a text header (with the fields below), followed by the data in ASCII (w/ points on separate lines) or binary (a memory
copy of the
points vector of the PC).

  • VERSION - the PCD file version (usually .7)
  • FIELDS - the name of each dimension/field that a point can have (e.g. FIELDS x y z )
  • SIZE - the size of each dimension in bytes (e.g. a float is 4)
  • TYPE - the type of each dimension as a char (I= signed,U= unsigned,Ffloat)
  • COUNT - the number of elements in each dimension (e.g. x, y, or z would only have 1, but a histogram would haveN)
  • WIDTH - the width of the point cloud
  • HEIGHT - the height of the point cloud
  • VIEWPOINT - an acquisition viewpoint for the points: translation (tx ty tz) + quaternion (qw qx qy qz)
  • POINTS - the total number of points in the cloud
  • DATA - the data type that the point cloud data is stored in (asciiorbinary)


2.3D Features


How do we compute normals in practice? 
  • Input: point cloud Pof 3D pointsp= (x;,y,z)T 
 
  • Surface Normal Estimation:
  1. Select a set of pointsQ ⊆ Pfrom the neighborhood ofp.
  2. Fit a local plane throughQ.
  3. Compute the normal~nof the plane.




 setInputCloud = FalsesetInputCloud = True
setSearchSurface = Falsecompute on all points, using all pointscompute on a subset,using all points
setSearchSurface = Truecompute on all points, using a subsetcompute on a subset,using a subse

3.Filtering

 When working with 3D data, there are many reasons for filtering your data:

  • Restricting range (PassThrough)
  • Downsampling (VoxelGrid)
  • Outlier removal(StatisticalOutlierRemoval /RadiusOutlierRemoval)
  • Selecting indices
  • Projecting points

PassThrough Filter 

 Filter out points outside a specified range in one dimension. (Or filter them in with setFilterLimitsNegative)


Downsampling to a Voxel Grid

 Voxelize the cloud to a 3D grid. Each occupied voxel is approximated by the centroid of the points inside of it.


Statistical Outlier Removal

 Filter points based on their local point densities. Remove points that are sparse relative to the mean point density of the whole cloud.

Conditional or Radius Outlier removal



Projecting points

Project points onto a parametric model.


Extracting indices

 Extract a subset of points from a point cloud based on the indices output by a segmentation algorithm.


4.Keypoint

What is a keypoint?

 A keypoint (also known as an \interest point") is simply a point that has been identied as a relevant in some way. A good keypoint detector will find points with the following properties:

  • Sparseness: Typically, only a small subset of the points in the scene are keypoints.
  • Repeatiblity:If a point was determined to be a keypoint in one point cloud, a keypoint should also be found at the corresponding location in a similar point cloud. (Such points are often called "stable".)
  • Distinctiveness:The area surrounding each keypoint should have a unique shape or appearance that can be captured by some feature descriptor.
Why compute keypoints?
  • Some features are expensive to compute, and it would be prohibitive to compute them at every point. Keypoints identifya small number of locationswhere computing feature descriptors is likely to be most effective.
  • When searching for corresponding points, features computed at non-descriptive points will lead to ambiguous feature corespondences. By ignoring non-keypoints, one canreduce error when matching points.

Detecting 3D SIFT Keypoints
Computing PFH Features at Keypoints 
Finding Correspondences

5.Trees

K-d Trees

 A k-d tree, or k-dimensional tree, is a data structure used in computer science for organizing some number of points in a space with k dimensions. It is a binary search tree with other constraints imposed on it. K-d trees are very useful for range and nearest neighbor searches.


Octrees

 An octree is a tree-based data structure for managing sparse 3-D data. Each internal node has exactly eight children.

6.Sample Consensus & Segmentation

 The Random Sample Consensus (RANSAC) algorithm assumes the data is comprised of both inliers and outliers. The distribution of inliers can be explained by a set of parameters and a model. The outlying data does not fit the model. 

Its basic operation:line example
  1. select sample set— 2 points
  2. compute model— line equation
  3. compute and count inliers— e.g.band
  4. repeat untilsufficiently confident — e.g. 95%
several extensions exist in PCL:
  • MSAC (weighted distances instead of hard thresholds)
  • MLESAC (Maximum Likelihood Estimator)
  • PROSAC (Progressive Sample Consensus)
also, several model types are provided in PCL:
  • Plane models (with constraints such as orientation)
  • Cone
  • Cylinder
  • Sphere
  • Line
  • Circle
  • ...

7.Registration

Iterative Closest Point 
 ICP iteratively revises the transformation (translation, rotation) needed to minimize the distance between the points of two raw scans.
 Inputs: points from two raw scans, initial estimation of the transformation, criteria for stopping the iteration.
 Output: refined transformation.
 The algorithm steps are :
  1. Associate points by the nearest neighbor criteria.
  2. Estimate transformation parameters using a mean square cost function.
  3. Transform the points using the estimated parameters.
  4. Iterate (re-associate the points and so on).

官方例程







评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值