Reputation: 23
I have a point cloud data(x,y,z), I want to voxelize this point cloud and get all the voxels. PCL voxelgrid implementation voxelizes the point cloud and return the centroid of each voxel. Exact implementation of voxel grid is in the url 'http://docs.pointclouds.org/1.8.1/voxel__grid_8hpp_source.html#l00214'. Any other references for voxelizing the point cloud is also appreciable.
Upvotes: 0
Views: 2980
Reputation: 1821
You can use OctreePointCloudPointVector
for that exact use-case.
Each leaf is a OctreeContainerPointIndices
, where you can get all points inside that leaf with getPointIndicesVector
.
Have a look at test_octree.cpp
how to use Octree
classes in PCL.
Upvotes: 3