Installing OpenCV from source and install pre-reqs..
- Download and install CUDA 10.1 from: hhttps://developer.nvidia.com/cuda-toolkit-archive
- Edit '/etc/environment' and add an entry for '/usr/local/cuda/bin'
- Logout or Reboot
- To verify nvcc is functional and checl version, run 'nvcc --version'
- Download and install from: https://developer.nvidia.com/rdp/cudnn-download
- Install CUDNN Runtime from DEB
- install CUDNN Developer Library from DEB
- Install CUDNN Docs from DEB
- Download from https://developer.nvidia.com/nvidia-video-codec-sdk#Download
- Copy all files from 'include' folder to to '/usr/local/cuda/include'
sudo cp include/*.h /usr/local/cuda/include
** For OpenCV 3.4.6, rename or copy nvcuvid.h to dynlink_nvcuvid.h
sudo cp include/nvcuvid.h /usr/local/cuda/include/dynlink_nvcuvid.h
- Edit script of your choice and change cvVersion to match install.
- Run the script to install all pre-reqs and build and install OpenCV
** NOTE for OpenCV4 you would need to create symlink to OpenCV2 path
- sudo ln -s /usr/local/include/opencv4/opencv2 /usr/local/include/opencv2
- Also, any projects linked with opencv pkconfig library would need to use opencv4 instead