This post has NOT been accepted by the mailing list yet.
I am building an application with PCL that puts points in an Octree, searches that tree for cubes, then gets all the points in a cube.
I started using pcl::octree::OctreePointCloudSearch because it supports boxSearch() to pull out index vectors of points. However, I'd like to implement some basic smoothing by using centroid of each voxel in the tree instead of the current version that limits to one element in a leaf.
I'm currently looking at using
OctreePointCloudSearch<PointNormal, OctreePointCloudVoxelCentroidContainer<PointNormal> >, but while I can use boxSearch(), the OctreePointCloudVoxelCentriodContainer does not actually store indices so it returns an empty vector. This makes sense, because the centroid isn't actually in the cloud.
I'm looking for a solution that has the properties:
- Can be queried and modified
- Can be searched for rectangular or cubic regions, and return indices.
- Doesn't have unnecessary copy steps
- Stores the centroid of the voxel (or other averaging) but does not store the input points.
Does such a structure exist or would it be possible to create on top of the existing tree structures?