Skip to main content

UniformSampling

https://pointclouds.org/documentation/classpcl_1_1_uniform_sampling.html

UniformSampling assembles a local 3D grid over a given PointCloud, and downsamples + filters the data.

The UniformSampling 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 the closest point to the center of the voxel.

Constructor​

new PCL.UniformSampling(pointType, extractRemovedIndices);

Parameters:

NameTypeDefaultDescription
pointTypePointTypePointXYZThe point cloud type.
extractRemovedIndicesbooleanfalseInitializing with true will allow us to extract the removed indices.

Methods​

setRadiusSearch​

setRadiusSearch(radius);

Set the 3D grid leaf size.

Parameters:

NameTypeDefaultDescription
radiusnumberThe 3D grid leaf size.

setInputCloud​

See PassThrough.setInputCloud

getInputCloud​

See PassThrough.getInputCloud

filter​

See PassThrough.filter