Returns the indices in the resulting downsampled cloud of the points at the specified grid coordinates, relative to the grid coordinates of the specified point (or -1 if the cell was empty/out of bounds). More...

Returns the indices in the resulting downsampled cloud of the points at the specified grid coordinates, relative to the grid coordinates of the specified point (or -1 if the cell was empty/out of bounds). More...

Detailed Description

template<>
class pcl::VoxelGrid< pcl::PCLPointCloud2 >

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.

Returns the index in the resulting downsampled cloud of the specified point.

Note

for efficiency, user must make sure that the saving of the leaf layout is enabled and filtering performed, and that the point is inside the grid, to avoid invalid access (or use getGridCoordinates+getCentroidIndexAt)

Returns the indices in the resulting downsampled cloud of the points at the specified grid coordinates, relative to the grid coordinates of the specified point (or -1 if the cell was empty/out of bounds).

Parameters

[in]

x

the X coordinate of the reference point (corresponding cell is allowed to be empty/out of bounds)

[in]

y

the Y coordinate of the reference point (corresponding cell is allowed to be empty/out of bounds)

[in]

z

the Z coordinate of the reference point (corresponding cell is allowed to be empty/out of bounds)

[out]

relative_coordinates

matrix with the columns being the coordinates of the requested cells, relative to the reference point's cell

Note

for efficiency, user must make sure that the saving of the leaf layout is enabled and filtering performed

Returns the indices in the resulting downsampled cloud of the points at the specified grid coordinates, relative to the grid coordinates of the specified point (or -1 if the cell was empty/out of bounds).

Parameters

[in]

x

the X coordinate of the reference point (corresponding cell is allowed to be empty/out of bounds)

[in]

y

the Y coordinate of the reference point (corresponding cell is allowed to be empty/out of bounds)

[in]

z

the Z coordinate of the reference point (corresponding cell is allowed to be empty/out of bounds)

[out]

relative_coordinates

vector with the elements being the coordinates of the requested cells, relative to the reference point's cell

Note

for efficiency, user must make sure that the saving of the leaf layout is enabled and filtering performed