zoukankan      html  css  js  c++  java
  • Visual Studio + OpenCV

    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:OpenCVBuildx86vc10     (suggested for Visual Studio 2010 - 32 bit Windows)
      setx -m OPENCV_DIR D:OpenCVBuildx64vc10     (suggested for Visual Studio 2010 - 64 bit Windows)
      
      setx -m OPENCV_DIR D:OpenCVBuildx86vc11     (suggested for Visual Studio 2012 - 32 bit Windows)
      setx -m OPENCV_DIR D:OpenCVBuildx64vc11     (suggested for Visual Studio 2012 - 64 bit Windows)
    3. %path% += %OPENCV_DIR%in
    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
  • 相关阅读:
    goland 创建快捷方式 Linux
    Manjaro-Linux感觉蛮有用的系统问题处理
    Rust 语言九九乘法表
    manjaro 显卡驱动
    Archlinux启动时声音总是静音,需要手动调整音量的解决步
    错误: 无法找到目标文件分割所需的 strip 二进制文件。
    rust 安装添加代理
    2.开启aria2c多线程加速下载
    包无效或损坏(PGP签名)
    zsh的自动完成辅助工具:oh-my-zsh
  • 原文地址:https://www.cnblogs.com/dmdj/p/3860523.html
Copyright © 2011-2022 走看看