欢迎来到天天文库
浏览记录
ID:16763143
大小:16.78 KB
页数:3页
时间:2018-08-24
《visual studio 2010 +opencv2.3.1下的配置关键步骤》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、VisualStudio2010+Opencv2.3.1下的配置关键步骤 以下内容都是build文件夹里的内容一、设置环境变量:我的电脑--->右键--->属性--->高级--->环境变量--->在用户变量里,新建path和OPENCV两个项步骤1:在path中添加H:ProgramFilesOpenCV2.3.1buildx86vc10bin,就是添加dll文件步骤2:添加OPENCV的环境变量H:ProgramFilesOpenCV2.3.1build 二、打开一个Opencv的工程,点菜单目录的“视图”--->属性管理器--->双击项目名称步骤3:在
2、配置属性--->VC++目录--->包含目录文件中添加H:ProgramFilesOpenCV2.3.1buildincludeH:ProgramFilesOpenCV2.3.1buildincludeopencvH:ProgramFilesOpenCV2.3.1buildincludeopencv2步骤4::在配置属性--->VC++目录--->库目录中添加H:ProgramFilesOpenCV2.3.1buildx86vc10lib步骤5添加lib库文件,在配置debug里--->项目属性--->链接器--->输入--->附加依赖
3、库里加上opencv_core231d.libopencv_highgui231d.libopencv_video231d.libopencv_ml231d.libopencv_legacy231d.libopencv_imgproc231d.libopencv_flann231d.libopencv_features2d231d.libopencv_calib3d231d.libotherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingde
4、zhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrec
5、orderoftheCountypartyCommitteeSecretary,Ministersandopencv_objdetect231d.libopencv_contrib231d.lib步骤6:在配置release里--->项目属性--->链接器--->输入--->附加依赖库里加上opencv_core231.libopencv_highgui231.libopencv_video231.libopencv_ml231.libopencv_legacy231.libopencv_imgproc231.libopencv_flann231.libopencv_feat
6、ures2d231.libopencv_calib3d231.libopencv_objdetect231.libopencv_contrib231.lib开始简单的实例:#include//注意路径#include#includeusingnamespacecv;usingnamespacestd;intmain(intargc,char**argv){Matimage;image=imread("H:\Image\lena.jpg");//Readthefile,argv[1]
7、;注意是双斜杠!if(!image.data)//Checkforinvalidinput{cout<<"Couldnotopenorfindtheimage"<
此文档下载收益归作者所有