Install the OpenCV 3.1 on Ubuntu 14.04 with CUDA support

Hello, today we’ll install the OpenCV library on the Ubuntu 14.04 operation system. We need the installed CUDA 7.5 (we have done it in the previous post). First, we have to update our Ubuntu system. Open your terminal and execute:

Then we need to install the dependencies: Build tools:


Media I/O:

Video I/O:

Parallelism and linear algebra libraries:




Now we have to download the latest version of library for Linux from the OpenCV official website. Then decompress the downloaded file. In your terminal, make sure you are within the OpenCV directory and run the following commands:

Then we should configure our cmake compiler. For my desktop GPU (GTX 980) which has the Maxwell architecture I used -DCUDA_ARCH_BIN=5.2 -DCUDA_ARCH_PTX=5.2:

For my laptop (820M) which has the Fermi architecture I used -DCUDA_ARCH_BIN=2.0 -DCUDA_ARCH_PTX=2.0:

Then we need compile the source with parameter -j4 (cont of threads, it may be higher for you)

After that, configure OpenCV:

Now, you have installed OpenCV.

Leave a Reply