Method VoxelGridSampling
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
VoxelGridSampling(OutputArray, InputArray, float, float, float)
Point cloud sampling by Voxel Grid filter downsampling.
Creates a 3D voxel grid (a set of tiny 3D boxes in space) over the input point cloud data. In each voxel, all the points present are approximated (downsampled) with the point closest to their centroid.
public static int VoxelGridSampling(OutputArray sampledPointFlags, InputArray inputPts, float length, float width, float height)
Parameters
sampledPointFlagsOutputArrayOutput flags of the sampled points. sampledPointFlags[i] is 1 if the i-th point is selected, 0 otherwise.
inputPtsInputArrayOriginal point cloud, Mat of size Nx3/3xN.
lengthfloatGrid length.
widthfloatGrid width.
heightfloatGrid height.
Returns
- int
The number of points actually sampled.