首页 > 代码库 > vs2013 + opencv 3.0 无脑配置方法
vs2013 + opencv 3.0 无脑配置方法
1、安装opencv(其实就是解压)
2、添加系统环境变量取名为OPENCV,路径为安装路径\build;再添加环境变量为;%OPENCV%\x86\vc12\bin(就是%OPENCV%不用换的)
3、注销or重启使得环境变量生效
4、新建项目,在属性管理器页面右击项目名称选择添加现有属性表 opencv300b.props (自己新建下文件吧不知道怎么上传附件,代码就是下面框子里面的)
1 <?xml version="1.0" encoding="utf-8"?> 2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 <ImportGroup Label="PropertySheets" /> 4 <PropertyGroup Label="UserMacros" /> 5 <PropertyGroup> 6 <IncludePath>$(OPENCV)\include;$(IncludePath)</IncludePath> 7 <LibraryPath Condition="‘$(Platform)‘==‘Win32‘">$(OPENCV)\x86\vc12\lib;$(OPENCV)\x86\vc12\staticlib;$(LibraryPath)</LibraryPath> 8 <LibraryPath Condition="‘$(Platform)‘==‘X64‘">$(OPENCV)\x64\vc12\lib;$(OPENCV)\x64\vc12\staticlib;$(LibraryPath)</LibraryPath> 9 </PropertyGroup>10 <ItemDefinitionGroup>11 <Link Condition="‘$(Configuration)‘==‘Debug‘">12 <AdditionalDependencies>opencv_ts300d.lib;opencv_world300d.lib;IlmImfd.lib;libjasperd.lib;libjpegd.lib;libpngd.lib;libtiffd.lib;libwebpd.lib;opencv_calib3d300d.lib;opencv_core300d.lib;opencv_features2d300d.lib;opencv_flann300d.lib;opencv_highgui300d.lib;opencv_imgcodecs300d.lib;opencv_imgproc300d.lib;opencv_ml300d.lib;opencv_objdetect300d.lib;opencv_photo300d.lib;opencv_shape300d.lib;opencv_stitching300d.lib;opencv_superres300d.lib;opencv_ts300d.lib;opencv_video300d.lib;opencv_videoio300d.lib;opencv_videostab300d.lib;zlibd.lib;%(AdditionalDependencies)13 </AdditionalDependencies>14 </Link>15 <Link Condition="‘$(Configuration)‘==‘Release‘">16 <AdditionalDependencies>opencv_ts300.lib;opencv_world300.lib;IlmImf.lib;ippicvmt.lib;libjasper.lib;libjpeg.lib;libpng.lib;libtiff.lib;libwebp.lib;opencv_calib3d300.lib;opencv_core300.lib;opencv_features2d300.lib;opencv_flann300.lib;opencv_highgui300.lib;opencv_imgcodecs300.lib;opencv_imgproc300.lib;opencv_ml300.lib;opencv_objdetect300.lib;opencv_photo300.lib;opencv_shape300.lib;opencv_stitching300.lib;opencv_superres300.lib;opencv_ts300.lib;opencv_video300.lib;opencv_videoio300.lib;opencv_videostab300.lib;zlib.lib;%(AdditionalDependencies)17 </AdditionalDependencies>18 </Link>19 </ItemDefinitionGroup>20 <ItemGroup />21 </Project>
本属性表对应vs2013 + opencv3.0的环境,对应不同环境,属性表内容需要变动,opencv3x比起opencv2x lib文件的保存方式有一个小变动,变成了两个文件一个在lib文件夹中一个在staticlib文件夹中需要注意一下。
vs2013 + opencv 3.0 无脑配置方法
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。