1.ERROR:
CMake Warning at cmake/OpenCVFindLibsPerf.cmake:45 (message):
OpenCV is not able to find/configure CUDA SDK (required by WITH_CUDA).
CUDA support will be disabled in OpenCV build.
To eliminate this warning remove WITH_CUDA=ON CMake configuration option.
2.解决: 手动加绝对路径
CUDA_TOOLKIT_ROOT_DIR :
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0
重启电脑