ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

linking problem with vision_opencv

asked 2017-03-27 14:19:33 -0500

hpurohit gravatar image

updated 2017-03-28 10:41:08 -0500

Hi my question is of two folds. First, I am confused as why there are opencv3 and OpenCV-3.1.0-dev packages is in /opt/ros/indigo/share as i have read that opencv 2.4.8 is the default version of ROS indigo.

Also, I have opencv 2.4.13 version installed on ubuntu 14.04 with ROS Indigo, I want to use opencv for vision part for my project and for that i tried to install vision_opencv package from source. However when I try to build the package using catkin_make following error occurs

-- ==> add_subdirectory(vision_opencv/image_geometry)

CMake Error at /opt/ros/indigo/share/OpenCV-3.1.0-dev/OpenCVModules.cmake:183 (message): The imported target "opencv_xobjdetect" references the file


but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and contained


    but not all the files it references.

Call Stack (most recent call first): /opt/ros/indigo/share/OpenCV-3.1.0-dev/OpenCVConfig.cmake:86 (include) vision_opencv/image_geometry/CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/hemang/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/hemang/catkin_ws/build/CMakeFiles/CMakeError.log". make: * [cmake_check_build_system] Error 1

What I dont understand is why is it trying to link with Opencv3 when system does not have opencv3 installed or ROS indigo comes with opencv3 now ??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-03-28 17:08:44 -0500

hpurohit gravatar image

so I figured it out so in the CMakeLists.txt files of both cv_bridge and image_geometry, find package(OpenCV REQUIRED) should be find package (OpenCV 2.4.13 REQUIRED) . This is in my case as I have OpenCV 2.4.13 installed, one can replace it with any version one is using

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-03-27 14:19:33 -0500

Seen: 538 times

Last updated: Mar 28 '17