Open SirLynix opened 3 years ago
@SirLynix there is a color to depth transformation function k4a_transformation_color_image_to_depth_camera
. This is an expensive function (as were its v1 and v2 predecessors) as it first must cast a ray from depth to color and then transform pixels back to depth,
Thanks, but as far as I understood it doesn't generate the same thing. Kinect v1 and Kinect v2 generate a color to depth mapping texture (containing coordinates). If I understood correctly this function directly maps the image.
@qm13 I am trying to write a python equivalent of this API call and am having difficulty finding the source code for the k4a_transformation_color_image_to_depth_camera function, do you have a link? Thanks.
@JamesMcCullochDickens this is a request (enhancement) to add this function to the Sensor SDK. The function does not exist today.
@qm I guess I'm not sure what you mean, the function k4a_transformation_color_image_to_depth_camera doesn't exist? It's part of the docs. I just mean if I could see the c++ source code and then I can study it and write a python equivalent, not a wrapper, but with numpy etc. Thanks for the help.
Hi, obs-kinect dev here.
When I made the plugin with KinectV1 (Kinect for 360) and KinectV2 (Kinect for Xbox One) I could generate color, depth and infrared images and a color to depth image (an image containing X and Y coordinates to the depth image for every coordinate).
This was generated using
INuiCoordinateMapper::MapColorFrameToDepthFrame
for KinectV1 and ICoordinateMapper::MapColorFrameToDepthSpace for KinectV2.With Azure Kinect, I searched for a similar function but only found functions to convert image from one camera to another (I'm using
k4a_transformation_depth_image_to_color_camera
).The "problem" here is that I had to handle this in a different way than I do with KinectV1 and KinectV2, which forces me to set a special case for the Azure Kinect and gives me a bit of trouble (for example, I currently cannot show a body-filtered greenscreen of someone using the color stream and having another source showing a greenscreen of that person using the depth stream, because I would map the body image to the color space with the first source).
All this to ask, is there a way to efficiently generate a color to depth mapping image (containing for every color pixel both XY coordinates to the depth map) using k4a API? Thanks.