Ask Your Question

Problem building package that needs opencv

asked 2013-11-11 10:28:20 -0600

Brad gravatar image

updated 2014-05-12 20:55:56 -0600

130s gravatar image

Hi, I'm getting an error during catkin make that I can't seem to get past.

I made sure to install ros-groovy-opencv2, yet I don't seem to have the opencv2Config.cmake file.

Thanks in advance!

Here is the error:

==> add_subdirectory(img_sender)
CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package): Could not find a configuration file for package opencv2.

Set opencv2_DIR to the directory containing a CMake configuration file for opencv2.  The file will have one of the following names:

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-11-11 15:08:00 -0600

cognitiveRobot gravatar image

Hi Brad,
In CMakeLists.txt of your package, do you have lines as follows?



target_link_libraries(my_awesome_library ${OpenCV_LIBRARIES})

edit flag offensive delete link more


Hi cognitiveRobot, I have a question regarding find_package(OpenCV). Because when I use rospack find OpenCV, it says there is no such package Yet I do found this this folder at /opt/ros/hydro/include/OpeCV with opencv2Config.cmake and opencv2-config.cmake two files and there is indeed no package.xml here So what exactly is OpenCV here if it's not a package?

Egnatius gravatar image Egnatius  ( 2013-12-19 08:02:02 -0600 )edit

OpenCV is a conventional library that is packaged as ROS package opencv2 for convenience of installation.

Leyonce gravatar image Leyonce  ( 2014-03-23 21:39:14 -0600 )edit

answered 2014-01-12 12:55:59 -0600

130s gravatar image

Make sure if you have OpenCV installed in your Groovy, and follow what @cognitiveRobot suggests.

You said in the comment area:

I do found this this folder at /opt/ros/hydro/include/OpeCV with opencv2Config.cmake and opencv2-config.cmake two files

You're looking at Hydro's directory, not Groovy.

edit flag offensive delete link more


You mean OpenCV Installed in your computer under /usr/lib? I think I saw somewhere that starting from Groovy, OpenCV should be used as an external library.

Mehdi. gravatar image Mehdi.  ( 2014-05-12 22:26:01 -0600 )edit

I'm actually investigating it, and just opened a ticket ( to clarify which OpenCV is used per ros distro.

130s gravatar image 130s  ( 2014-05-12 22:49:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-11-11 10:28:20 -0600

Seen: 2,622 times

Last updated: May 12 '14