Ask Your Question

CV GPU Support without losing cvBridge and image_transport

asked 2013-05-06 07:13:05 -0500

szutshi gravatar image

updated 2014-01-28 17:16:26 -0500

ngrennan gravatar image

I am assuming the latest openCV compiled from scratch with GPU support enabled won't give me access to the ROS cv_bridge and image_transport 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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-07 04:16:37 -0500

Wolf gravatar image

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

edit flag offensive delete link more


How are you able to do this? I'm having issues with the ROS version being linked, despite having all of the same thinks in place, find_package, Include Dirs, Libs, etc. here:

DiJuMx gravatar image DiJuMx  ( 2014-01-27 02:59:52 -0500 )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-05-06 07:13:05 -0500

Seen: 1,242 times

Last updated: Jan 07 '14