opencv 2.4.3 无法打开文件"opencv_highgui.lib"

#include"iostream"usingnamespacestd;#include"stdafx.h"#include"cv.h"#include"highgui.... #include "iostream"

using namespace std;
#include "stdafx.h"
#include "cv.h"
#include "highgui.h"
#include "math.h"
#pragma comment(lib,"highgui.lib")
#pragma comment(lib,"cv.lib")
#pragma comment(lib,"cvaux.lib")
#pragma comment(lib,"cxcore.lib")
const char* filename1 = "n2.jpg";
const char* filename2 = "che.jpg";
int main( int argc, char** argv )

{
IplImage *img;
IplImage *tpl;
IplImage *res;
CvPoint minloc, maxloc;
double minval, maxval;
int img_width, img_height;
int tpl_width, tpl_height;
int res_width, res_height;

img = cvLoadImage( filename1, CV_LOAD_IMAGE_COLOR );
tpl = cvLoadImage( filename2, CV_LOAD_IMAGE_COLOR );

if( tpl == 0 )
{
fprintf( stderr, "Cannot load file %s!\n", argv[2] );
return 1;
}

cvNamedWindow( "src", CV_WINDOW_AUTOSIZE );
cvShowImage( "src", img );
cvNamedWindow( "template", CV_WINDOW_AUTOSIZE );
cvShowImage( "template", tpl );

/* get image's properties */
img_width = img->width;
img_height = img->height;
tpl_width = tpl->width;
tpl_height = tpl->height;
res_width = img_width - tpl_width + 1;
res_height = img_height - tpl_height + 1;
展开
 我来答
普洛智应
2013-06-12 · 知道合伙人互联网行家
普洛智应
知道合伙人互联网行家
采纳数:410 获赞数:1585
虚拟现实(VR/AR)以及游戏相关技术,物联网以及传感器技术

向TA提问 私信TA
展开全部
你给出的路径里有这个"opencv_highgui.lib"文件吗?
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式