0
$\begingroup$

Rosanswers logo

Hi,

I'm trying to use opencv library in ROS Groovy but I doesn't find how exactly it's working. A lot of time I have some errors like this: undefined reference to cv::cvtColor

On the wiki, the package opencv2 is deprecated because you doesn't want to link opencv whit ROS, but the library was include in ROS directory, why?

I'm searching how, with the proper method, to create CMakelist.txt (with catkin), Package.xml and include lib in .cpp.

If you have some example, It's appreciate.

Thanks in advance for help


Originally posted by keavenM on ROS Answers with karma: 13 on 2012-12-21

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

OpenCV is no longer treated specially inside of ROS and is simply a standalone library. You should be able to link your executable against it by adding something like the following to your CMakeLists.txt:

find_package(OpenCV REQUIRED)
target_link_libraries(my_application_target ${OpenCV_LIBS})

There's some more migration information on the Fuerte opencv2 wiki page.


Originally posted by Eric Perko with karma: 8406 on 2012-12-21

This answer was ACCEPTED on the original site

Post score: 4

$\endgroup$

Your Answer

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