OpenCV 源码安装错误解决
OpenCV
一.安装
安装参考 感谢作者
https://pythonguide.readthedocs.io/en/latest/python/caffeenv.html#install-opencv
二.错误
1.~/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:673:20: fatal error: boostdesc_bgm.i: No such file or directory
解决办法: 补充缺少的文件
参考 如下链接(感谢以下作者)
方法: https://blog.csdn.net/u011736771/article/details/85960300/
文件链接:https://www.cnblogs.com/zhang-hongbo/p/12859405.html
2.opencv/modules/stitching/include/opencv2/stitching/detail/matchers.hpp:52:42: fatal error: opencv2/xfeatures2d/cuda.hpp: 没有那个文件或目录
compilation terminated.
modules/stitching/CMakeFiles/opencv_stitching.dir/build.make:68: recipe for target ‘modules/stitching/CMakeFiles/opencv_stitching.dir/src/autocalib.cpp.o’ failed
make[2]: *** [modules/stitching/CMakeFiles/opencv_stitching.dir/src/autocalib.cpp.o] Error 1
CMakeFiles/Makefile2:16212: recipe for target ‘modules/stitching/CMakeFiles/opencv_stitching.dir/all’ failed
make[1]: *** [modules/stitching/CMakeFiles/opencv_stitching.dir/all] Error 2
解决办法: opencv/modules/stitching/CMakeLists.txt文件中加入一条语句使其include opencv_contrib/modules/xfeatures2d/include,可以是绝对路径
参考 如下链接(感谢以下作者)
方法: https://www.codenong.com/cs106654012/