https://medium.com/@nabil.madali/point-cloud-sampling-8e74a6e48743
Point Cloud Sampling
There are many methods of point cloud sampling, common ones are uniform sampling, geometric sampling, random sampling, grid sampling, etc.
Grid sampling
Grid sampling is to discretize the three-dimensional space with grid points, and then sample a point in each grid point. The specific method is as follows:
Create grid points: As shown in the middle figure, calculate the bounding box of the point cloud, and then discretize the bounding box into small grids. The length, width and height of the grid can be set by the user, or can be obtained by setting the number of grid points in the three directions of the bounding box.
Each small grid contains several points, and the point closest to the center of the grid is the sampling point, as shown in the right figure.
Features of Grid Sampling:
- Very efficient
- The sampling point distribution is relatively uniform, but the uniformity is not as high as the average price sampling
- The point spacing can be controlled by the size of the grid point
- Cannot accurately control the number of sampling points
Uniform sampling
There are many methods of uniform sampling, and there are certain methods to evaluate the uniformity of sampling. Here is a simple uniform sampling method, sampling at the Farthest Point. The specific method is as follows:
The input point cloud is denoted as C, the sampling point set is denoted as S, and S is initialized as an empty set.
Randomly sample a seed point Seed and put it in S.
Sample one point at a time and put in S . The method of sampling is to find a point that is farthest from the set S in the set CS. The distance from a point to the set is the smallest distance from this point to all points in the set. As shown in Figure 2–6, the number of sampling points S is 2, 4, 10, 20, 100.
Features of farthest point sampling:
-
Sampling points are evenly distributed
-
The time complexity of the algorithm is somewhat high, because each time a point is sampled, the distance between the collection and the collection must be calculated. Divide and conquer can be used to improve efficiency.
-
Sampling points are generally distributed near the boundary first. This property is useful in some places, such as point sampling in primitive detection.
Geometric sampling
Geometric sampling. The greater the curvature of the point cloud, the greater the number of sampling points. A simple geometric sampling method is introduced below. The specific method is as follows:
The input is a point cloud, the target sample number S, the sample uniformity U.
Point cloud curvature calculation is relatively time-consuming. Here we use a simple method to approximate the effect of curvature:
Calculate the K neighborhood for each point, and then calculate the normal angle between the point and the neighborhood point. The greater the curvature, the greater the angle value.
Set an angle threshold, such as 5 degrees. The point whose neighborhood angle value is greater than this threshold is put into the geometric feature area G. In this way, the point cloud is divided into two parts, the geometric feature area G and other areas.
The geometric feature area G and other areas are uniformly sampled, and the sampling numbers are S * (1-U) and S * U respectively.
Features of this sampling method:
-
The area with more obvious geometric features has more sampling
points High computational efficiency -
The local distribution of sampling points is uniform
-
High stability: through the division of geometric feature areas, the sampling results are more resistant to noise
References
- Itai Lang, Asaf Manor, Shai Avidan.SampleNet: Differentiable Point
Cloud Sampling - Charles R. Qi, Li Yi, Hao Su, Leonidas J. Guibas.PointNet++: Deep
Hierarchical Feature Learning on Point Sets in a Metric Space