Reputation: 59
I have a kinect (v2) that captures the depth image. In the depth image, I have some objects on a table; I want to have the distance from the kinect sensors to the objects on the table.
How can I calculate the distance in (m or cm) of the objects on the table to the kinect sensors?
I don't know if I can do some image processing using the intensity value of the pixels of the image to do so. Any help is appreciated.
Upvotes: 0
Views: 1307
Reputation: 441
Depth images from Kinect v2 can be 8-bit (0-255) or 16-bit (0-65535) PNG images with the depth data in millimetres up to 4500 or 8000 mm, depending on how the data has been saved. (The “Depth Basics” example provided in the Kinect SDK saves the images in a 8-bit PNG format).
Since the 8-bit depth images can only store values upto 0-255, to convert it into grayscale, the values are scaled to 256 parts. So each grayscale pixel value represents 8000/255 = 31.25 mm of depth.
Upvotes: 1