Robotics StackExchange | Archived questions

CV GPU Support without losing cvBridge and image_transport

I am assuming the latest openCV compiled from scratch with GPU support enabled won't give me access to the ROS cvbridge and imagetransport that you need to in order to work with the images. How can I get around this? I want to be able to access the images with cv bridge and image transport but install opencv with CUDA. Ideally I would want to download your source and recompile it with the WITH_CUDA flag...unfortunately I am not sure how to go about that.

Please let me know, we have a deadline soon and this would be really useful.

Asked by szutshi on 2013-05-06 07:13:05 UTC

Comments

Answers

I compiled a newer OpenCV Version with the WITH_CUDA flag and installed it to /usr/local

In catkin packages I can now choose by selecting a particular version in find_package:

find_package( OpenCV 2.4.7 REQUIRED )

As the installed version is newer than the builtin ROS version, specifying the version assures that cmake pulls the locally compiled version with CUDA support.

The libs/includes of the specified version are not in ${catkin_INCLUDE_DIRS} and {catkin_LIBRARIES} so I added ${OpenCV_INCLUDE_DIRS} to include_directories and ${OpenCV_LIBS} to target_link_libraries.

I can now use OpenCV Cuda support in the package together with image_transport, cv_brigde

Asked by Wolf on 2014-01-07 05:16:37 UTC

Comments

How are you able to do this? I'm having issues with the ROS 2.4.6.1 version being linked, despite having all of the same thinks in place, find_package, Include Dirs, Libs, etc. here: http://answers.ros.org/question/122801/groovy-opencv-247-with_cuda/

Asked by DiJuMx on 2014-01-27 03:59:52 UTC