I have a "Dataset of Leap Motion and Microsoft Kinect hand acquisitions" dataset. It contains acquisitions:
- depth.png: Kinect depth map (640 x 480).
- depth.bin: Kinect depth map raw (640 x 480 short 16 bit. 0 means no valid value).
- rgb.png: Kinect color map (1280 x 960).
- leap_motion.cvs: Leap motion parameters.
Color images (rgb.png) are the images of a person showing some hand gestures.
What I want is to extract only hand regions of those images and save them as a separate image. But the problem is hand regions are not in the same exact location. One way might be using a depth.bin file as it is made up of pixels that contain the distance (in millimeters) from the camera plane to the nearest object. The hand regions are closer to camera than the body itself, so it is kind of possible to extract hand regions. But I don't know well about these processes.
How can I use the information from .bin file and extract hand region of an RGB image and save the extracted image separately (hopefully in OpenCV Python environment)?
I will explain in detail if some parts of the question is not clear enough!
Images look like this:
And the dataset link is here.
Edit: I have read the .bin file in MATLAB and its size is 614400x1. Shouldn't it be 307200x1 because 640*480 = 307200. Why is it 2 times bigger? Am I missing something tricky?