Ask Your Question
0

Extract 60 fps image from bag file [closed]

asked 2015-07-06 14:15:59 -0500

rosfuncoolstuff gravatar image

updated 2015-07-06 14:17:10 -0500

I have a bag file with a 60 fps camera image stream. I want to extract all the image frames. However, even if I specified _sec_per_frame to a very small value, I still got very low fps image files: there should be ~20k images for my 5min bag file, but now I only get ~2k images.

Here's the launch file I used:

<launch>
  <node pkg="rosbag" type="play" name="rosbag" args="-d 2 /home/hangchu/MITLL/testTrackLoop_ii_2015-06-26-14-43-04.bag"/>
  <node name="extract" pkg="image_view" type="extract_images" respawn="false" cwd="node">
    <remap from="image" to="/camera/image_raw"/>
    <param name="filename_format" value="/home/hangchu/MITLL/images/frame%06i.jpg"/>
    <param name="_sec_per_frame" value="0.001"/>
  </node>
</launch>
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by allenh1
close date 2015-07-07 19:40:46.559749

1 Answer

Sort by » oldest newest most voted
2

answered 2015-07-06 16:01:11 -0500

Procópio gravatar image

Maybe the problem is in your bag?

please, post the result of the command rosbag info /home/hangchu/MITLL/testTrackLoop_ii_2015-06-26-14-43-04.bag here, it will show how many image messages you have, than you can compare with the result of the extraction.

edit flag offensive delete link more

Comments

1

Thanks buddy! rosbag info shows 20321 image messages, but image_view image extract gave me ~2k images. I solved it with a "--rate 0.05" option when play the bag file.

rosfuncoolstuff gravatar imagerosfuncoolstuff ( 2015-07-07 10:02:21 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-06 14:15:59 -0500

Seen: 618 times

Last updated: Jul 06 '15