博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Visual Studio + OpenCV
阅读量:5737 次
发布时间:2019-06-18

本文共 1750 字,大约阅读时间需要 5 分钟。

  1. have an OpenCV directory that contains the OpenCV header files plus binaries and you have set the environment variables(安装opencv)
  2. Set the OpenCV enviroment variable and add it to the systems path:

    First we set an enviroment variable to make easier our work. This will hold the build directory of our OpenCV library that we use in our projects. Start up a command window and enter:

    setx -m OPENCV_DIR D:\OpenCV\Build\x86\vc10     (suggested for Visual Studio 2010 - 32 bit Windows)setx -m OPENCV_DIR D:\OpenCV\Build\x64\vc10     (suggested for Visual Studio 2010 - 64 bit Windows)setx -m OPENCV_DIR D:\OpenCV\Build\x86\vc11     (suggested for Visual Studio 2012 - 32 bit Windows)setx -m OPENCV_DIR D:\OpenCV\Build\x64\vc11     (suggested for Visual Studio 2012 - 64 bit Windows)
  3. %path% += %OPENCV_DIR%\bin
  4. To build an application with OpenCV you need to do two things:

    • Tell to the compiler how the OpenCV library looks. You do this by showing it the header files.

    • Tell to the linker from where to get the functions or data structures of OpenCV, when they are needed.

  5. create a new Property Sheet that will contain all the rules that the compiler and linker needs to know.
  6.  Go the C++ groups General entry and under the “Additional Include Directories” add the path to your OpenCV include.
    $(OPENCV_DIR)\..\..\include
  7. go to the Linker ‣ General and under the “Additional Library Directories” add the libs directory:
    $(OPENCV_DIR)\lib
  8. specify the libraries in which the linker should look into. To do this go to the Linker ‣ Input and under the “Additional Dependencies” entry add the name of all modules which you want to use:
    opencv_(The Name of the module)(The version Number of the library you use)d.lib

转载于:https://www.cnblogs.com/dmdj/p/3860523.html

你可能感兴趣的文章
灵活运用 SQL SERVER FOR XML PATH
查看>>
es 加磁盘扩容
查看>>
使用Azcopy在Azure上进行HBase的冷热备份还原
查看>>
linux下使用过的命令总结(未整理完)
查看>>
ES6的一些文章
查看>>
LeetCode 198, 213 House Robber
查看>>
New Year Permutation(Floyd+并查集)
查看>>
<context:component-scan>详解
查看>>
DS博客作业07--查找
查看>>
Git 方法
查看>>
[Python] numpy.nonzero
查看>>
2016-11-29
查看>>
C#反射的坑
查看>>
css3 box-shadow阴影(外阴影与外发光)讲解
查看>>
时间助理 时之助
查看>>
nginx快速安装
查看>>
自定义转场动画
查看>>
英国征召前黑客组建“网络兵团”
查看>>
Silverlight 2.5D RPG游戏“.NET技术”技巧与特效处理:(十二)魔法系统
查看>>
[NPM] Run npm scripts in series
查看>>