0
$\begingroup$

Rosanswers logo

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.


Originally posted by Stephane.M on ROS Answers with karma: 1304 on 2013-06-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by DamienJadeDuff with karma: 399 on 2013-06-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by DamienJadeDuff on 2013-06-27:
To make that program work you may need to add cvReleaseVideoWriter(&writer); after all frames are written.

Comment by Stephane.M on 2013-06-27:
Ok thanks a lot, I'll have a look at it !

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.