-1

I am a newbie in 3D computer vision, currently solving the following problem in Python:

I have a voxel grid in 3D and a random point in 3D. I want to find which voxel this point falls into. Is there some simple way how to do this?

More advanced question is - is there some way to interpolate between voxels? Meaning if a point is near the boundary between two voxels, can I get the corresponding voxels and some weights?

Thanks!

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
Vojtooo
  • 103
  • 2
  • 6

1 Answers1

0

Floor every dimension of the point and multiply by voxel size for the exact voxel you're looking for

devi
  • 43
  • 6
  • But this works only if the voxel grid is aligned with world axes right? What about when the voxel grid is aligned differently and possibly shifted away from the origin? – Vojtooo Sep 16 '22 at 12:52
  • If the grid has offset, add it to the point position and do the same calculation – devi Sep 16 '22 at 12:53