microsoft / Azure-Kinect-Sensor-SDK

A cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.
https://Azure.com/Kinect
MIT License
1.49k stars 619 forks source link

Get visual depth maps! #1693

Open Havehandssook opened 2 years ago

Havehandssook commented 2 years ago

When I use k4aViewer, I find that the depth map is in color . QQ截图20211023151858 I wonder if there is an API that can get color depth maps directly

depthimage = k4a_capture_get_depth_image(sensor_capture); Mat depthImage = Mat(k4a_image_get_height_pixels(depthimage), k4a_image_get_width_pixels(depthimage), CV_16U, k4a_image_get_buffer(depthimage));

The above operation only results in a gray depth map.

Maybe I can color each pixel at different distances,But I think it's slow.

qm13 commented 2 years ago

Use the k4aviewer source code as a reference.

Havehandssook commented 2 years ago

Use the k4aviewer source code as a reference.

However, I did not find the code for color depth maps in Azure- Kinect-sensor-sdk \examples,If so, could you please give me a link? Thank you!