How to get depth and rgb images from kinect

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get depth and rgb images from kinect

Rajkumar
How to write a code which saves depth and rgb images from a kinect to hard disk at 1 Hz?
Reply | Threaded
Open this post in threaded view
|

Re: How to get depth and rgb images from kinect

matlabbe
Administrator
Hi,

are you on ROS or in general? Well, you could just use RTAB-Map->Tools->Data recorder and set frame rate at 1 Hz. Then open this database in Database viewer (Tools->Edit Database) and click File->Extract Images...

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: How to get depth and rgb images from kinect

Rajkumar
I am using it in general not ROS. I want to extract RGB and depth images at runtime(Live) but the method you told can used for recorded video. What can i do for extracting images live?
I found an openCV implemention for this, is this correct acoording to rtabmap format wise for both depth and color images?
 
http://stackoverflow.com/questions/26848658/opencv-c-how-to-save-a-16bit-image 

Thanks :)
Reply | Threaded
Open this post in threaded view
|

Re: How to get depth and rgb images from kinect

matlabbe
Administrator
yes it should work, depth images  (CV_16UC1 or CV_32FC1) should be saved in PNG with cv::imwrite(). RGB images can be saved in any image format.