Rosanswers logo

Hi there,

I've install the electric version, and after made a program with vision-opencv, cv-bridge and opencv2 based on a example program from vision_opencv/cv_bridge after that i discover that opencv2 is deprecated, so i want to make the change to keep the program working.

The problem is that i dind't understand the instructions on here.

I've put on the CMakeLists.txt this:

find_package(OpenCV REQUIRED)

rosbuild_add_executable(kinect_show src/kinect_show.cpp)
#define some target ...
target_link_libraries(kinect_show ${OpenCV_LIBS})

and at my cpp file i still have:

#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

i did noting in the vision_opencv package. I also see that on /usr/include/opencv-2.3.1/opencv i have the following files:

cvaux.h    cv.h    cvwimage.h  cxcore.hpp   cxmisc.h   ml.h
cvaux.hpp  cv.hpp  cxcore.h    cxeigen.hpp  highgui.h

It doesn't seem ok. for instance the file imgprog.hpp is missing...

what do i do to make ros use the system dependency opencv?


Originally posted by jcc on ROS Answers with karma: 200 on 2012-03-19

Post score: 1

Original comments

Comment by Patrick Mihelich on 2012-03-19:
imgproc.hpp is installed under /usr/include/opencv-2.3.1/opencv2/imgproc/. What is your question? Is your build failing? If so, copy-paste the error messages into your question.

Comment by jcc on 2012-03-19:
no the build is not falling, but it didn't fail when using the ROS opencv2. I only want to check if i'm using the system dependecy of opencv and not the ROS Package opencv2. I'm woried that in a future upgrade the program stops working because it still was suported by the ROS package.

Comment by jcc on 2012-03-19:
oh and also. i didn't do the step 2 of the guide. I don't understand what i have to do there.


1 Answer 1


Rosanswers logo

Have a look at the opencv2 package in ROS electric. There is nothing but a manifest that refers to the system installation of opencv2. So ROS will always use the system installation of opencv2, either by using the manifest in the opencv2 package (deprecated) or using the find_package(OpenCV....) call in your CMakeLists.txt (recommended).

Originally posted by Stephan with karma: 1924 on 2012-03-27

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.