在ubuntu 下使用cmake 编译opencv +contrib+cuda+cudnn
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib-4.5.1/modules -D BUILD_OPENCV_PYTHON2=OFF -D BUILD_opencv_python3=ON -D PYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 -D PYTHON_INCLUDE_DIR=/usr/include/python3.8 -D PYTHON_LIBRARY=/usr/lib/x86_64-index-gnu/python3.8 -D WITH_TBB=ON -D WITH_CUDA=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=6.1 -D OPENCV_PC_FILE_NAME=opencv.pc ..