ibaiGorordo / pyKinectAzure

Python library to run Kinect Azure DK SDK functions
MIT License
454 stars 113 forks source link

color to depth transformation using transformation class #82

Closed JSCG95 closed 1 year ago

JSCG95 commented 2 years ago

Hi.

For my project I'm trying to implement a color to depth transformation. This would be equivalent to use k4a_transformation_depth_image_to_color_camera() with the SDK in C++. I saw in your repository there is a script called transformation.py but I dont know how to implement class transformation and its functions into my script.

I'm not sure if the way to proceed would be to first retrieve both RGB and depth images or to first add the transformation configuration and then retrieve both images.

I try to look for a guide in the example "exampleTransformColorToDepth.py" you provided but I think that one is not using transformation class to do the transformation.

ibaiGorordo commented 1 year ago

It does, the get_transformed_color_object() funtion calls the get_transformed_color_object() function which does that transformation.

https://github.com/ibaiGorordo/pyKinectAzure/blob/04e9e649dcbcc9ddc146696ea71553effbc025c2/pykinect_azure/k4a/capture.py#L57-L58