0
votes

If I want to use my computer's GPU with OpenCV, is it necessary that I build OpenCV from source with CUDA enabled? Or can I install OpenCV with CUDA support via apt-get? I noticed the following 2 packages in apt-get:

  • libopencv-gpu-dev - development files for libopencv-gpu2.4v5
  • libopencv-gpu2.4v5 - computer vision GPU library

But I am not sure if these will work with OpenCV3 or if they are only compatible with OpenCV2. I know that the gpu module in Opencv2 was split up into multiple CUDA modules in OpenCV3.

1
Both will work. If you are not familiar with OpenCV's compilation I suggest you download the two packages you have found on the repository.John_Sharp1318
Do you know if those packages will work with OpenCV3? Or will they only work with OpenCV2?Guilty Spark
These package concerns OpenCV-2.4 if you have the package for OpenCV-3.x they'll work. If you try to link module from 2.4 and other modules from module 3.x it will fail.John_Sharp1318

1 Answers

0
votes

Yes it is necessary that you build opencv from the source with CUDA option enabled. The apt-get packages won't work with OpenCV3 and above versions. I suggest you install the CUDA Toolkit first and then attempt installation of OpenCV or the GPU functions won't work.