etiennedub / pyk4a

Python 3 wrapper for Azure-Kinect-Sensor-SDK
MIT License
289 stars 81 forks source link

How can I use transformed_depth or transformed_depth_point_cloud without interpolation #155

Closed QiuJunning closed 2 years ago

QiuJunning commented 2 years ago

I find that when I use transformed_depth or transformed_depth_point_cloud , the depth map or point cloud will be interpolated. I want to know how to get the transformed depth map or transformed point cloud without interpolation.

shagren commented 2 years ago

https://github.com/etiennedub/pyk4a/blob/905d77bfecc0ec425a6335dcddbd63cb09314334/pyk4a/transformation.py#L19

Try to use this with interp_nearest = False

shagren commented 2 years ago

Oh no, it will works only form IR images :(

lpasselin commented 2 years ago

I think the only place where we can use interpolation type in the SDK is only a choice between nearest and linear interpolation: k4a_transformation_depth_image_to_color_camera_custom. Unfortunately we don't have a "no_interpolation" available with the kinect azure sdk.

https://github.com/etiennedub/pyk4a/blob/8a2fb92f73067b97c35d82b337bc0d0920ffb5b7/pyk4a/pyk4a.cpp#L691

You would need to ask the sdk devs to add this option.