NVIDIAGameWorks / kaolin

A PyTorch Library for Accelerating 3D Deep Learning Research
Apache License 2.0
4.32k stars 536 forks source link

How to calculate spc dual point coordinates. #789

Open ankarako opened 3 months ago

ankarako commented 3 months ago

Hi there, and thanks so much for keeping this project alive with new features.

I am currently using structured point clouds, and I would like to know if there is a way to calculate the vertex coordinates of a voxel in spc (propably through the dual pyramid and point hierarchy). Until now I haven't found an out-of-the-box way of doing that with kaolin functions and objects. I thought of calculating them and maybe keeping them as features for an spc, but is there a way to know the center and the extend of the grid?

Thanks for your time.

Caenorst commented 3 months ago

Hi @ankarako , if I understand well, you could use https://kaolin.readthedocs.io/en/latest/modules/kaolin.ops.spc.html#kaolin.ops.spc.points_to_corners on the truncated point_hierarchy (use pyramids to get the bounds)

ankarako commented 3 months ago

Thanks @Caenorst,

Indeed, I came to that, but can I de-quantize the resulting points?