为什么不可以再opencv3中使用SurfFeatureopencv colordetectorr

SurfFeatureDetector 调用 函数检测出 特征关键点,保存在v 容器中,绘制
OpenCV 247万源代码下载-
&文件名称: SurfFeatureDetector& & [
& & & & &&]
&&所属分类:
&&开发工具: Visual C++
&&文件大小: 5895 KB
&&上传时间:
&&下载次数: 0
&&提 供 者:
&详细说明:调用detect函数检测出SURF特征关键点,保存在vector容器中,绘制特征关键点
-Call detect function detects the SURF feature key stored in vector container, drawing feature key points
文件列表(点击判断是否您需要的文件,如果是垃圾请在下面评价投诉):
&&SurfFeatureDetector&&...................\ipch&&...................\....\surffeaturedetector-cfa6f679&&...................\....\............................\surffeaturedetector-412a84f2.ipch&&...................\....\............................\surffeaturedetector-f14067ec.ipch&&...................\Release&&...................\.......\SurfFeatureDetector.exe&&...................\.......\SurfFeatureDetector.pdb&&...................\SurfFeatureDetector&&...................\SurfFeatureDetector.sdf&&...................\SurfFeatureDetector.sln&&...................\SurfFeatureDetector.suo&&...................\...................\1.jpg&&...................\...................\2.jpg&&...................\...................\ReadMe.txt&&...................\...................\Release&&...................\...................\.......\CL.read.1.tlog&&...................\...................\.......\CL.write.1.tlog&&...................\...................\.......\link.read.1.tlog&&...................\...................\.......\link.write.1.tlog&&...................\...................\.......\mt.read.1.tlog&&...................\...................\.......\mt.write.1.tlog&&...................\...................\.......\stdafx.obj&&...................\...................\.......\SurfFeatureDetector.exe.intermediate.manifest&&...................\...................\.......\SurfFeatureDetector.lastbuildstate&&...................\...................\.......\SurfFeatureDetector.log&&...................\...................\.......\SurfFeatureDetector.obj&&...................\...................\.......\SurfFeatureDetector.pch&&...................\...................\.......\vc100.pdb&&...................\...................\stdafx.cpp&&...................\...................\stdafx.h&&...................\...................\SurfFeatureDetector.cpp&&...................\...................\SurfFeatureDetector.vcxproj&&...................\...................\SurfFeatureDetector.vcxproj.filters&&...................\...................\SurfFeatureDetector.vcxproj.user&&...................\...................\targetver.h
&输入关键字,在本站247万海量源码库中尽情搜索:1212人阅读
计算机视觉(9)
OpenCV(11)
最近Opencv升级比较快,从2.4.0到2.4.1到2.4.2,使得我这个还在使用2.3.1的人很不好意思,而且听说新版本里添加了tbb并行功能,急着想用这些功能的我赶紧下了2.4.2。
按部就班的解压、设置c++目录(我使用的是vs2008)、设置环境变量......一系列的完成之后,想用一下surf算法,就尝试着把pdf文档里的代码复制到了vs里,运行一下,发现不行,报错。。。瞬间有点被骗的感觉,这可是从官方发布的pdf里的最新代码啊!!!
#include &iostream&
#include &opencv2/core/core.hpp&
#include &opencv2/features2d/features2d.hpp&
#include &opencv2/highgui/highgui.hpp&
#include &opencv2/nonfree/nonfree.hpp&
#include &opencv2/nonfree/features2d.hpp&
char *path1=&D:\\TestData\\cvtest\\src\\left01.jpg&;
char *path2=&D:\\TestData\\cvtest\\src\\left03.jpg&;
int main()
Mat src1=imread(path1,0);
/*namedWindow(&image&,CV_WINDOW_AUTOSIZE);
imshow(&image&, src1);
waitKey(0);*/
Mat src2=imread(path2,0);
SurfFeatureDetector detector(400);
vector&KeyPoint& keypoint1,keypoint2;
detector.detect(src1,keypoint1);
detector.detect(src2,keypoint2);
SurfDescriptorE
Mat descriptor1,descriptor2;
pute(src1,keypoint1,descriptor1);
pute(src2,keypoint2,descriptor2);
BruteForceMatcher&L2&float&&
vector&DMatch&
matcher.match(descriptor1,descriptor2,matches);
namedWindow(&matches&,1);
drawMatches(src1,keypoint1,src2,keypoint2,matches,img_matches);
imshow(&matches&,img_matches);
cvWaitKey(0);
到群里问,大家也刚用2.4.2不久,只有个达人告诉我是头文件的问题。我试着去找了一下,发现2.3.1的include文件和2.4.2的差别很大,新版本里多了很多东西,对比了一下features2d.hpp这个文件,发现原先包含在features2d.hpp的BruteForceMatcher现在根本不在features2d.hpp中,我试着去查找其他有可能在的hpp文件,找了几个,发现这不是解决问题的办法,问google吧!在搜了一下之后发现,还真有人碰到了这个问题,也确实是头文件的问题:缺少了#include&opencv2/legacy/legacy.hpp&,加了之后,发现之前的错误确实没了。
但是新的问题出来了,说link出现问题,没经验的我还是只能问google(谷歌确实强大啊!!!),牛人一针见血的指出了问题所在:For those who would have the same problem, make sure you have ALL the right linker inputs (configuration
-& linker -& inputs), included dlls such as opencv, highgui etc.在右键“属性”-&&链接器&-&“输入”-&&附加依赖项&把新输入的legacy的静态文件opencv_legacy242d.lib加进来就ok了!
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:184017次
积分:3555
积分:3555
排名:第8027名
原创:167篇
转载:19篇
评论:45条
(11)(1)(3)(4)(6)(19)(1)(2)(3)(15)(18)(4)(5)(1)(1)(1)(7)(1)(34)(6)(13)(6)(4)(6)(4)(10)(1)(9)2013年 总版技术专家分年内排行榜第三
2012年 总版技术专家分年内排行榜第七
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。}

我要回帖

更多关于 opencv detector 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信