Build and install OpenCV from source with CUDA and cuDNN support

Опубликовано: 14 Март 2026
на канале: s1n7ax
14,098
166

-------- IMPORTANT --------
Please add OPENCV_GENERATE_PKGCONFIG=1 flag when configuring to create the opencv.pc so other applications can find opencv.

If "nvcc not found" then create following soft links to local bin.
sudo ln -s /usr/local/cuda-11.3/bin/* /usr/local/bin
sudo ln -s /usr/local/cuda-11.3/nvvm/bin/* /usr/local/bin
-------- END --------

-------- IMPORTANT --------
cuDNN installation has changed since this video. Please refer the instruction in the documentation
https://docs.nvidia.com/deeplearning/...
-------- END --------

CUDA instillation guide:
https://docs.nvidia.com/cuda/cuda-ins...

cuDNN installation guide:
https://docs.nvidia.com/deeplearning/...

OpenCV repositories:
https://github.com/opencv/opencv
https://github.com/opencv/opencv_contrib

CUDA wiki page:
https://en.wikipedia.org/wiki/CUDA

Follow me on:
Email: [email protected]
GitHub: https://github.com/s1n7ax
LinkedIn:   / srinesh-nisala  
Facebook:   / s1n7ax  
Instagram:   / s1n7ax