Ask Your Question
0

Extraction of Kinect RGB and Depth Data from bag has a non-constant framerate

asked 2013-06-11 21:39:05 -0500

updated 2016-10-24 08:35:05 -0500

ngrennan gravatar image

Hi everybody,

I am recording using rosbag record data from kinect inside bag files. Then I replay them, in order to extract RGB images, as shown in this tutorial : Exporting images.

I modified the extractor in order to have the synchronized extractions of multiple topics (here two kinects RGB). However I saw a problem :

When I replay the bag, sometimes the rosbag slows down : the count of duration that rosbag shows in the terminal freeze, and in the extraction, I don't have the same framerate (namely, it skips a lot of frames, and only take one on few).

Is there another way of extraction images from bag than "extract_images" from the package "image_view", for images of type sensors_msgs::Image ?

[EDIT] : maybe by using the rosbag API, and making queries inside the bag, in order to avoid missing images ?

Thank you in advance,

Bests,

Stéphane

Ps : I am using Ubuntu 12.10, with ROS Groovy.

Ps 2 : if someone feel the necessity to see the code, I will edit my question to include it.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2013-06-24 03:11:38 -0500

DamienJadeDuff gravatar image

This may be one starting point: http://answers.ros.org/question/10489/recording-video-from-the-pr2/ - a very small program to extract a video from a bag using the rosbag API and OpenCV.

edit flag offensive delete link more

Comments

To make that program work you may need to add cvReleaseVideoWriter(&writer); after all frames are written.

DamienJadeDuff gravatar image DamienJadeDuff  ( 2013-06-27 02:59:04 -0500 )edit

Ok thanks a lot, I'll have a look at it !

Stephane.M gravatar image Stephane.M  ( 2013-06-27 05:36:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-06-11 21:39:05 -0500

Seen: 836 times

Last updated: Jun 24 '13