## repository: https://code.ros.org/svn/ros-pkg <> {{{#!wiki red/solid version electric fuerte groovy hydro indigo jade opencv2 ROS package deprecated (ROS Electric). It is now a third party package. }}} = Overview = For documentation on OpenCV, please see the [[http://opencv.org/documentation.html|Official OpenCV documentation]]. For additional libraries to help you use OpenCV with ROS, please see the [[cv_bridge]] package and [[vision_opencv]] stack. {{{#!wiki version diamondback_and_older <> == OpenCV in Diamondback and C Turtle == For ROS Diamondback and C Turtle, OpenCV was provided inside of a ROS package. The `opencv2` package contains OpenCV 2.2 (Diamondback) or OpenCV 2.0 (C Turtle). }}} {{{{#!wiki version electric <> == OpenCV in Electric == Starting in ROS Electric, OpenCV can now be used with ROS as a [[rosdep]] system dependency. The `opencv2` ROS package is still provided for backwards compatibility, but will be removed in future releases. The instructions below will guide you through configuring your ROS packages to use the OpenCV rosdep system dependency. === Migrating from Diamondback === Please transition away from using `` to link against OpenCV in your packages. Standard CMake mechanisms (e.g. `find_package()`) are now the preferred way of linking against OpenCV. === 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_LIBRARIES}) }}} == Package/stack dependencies == === When on Fuerte releasing for Electric === You just need the following: 1. `manifest.xml` {{{ }}} === When on Electric releasing for Electric === The OpenCV rosdep is defined in the [[vision_opencv]] stack. You may depend on OpenCV by adding the following: 1. `manifest.xml` {{{ }}} 1. `stack.xml` {{{ }}} === Getting OpenCV === If you have updated your package and stack files following the directions above, you can simply type: {{{ rosdep install }}} 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. 1. Verify that you have the latest ROS sources added to apt. See the section [[http://www.ros.org/wiki/unstable/Installation/Ubuntu | Setting up sources]] 1. Install libopencv2.3-dev with apt. {{{ sudo apt-get update sudo apt-get install libopencv2.3-dev }}} }}}} {{{{#!wiki version fuerte <> == 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` {{{ }}} === 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` {{{ }}} 1. `stack.xml` {{{ }}} === Getting OpenCV === If you have updated your package and stack files following the directions above, you can simply type: {{{ rosdep install }}} 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: * Send your question to the [[http://answers.opencv.org/|OpenCV Answers]]. * [[http://code.opencv.org/projects/opencv/issues?set_filter=1|Report a bug]]. == Relationship to standalone library == {{{{#!wiki version groovy hydro Ubuntu `.deb` of `OpenCV2` is released into ROS as a [[http://www.ros.org/reps/rep-0136.html|Third Party]] package using source code from its upstream repository, which means it works independently from its standalone version (`libopencv*`). You can check its version number by: {{{ $ rosversion opencv2 }}} }}}} {{{{#!wiki version indigo_and_newer Since [[indigo|Indigo]], `OpenCV` is not released from ROS infrastructure. Its ROS-interface package [[vision_opencv]] depends on standalone `libopencv*` packages. }}}} ## AUTOGENERATED DON'T DELETE ## CategoryPackage ## CategoryPackageROSPKG