• vs2013配置opencv2.4.13(txt中复制粘贴即可,一次配置永久使用)


    此方法配置简单,方便易行,解压opencv2.4.13后得到opencv文件夹,进行如下步骤:

    1、添加环境变量

    用户变量,新建,变量名opencv,值D:opencvuild

    系统变量,Path中添加D:opencvuildx86vc12in

    2、新建opencv2413_debug.txt,记事本打开复制粘贴如下内容:

    注意将代码中路径D:opencvuildinclude;D:opencvuildincludeopencv;D:opencvuildincludeopencv2;和D:opencvuildx86vc12lib;改为自己的路径。(可以把除include、x86文件夹之外的所有文件删除,省去近2G空间)

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <ImportGroup Label="PropertySheets" />
      <PropertyGroup Label="UserMacros" />
      <PropertyGroup>
        <IncludePath>D:opencvuildinclude;D:opencvuildincludeopencv;D:opencvuildincludeopencv2;$(IncludePath)</IncludePath>
        <LibraryPath>D:opencvuildx86vc12lib;$(LibraryPath)</LibraryPath>
      </PropertyGroup>
      <ItemDefinitionGroup>
        <Link>
          <AdditionalDependencies>opencv_ml2413d.lib;opencv_calib3d2413d.lib;opencv_contrib2413d.lib;opencv_core2413d.lib;opencv_features2d2413d.lib;opencv_flann2413d.lib;opencv_gpu2413d.lib;opencv_highgui2413d.lib;opencv_imgproc2413d.lib;opencv_legacy2413d.lib;opencv_objdetect2413d.lib;opencv_ts2413d.lib;opencv_video2413d.lib;opencv_nonfree2413d.lib;opencv_ocl2413d.lib;opencv_photo2413d.lib;opencv_stitching2413d.lib;opencv_superres2413d.lib;opencv_videostab2413d.lib;%(AdditionalDependencies)</AdditionalDependencies>
        </Link>
      </ItemDefinitionGroup>
      <ItemGroup />
    </Project>
    

    3、同理,新建opencv2413_release.txt,复制粘贴如下代码

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <ImportGroup Label="PropertySheets" />
      <PropertyGroup Label="UserMacros" />
      <PropertyGroup>
        <IncludePath>D:opencvuildinclude;D:opencvuildincludeopencv;D:opencvuildincludeopencv2;$(IncludePath)</IncludePath>
        <LibraryPath>D:opencvuildx86vc12lib;$(LibraryPath)</LibraryPath>
      </PropertyGroup>
      <ItemDefinitionGroup>
        <Link>
          <AdditionalDependencies>opencv_calib3d2413.lib;opencv_contrib2413.lib;opencv_core2413.lib;opencv_features2d2413.lib;opencv_flann2413.lib;opencv_gpu2413.lib;opencv_highgui2413.lib;opencv_imgproc2413.lib;opencv_legacy2413.lib;opencv_ml2413.lib;opencv_nonfree2413.lib;opencv_objdetect2413.lib;opencv_ocl2413.lib;opencv_photo2413.lib;opencv_stitching2413.lib;opencv_superres2413.lib;opencv_ts2413.lib;opencv_video2413.lib;opencv_videostab2413.lib;%(AdditionalDependencies)</AdditionalDependencies>
        </Link>
      </ItemDefinitionGroup>
      <ItemGroup />
    </Project>
    

    4、将opencv2413_debug.txt和opencv2413_release.txt更名为opencv2413_debug.props和opencv2413_release.props

    在以后的项目中,只需要添加这两个属性表即可。

  • 相关阅读:
    世界企业家:创业者需知的8条创业逻辑
    比尔·盖茨的“机会”观——不追求机会,才会有机会
    我爱思佳(帮别人名字作诗)
    唐艺铭(帮别人名字作诗)
    我爱思佳(帮别人名字再作诗)
    优秀是一种习惯:智者五句话足以改变你的人生
    别了,我的情人
    李丽萍(帮别人名字作诗)
    Know GCS AND GES structure size in shared pool
    测试Exadata单个cell失败
  • 原文地址:https://www.cnblogs.com/xixixing/p/6766405.html
Copyright © 2020-2023  润新知