opencv-4.8.0 + CUDA 12.3 + DNN 8.9.7 完美编译运行
脚本:
sudo apt-get install libeigen3-dev
sudo apt-get install protobuf-compiler
sudo apt-get install libeigen3-dev
sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eigen
cd ${current_path}/deps/opencv-4.8.0
sudo rm -rf build && mkdir build
cd build
sudo cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D OPENCV_ENABLE_NONFRE=ON \
-D BUILD_PROTOBUF=ON \
-D WITH_CUDA=ON \
-D WITH_CUDNN=ON \
-D OPENCV_DNN_CUDA=ON \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=OFF \
-D CMAKE_INSTALL_PREFIX=/usr/local \
..
sudo make -j$(nproc) && sudo make install