找不到文件cuda_runtime.h
在windows 11系统,opencv4.1.2+opencv_contrib+Qt5.15.2的环境下,添加了cuda的include、bin、lib的环境变量,但是仍然出现以下问题。
In file included from E:\src\opencv_contrib-4.1.2\modules\cudaarithm\src\lut.cpp:7:
E:\src\opencv_contrib-4.1.2\modules\cudaarithm\src\lut.hpp:10:10: fatal error: cuda_runtime.h: No such file or directory
^~~~~~~~~~~~~~~~
compilation terminated.
解决: 找到cuda_runtime.h的绝对路径,把此处的#include <cuda_runtime.h> 改成#include <C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include/cuda_runtime.h>
找不到boostdesc_bgm.i
E:\src\opencv_contrib-4.1.2\modules\xfeatures2d\src\boostdesc.cpp:654:20: fatal error: boostdesc_bgm.i: No such file or directory
^~~~~~~~~~~~~~~~~
compilation terminated.
解决:下载这个文件,解压到这个目录opencv_contrib/modules/xfeatures2d/src/
找不到features2d/test/test_detectors_regression.impl.hpp
E:\src\opencv_contrib-4.1.2\modules\xfeatures2d\test\test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_regression.impl.hpp: No such file or directory
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[2]: *** [modules\
解决:将opencv / modules / features2d复制,然后粘贴到build目录中来解决该问题。
找不到namespace cv::cuda::device::blend;
E:\src\opencv-4.1.2\modules\stitching\src\blenders.cpp: In member function 'virtual void cv::detail::MultiBandBlender::feed(cv::InputArray, cv::InputArray, cv::Point)':
E:\src\opencv-4.1.2\modules\stitching\src\blenders.cpp:470:39: error: 'cv::cuda::device' has not been declared
using namespace cv::cuda::device::blend;
去掉BUILD_CUDA_SYUBS和OPENCV_DNN_CUDA
|