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/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值