Having trouble using CUDA enabled OpenCV with kinetic
Hello everyone.
I started a new install of ROS Kinetic, and I was hoping to use a few CUDA features from OpenCV. I have successfully compiled and tested CUDA and OpenCV (which is installed in /usr/local), but I am having trouble using my OpenCV instead of the ros-kinetic-opencv3
package.
I have tried adding /usr/local to the front of my CMAKE_PREFIX_PATH, as well renaming the opencv pkgconfig file in /opt/ros/lib/pkconfig. However I still get the below error, indicating that I am building against the ROS OpenCv.
OpenCV Error: No CUDA support (The library is compiled without CUDA support) in throw_no_cuda, file /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/core/include/opencv2/core/private.cuda.hpp, line 97
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/core/include/opencv2/core/private.cuda.hpp:97: error: (-216) The library is compiled without CUDA support in function throw_no_cuda
Any ideas?
It looks like its loading the wrong library at runtime; this is usually controlled by the system library search paths (ldconfig) and LD_LIBRARY_PATH
LD_LIBRARY_PATH looks like /usr/local/lib:/home/user/catkin_ws/devel/lib:/opt/ros/kinetic/lib
shouldn't it be pulling from /usr/local/lib where OpenCV is first if that was the case?
if I manually run the CMakeLists.txt file, then the code build and executes correctly. However using catkin_make give different results?
@daniel_dsouza, how did you run it manually? Just CMake .. and make?
I believe so. Do you have a Github link to your code? I can try to compile it myself.
https://github.com/ashnarayan13/stere... this is the code.
Could you please link your entire ros package? Until then, look at this (working) example https://github.com/daniel-dsouza/solid-succotash
@daniel_dsouza I have added the entire projecct on git. I will look into your project as well! Thanks!