[ros-users] how to convert opencv numpy images to ros images in python

Sebastian Haug sebhaug at gmail.com
Thu Aug 18 13:06:42 UTC 2011


Hi,

I am using opencv in ros electric with python using the new cv2
(import cv2) interface. I could not figure out how to convert images
in python (they are numpy arrays) to ros images (sensor_msgs/Image).
The ros package "cv_bridge" only supports IplImage to
sensor_msgs/Image conversion in python [1]. Is there already a
solution around? Am I looking in the wrong place?

Thanks!
-Sebastian

[1] http://www.ros.org/wiki/cv_bridge/Tutorials/ConvertingBetweenROSImagesAndOpenCVImagesPython



More information about the ros-users mailing list