Ask Your Question

How can I work with Depth Data, offline?

asked 2016-09-19 04:20:44 -0600

I have some depth data & RGB video have been captured by kinect camera & I've saved them in a folder. How can I extract depth from them.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-09-19 04:35:10 -0600

kbarni gravatar image

updated 2016-09-19 07:37:32 -0600

It depends on the format you were using. You can read video (AVI) files using theVideoCapture class , or a series of images with the imread function.

The problem with the Kinect sensor is that depth data ranges from 800 to 4000 (millimeters), which is outside the 8 bit (0-255) range. So the AVI file cannot store the real depth data, so only some image formats (TIFF and PNG) can be used to store these values (note: you have to use CV_LOAD_IMAGE_ANYDEPTH in the imread function). So I suggest to store the captured data as a series of images: the color as JPG (PNG or TIFF), the depth as 16 bit TIFF: color1.jpg,color2.jpg,...,depth1.tif,depth2.tif,...

Here is the code to read them

Mat depth,color;
int count=10; //number of depth images
char s[20];
for(int i=0;i<count;i++)
    //process the images...
edit flag offensive delete link more


Thanks a lot. I could fine the PNG files related to my database.

lp930297533 gravatar imagelp930297533 ( 2016-09-21 01:18:34 -0600 )edit

Question Tools

1 follower


Asked: 2016-09-19 04:20:44 -0600

Seen: 158 times

Last updated: Sep 19 '16