Ubuntu18.04+CUDA11.2+opencv4.4.0+opencv_contrib-4.4.0报错解决

问题1描述

fatal error: opencv2/xfeatures2d.hpp: 没有那个文件或目录.

解决方案:

在opencv的安装文件里,找到 CMakeLists.txt,加入(注意修改路径)

include_directories("/home/zyl/ziyuan/opencv-4.4.0/opencv_contrib-4.4.0/modules/xfeatures2d/include")

问题2描述

/home/zyl/ziyuan/opencv-4.3.0/opencv_contrib-4.3.0/modules/xfeatures2d/test/test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_regression.impl.hpp: 没有那个文件或目录
#include “features2d/test/test_detectors_regression.impl.hpp”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

解决方案:

在opencv的安装文件里,找到 CMakeLists.txt,加入

include_directories("modules")

问题3描述

error: ‘integer_sequence’ is not a member of ‘std’

解决方案:

删除之前的ceres-solver,换成1.14.0版本的ceres,具体参考:
感谢:https://blog.csdn.net/qq_41586768/article/details/107541917


问题4描述

fatal error: boostdesc_bgm.i: No such file or directory

解决方案:

boostdesc_bgm.i等文件下载失败了,需要手动下载,下载地址:

链接: https://pan.baidu.com/s/18I9K5MfKomdokuvDD0f2xQ  
密码: 8lvi

感谢:https://blog.csdn.net/sycamore_/article/details/104985078
解压后把它放在下面的路径下:
xxxxxx/opencv-4.4.0/opencv_contrib-4.4.0/modules/xfeatures2d/src


你可能感兴趣的:(opencv,计算机视觉,人工智能)