griegler/octnet

Get Occupancy of an octree to be used to create a octree of different data

nitesh1813 opened this issue · 2 comments

What method do I use in python to get the occupancy of an octree? I want to use that octree to create an octree of a different dense array to have to same structure as the first. I can see that create_from_dense_2 lets me do that, but I don't see a function to get the occupancy of the first octree.
Thank You

For create_from_dense_2 you need a 3D volume (dense) that indicates the leaf cells of the octree, and a 4D tensor of the features. Given that you already have an octree that defines the structure, you could first convert it to a dense structure (to_cdhw) and threshold it to get the occupancy volume. But this works only, if the octree cell values define some 3D geometry (e.g., TSDF).

Ah okay. Thanks for the input :D