ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

ROS Electric Opencv transition

asked 2012-03-19 05:38:02 -0600

jcc gravatar image

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?


edit retag flag offensive close merge delete


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.

Patrick Mihelich gravatar image Patrick Mihelich  ( 2012-03-19 14:12:31 -0600 )edit

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.

jcc gravatar image jcc  ( 2012-03-19 16:38:39 -0600 )edit

oh and also. i didn't do the step 2 of the guide. I don't understand what i have to do there.

jcc gravatar image jcc  ( 2012-03-19 16:40:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-03-27 03:55:18 -0600

Stephan gravatar image

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).

edit flag offensive delete link more

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: 2012-03-19 05:38:02 -0600

Seen: 451 times

Last updated: Mar 27 '12