-1

I would like to turn a 3D point cloud into a simple 2D occupancy grid. In my current implementation I first apply the voxel grid to a point cloud and then I manually iterate through all points in the voxelized cloud to fill in my grid. Is there a way to make it so that while I am voxelizing the grid, I am generating my 2D occupancy grid?

Chris Chan
  • 51
  • 1
  • 2

1 Answers1

0

You could probably create a new class, derive from pcl::VoxelGrid (see here), and implement your custom applyFilter which would shadow the one in the base class. This would allow you to use the same utility functions and code, and introduce your new behavior.

Dexter
  • 2,482
  • 27
  • 40
  • 1
    Hi Dexter, thank you for your kind reply. Do you know of any existing example code snippets that do something similar? I am somewhat new to all of this. – Chris Chan Jun 19 '18 at 02:18
  • The [VoxelGridCovariance](http://docs.pointclouds.org/1.7.1/voxel__grid__covariance_8h_source.html) class seems to do something similar. – Dexter Jun 19 '18 at 14:55
  • 1
    Thank you kind sir. – Chris Chan Jun 20 '18 at 04:05