[Documentation] [TitleIndex] [WordIndex

  Show EOL distros: 

EOL distros:  

opencv2 ROS package deprecated (ROS Electric). It is now a third party package.

Overview

For documentation on OpenCV, please see the Official OpenCV documentation. For additional libraries to help you use OpenCV with ROS, please see the cv_bridge package and vision_opencv stack.

CMakeLists.txt

For convenience, the system install includes CMake config files for easily finding and configuring OpenCV in your CMakeLists.txt using the normal find_package() macro:

find_package(OpenCV REQUIRED)
#define some target ...
target_link_libraries(my_target ${OpenCV_LIBS})

Package/stack dependencies

OpenCV only dependency

You just need the following:

  1. manifest.xml

      <rosdep name="opencv2"/>

vision-opencv dependency

The OpenCV rosdep is defined in the vision_opencv stack. You may depend on OpenCV by adding the following:

  1. manifest.xml

      <depend package="cv_bridge" />
    
      <rosdep name="opencv2"/>
  2. stack.xml

      <depend stack="vision_opencv" />

Getting OpenCV

If you have updated your package and stack files following the directions above, you can simply type:

rosdep install <your-package>

and rosdep will automatically bring in the appropriate OpenCV for your system.

Manual apt-get install

If you need to install OpenCV manually on Ubuntu, please follow the instructions below.

  • sudo apt-get update
    sudo apt-get install ros-fuerte-opencv2

Report a Bug

If your issue is related to the OpenCV packaged in ROS (it is too old, you would like to see a backport in there ...), please file a bug using the link at vision_opencv.

For issues specific to OpenCV:

Relationship to standalone library


2025-04-12 15:01