etiennedub / pyk4a

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

Who knows about [depth_image_to_color_camera_custom]? #184

Closed dicaleon closed 1 year ago

dicaleon commented 1 year ago

Hello! I want to use [depth_image_to_color_camera_custom] function. However when I use it, some errors are shown as below.

[2022-12-07 20:15:56.437] [error] [t=13428] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\transformation\rgbz.c (113): transformation_compare_image_descriptors(). Unexpected image descriptor. Descriptor 1: width_pixels: 1280, height_pixels: 720, stride_bytes: 2560, format: 7. Descriptor 2: width_pixels: 640, height_pixels: 576, stride_bytes: 1280, format: 7. [2022-12-07 20:15:56.437] [error] [t=13428] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\transformation\rgbz.c (755): transformation_depth_image_to_color_camera_validate_parameters(). Unexpected custom image descriptor, see details above. [2022-12-07 20:15:56.438] [error] [t=13428] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\transformation\transformation.c (710): transformation_depth_image_to_color_camera_validate_parameters( &transformation_context->calibration, &transformation_context->depth_camera_xy_tables, depth_image_data, depth_image_descriptor, custom_image_data, custom_image_descriptor, transformed_depth_image_data, transformed_depth_image_descriptor, transformed_custom_image_data, transformed_custom_image_descriptor) returned failure in transformation_depth_image_to_color_camera_custom() [2022-12-07 20:15:56.439] [error] [t=13428] D:\a\1\s\extern\Azure-Kinect-Sensor-SDK\src\sdk\k4a.c (1235): transformation_depth_image_to_color_camera_custom(transformation_handle, depth_image_buffer, &depth_image_descriptor, custom_image_buffer, &custom_image_descriptor, transformed_depth_image_buffer, &transformed_depth_image_descriptor, transformed_custom_image_buffer, &transformed_custom_image_descriptor, interpolation_type, invalid_custom_value) returned failure in k4a_transformation_depth_image_to_color_camera_custom()

My source code is like this. capture = k4a.get_capture() new_depth = depth_image_to_color_camera_custom(capture.depth, capture.color, capture._calibration, capture.thread_safe, True)

It looks like second parameter "custom" set as capture.color is wrong. Do anyone know how to set this parameter?

Thank you very much!

lpasselin commented 1 year ago

Hey can you share some code?