Voxelgrid where the true position of each voxel is returned
In the voxelgrid tutorial, it is stated that:
...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.
I would like to instead downsample a point cloud and get the true centroid of each voxel, thus maintaining a regular grid. However, I couldn't find an option for this in the documentation. Is this possible in the current PCL version?
In addition, is it possible to get, for each resulting voxel, the number of points that fell into it?