In order to compile you need to create a build folder inside your opencv library root folder ( cd opencv mkdir build cd build).
In order for cmake to find CUDA and CuDNN all you need is add /bin to your path. It can also have as many versions as you want installed in parallel:Īs you can see above, even though CUDA-11.2 was installed automatically (it's the current version as of today), CuDNN is only available up until 11.1 so I was forced to install CUDA-11.1 as well in order to have both CUDA and CuDNN installed on the same tree structure. I use PopOS and it gets installed in /usr/lib/cuda. And this directory is typically /usr/local/cuda. CUDA + CuDNN - this one deserves a more detailed explanation bellow.ĬUDA (and CuDNN) are usually installed under the same directory.libfreetype-dev + libharfbuzz-dev - if you want support for truetype fonts.ffmpeg + gstreamer - if you want to load different video encodings:.Why is OpenGL so important, you may ask? Hardware accelerated frame rates. python3-pyqt5.qtopengl - it's enough to bring in the dependencies in order to detect Qt + OpenGL.Having OpenCV installed globally I can reference it on the venv sandboxes when needed. python3 + numpy - I generally install it globally, outside of any venv/virtualenv sandboxes.Enter fullscreen mode Exit fullscreen mode