Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

Compressed camera images from rosbag to matlab

$
0
0
I have a bag file containing lots of sensor messages, including compressed camera images. I would like to use this stream of camera images in MATLAB. I know of two possible approaches: either by exporting all images to JPG and load those into MATLAB, or by using [ROSMATLAB](http://www.mathworks.nl/hardware-support/robot-operating-system.html). I think that the first approach would involve creating a Python script to collect the camera images form the `image_transport` node `republish`. This seems to involve an awful lot of decompressing and compressing (when saving back to JPG), so I'm looking for a way to directly collect the images from the bag file and save those. I believe that the compressed images in the bag file are JPG compressed, so it should be possible to directly map them. The second approach would also involve the `republish` node, I think, since ROSMATLAB does not yet seem to support image transport. Also, I've run into problems collecting the images on the subscriber. I've seen [this](https://groups.google.com/d/msg/ros-sig-matlab/y8xaZ_OWNlM/Vj2CKvc7O0QJ) great tutorial on creating an image publisher, but I found it hard to reverse it. I've also seen [this](http://answers.ros.org/question/164831/depth-image-stream-from-kinect-in-matlab-with-ros-io-package/) question on ROS answers, which does a good job showing some of the basics, but I couldn't replicate it. Long story short: can anyone provide a best practice to manage images from a rosbag in MATLAB?

Viewing all articles
Browse latest Browse all 475

Trending Articles