PointCloudSimplification provides various point cloud simplification algorithms.
More...
#include <easy3d/algo/point_cloud_simplification.h>
PointCloudSimplification provides various point cloud simplification algorithms.
◆ average_space()
float average_space |
( |
PointCloud * |
cloud, |
|
|
KdTreeSearch * |
kdtree = nullptr , |
|
|
int |
k = 6 , |
|
|
bool |
accurate = false , |
|
|
int |
samples = 10000 |
|
) |
| |
|
static |
Query the average spacing of a point cloud.
- Parameters
-
cloud | The point cloud. |
k | The number of nearest points used. |
accurate | True to use every point to get an accurate calculation; false to obtain aa approximate measure, which uses only a subset (i.e., less than samples) of the points. |
samples | Use less than this number of points for the calculation. |
kdtree | A kdtree defined on this point cloud. If null, a new kdtree will be built and used. |
- Returns
- The average space of the point cloud.
◆ grid_simplification()
Simplification of a point cloud using a regular grid covering the bounding box of the points. Simplification is done by keeping a representative point (chosen arbitrarily) for each cell of the grid. This is non-uniform simplification since the representative point is chosen arbitrarily.
- Parameters
-
cloud | The point cloud. |
cell_size | The size of the cells of the grid. |
- Returns
- The indices of points to be deleted.
◆ uniform_simplification() [1/2]
Uniformly downsample a point cloud based on a distance criterion. This function can also be used for removing duplicate points of a point cloud.
- Parameters
-
cloud | The point cloud. |
epsilon | The minimum allowed distance between points. Two points with a distance smaller than this value are considered identical. After simplification, the distance of any point pair is larger than this value. |
kdtree | A kdtree defined on this point cloud. If null, a new kdtree will be built and used. |
- Returns
- The indices of points to be deleted.
◆ uniform_simplification() [2/2]
Uniformly downsample a point cloud given the expected point number.
- Parameters
-
cloud | The point cloud. |
num | The expected point number, which must be less than or equal to the original point number. |
- Returns
- The indices of points to be deleted.
The documentation for this class was generated from the following files:
- /Users/lnan/Documents/Projects/Easy3D/easy3d/algo/point_cloud_simplification.h
- /Users/lnan/Documents/Projects/Easy3D/easy3d/algo/point_cloud_simplification.cpp