Ask Your Question
0

Issue to export images from rosbag file

asked 2017-10-29 10:51:38 -0600

ROSkinect gravatar image

I'm recording images from /camera/image_raw to rosbag file but when I want to extract them I get gray images with little squares like a grid on them:

image description

I tried command line and launch file to record:

rosbag record -O subset /camera/image_raw

and launch file to extract the images but I get the same thing:

<launch>
  <node pkg="rosbag" type="play" name="rosbag" args="-d 2 $(find ownpackagereco)/bags/subset.bag"/>
  <node name="extract" pkg="image_view" type="extract_images" respawn="false" output="screen" cwd="ROS_HOME">
    <remap from="image" to="/camera/image_raw"/>
  </node>
</launch>

I can visualize the images from the topic while they're publishing and I can see the RGB image correctly

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-30 06:19:09 -0600

john.j.oneill gravatar image

Have you tried image_saver? It includes an encoding parameter that could allow you to explicitly set it as RGB or BGR.

edit flag offensive delete link more

Comments

image_saver works but I want to save all my topics in a bag file, it is more easy and practical

ROSkinect gravatar imageROSkinect ( 2017-10-30 09:04:22 -0600 )edit

Couldn't image_saver work on a playing bag file? I guess I don't understand the difference between image_saver and extract_images, they seem almost interchangeable to me.

john.j.oneill gravatar imagejohn.j.oneill ( 2017-10-30 09:14:53 -0600 )edit

Oh okay I understand, I changed extract_images with image_saver in my launch file. Now it works!

ROSkinect gravatar imageROSkinect ( 2017-10-30 09:21:15 -0600 )edit

I'm glad it works!

john.j.oneill gravatar imagejohn.j.oneill ( 2017-10-30 09:47:32 -0600 )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

2 followers

Stats

Asked: 2017-10-29 10:51:38 -0600

Seen: 763 times

Last updated: Oct 30 '17