VoxelGrid
https://pointclouds.org/documentation/classpcl_1_1_voxel_grid.html
VoxelGrid assembles a local 3D grid over a given PointCloud, and downsamples + filters the data.
The VoxelGrid class creates a 3D voxel grid (think about a voxel grid as a set of tiny 3D boxes in space) over the input point cloud data. Then, in each voxel (i.e., 3D box), all the points present will be approximated (i.e., downsampled) with their centroid. This approach is a bit slower than approximating them with the center of the voxel, but it represents the underlying surface more accurately.
Constructor
new PCL.VoxelGrid(pointType);
Parameters:
Name | Type | Default | Description |
---|---|---|---|
pointType | PointType | PointXYZ | The point cloud type. |
Methods
setLeafSize()
setLeafSize(lx, ly, lz)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
lx | number | the leaf size for X. | |
ly | number | the leaf size for Y. | |
lz | number | the leaf size for Z. |
setDownsampleAllData()
setLeafSize(downsample);
Set to true if all fields need to be downsampled, or false if just XYZ.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
downsample | boolean | The new value (true/false) | |
. |
getDownsampleAllData()
getDownsampleAllData();
Get the state of the internal downsampling parameter (true if all fields need to be downsampled, false if just XYZ).
Returns:
Name | Type |
---|---|
downsample | boolean |
setMinimumPointsNumberPerVoxel()
setMinimumPointsNumberPerVoxel(minPointsPerVoxel);
Set the minimum number of points required for a voxel to be used.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
minPointsPerVoxel | number | The minimum number of points for required for a voxel to be used. |
getMinimumPointsNumberPerVoxel()
getMinimumPointsNumberPerVoxel();
Return the minimum number of points required for a voxel to be used.
Returns:
Name | Type |
---|---|
minPointsPerVoxel | number |