ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to Save sensor_msgs/Image

asked 2014-10-02 12:00:37 -0500

K. Zeng gravatar image

I've got Gazebo 2.2.3 and ROS Indigo set up, and I have a plugin that allows a stereo camera to publish images from Gazebo to ROS. I've run rosbag with the image topics, and it has no problems recording or playing them. The issue now is that I need to somehow either save the images themselves or have access to the pointers for the camera images. Can someone give me some pointers on how to do so, preferably via C++ code?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-10-04 19:31:50 -0500

tfoote gravatar image

If you use cv_bridge you can then use all of OpenCV which includes operating on and saving images.

edit flag offensive delete link more

Comments

1

imwrite as explained here would do the job, in C++, since ROS supports OpenCV.

kunaltyagi gravatar image kunaltyagi  ( 2014-10-05 16:31:36 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-10-02 12:00:37 -0500

Seen: 2,318 times

Last updated: Oct 04 '14