The ROS interface with OpenCV

OpenCV is also integrated into ROS, mainly for image processing. The vision_opencv ROS stack includes the complete OpenCV library and the interface with ROS.

The vision_opencv meta package consists of individual packages:

  • cv_bridge: This contains the CvBridge class. This class converts ROS image messages to the OpenCV image data type and vice versa.
  • image_geometry: This contains a collection of methods to handle image and pixel geometry.

The following diagram shows how OpenCV is interfaced with ROS:

OpenCV-ROS interfacing

The image data types of OpenCV are IplImage and Mat. If we want to work with OpenCV in ...

Get Learning Robotics using Python - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.