wsl2 上编译opencv 4.7.0 with cuda

cd opencv-4.7.0 && mkdir build

cd build

cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=ON -D WITH_CUBLAS=ON -D WITH_CUDNN=ON -D WITH_LIBV4L=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON -D OPENCV_DNN_CUDA=ON -D ENABLE_NEON=OFF -D WITH_OPENMP=ON -D WITH_OPENGL=OFF -D WITH_FFMPEG=ON -D WITH_TBB=ON -D BUILD_TBB=ON -D BUILD_TESTS=OFF -D BUILD_opencv_python3=ON -D BUILD_opencv_python2=OFF -D BUILD_opencv_java=OFF -D WITH_GTK=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D OPENCV_ENABLE_NONFREE=ON -DBUILD_OPENJPEG:BOOL=ON -D OPENCV_EXTRA_MODULES_PATH=/mnt/j/opencv_contrib-4.7.0/modules ..

make -j8 && sudo make install