VS等版本中使用xfeatures2d::sift....等过程遇到的问题

VS等版本中使用xfeatures2d::sift…等过程遇到的问题

文件下载

github desktop 下载 windows 7or Later :
https://desktop.github.com
opencv3.0.0 下载 Opencv for Windows:
http://opencv.org/downloads.html
OpenCV_contrib 下载 :
https://github.com/Itseez/opencv_contrib
cmake_gui下载 Windows (Win32 Installer):
http://www.cmake.org/download/

使用情况

在使用角点匹配,拼接等功能时会需要;
Cmake编译opencv_contrib会需要

VS头文件设置

除了基本的,还有

#include
#include
#include
#include “nonfree.hpp”
#include
#include “opencv_modules.hpp”
#include <features2d.hpp>
#include <utility.hpp>
#include “imgcodecs.hpp”
#include “highgui.hpp”
#include “autocalib.hpp”
#include “blenders.hpp”
#include “timelapsers.hpp”
#include “camera.hpp”
#include “exposure_compensate.hpp”
#include “matchers.hpp”
#include “motion_estimators.hpp”
#include “seam_finders.hpp”
#include “warpers.hpp”
#include “nonfree.hpp”
#include “stitcher.hpp”
路径参考在这里插入图片描述
链接:https://blog.csdn.net/GIS_feifei/article/details/102875389

注意的问题

关于OpenCV3.4.1+opencv_contrib编译的流程,很多博文都说的很详细。比如:
https://blog.csdn.net/ezhchai/article/details/80557936

但是这里声明需要注意的问题:

1. 版本对应:opencv和opencv_contrib版本必须对应在这里插入图片描述

下载的opencv和contrib版本必须对应,contrib版本可在这里选择:
opencv3.0.0 下载 Opencv for Windows:
http://opencv.org/downloads.html
OpenCV_contrib 下载 :
https://github.com/Itseez/opencv_contrib
cmake_gui下载 Windows (Win32 Installer):
http://www.cmake.org/download/
下载可能很慢,我这里已经有下载好的压缩包,里面含有opencv_contrib3.0,0,3.4.1, 3.4.2以及多个cmake版本(cmake-3.14.4-win64-x64,cmake-3.8.2-win64-x64.zip,需要可去下面链接下载:https://download.csdn.net/download/gainichengyichongfu/12272964
上传压缩包大小限制,不全的可以私聊补发
在这里插入图片描述

2.路径并列
在这里插入图片描述
解压后opencv和opencv_contrib路径并列,如
在这里插入图片描述
我的是
在这里插入图片描述
在这里插入图片描述
而newbuild文件夹这是cmake编译时where to build the binaries的路径,也要和opencv和opencv_contrib路径并列
在这里插入图片描述

在Cmake编译可能遇到的问题

Unknown CMake command “ocv_download”.

CMake Error at CMakeLists.txt:51 (add_library):
[cmake] Cannot find source file:

CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
这些目标中至少有一个不是STATIC_LIBRARY
等等
我遇到的这些问题都是上面路径以及版本原因造成的

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小于等于大于

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值