简体   繁体   English

OpenCV和Visual Studio配置

[英]OpenCV and Visual Studio configuration

In Learning OpenCV , it mentions the following regarding configuring OpenCV and Visual Studio: 学习OpenCV时 ,它提到了有关配置OpenCV和Visual Studio的以下内容:

In Visual Studio, it is necessary to create a project and to configure the setup so that (a) the libraries highgui.lib, cxcore.lib, ml.lib, and cv.lib are linked and (b) the preprocessor will search the OpenCV … /opencv/*/include directories for header files. 在Visual Studio中,有必要创建一个项目并配置设置,以便(a)库highgui.lib,cxcore.lib,ml.lib和cv.lib链接,并且(b)预处理器将搜索OpenCV ... / opencv / * /包含头文件的目录。 These “include” directories will typically be named something like C:/program files/opencv/cv/include, …/opencv/cxcore/include, … /opencv/ml/include, and … /opencv/otherlibs/ highgui. 这些“包含”目录通常被命名为类似C:/ program files / opencv / cv / include,... / opencv / cxcore / include,... / opencv / ml / include,以及... / opencv / otherlibs / highgui。

How would I go about creating and configuring the project this way? 我将如何以这种方式创建和配置项目?

It is necessary to set environment variables first. 首先需要设置环境变量。 You just need to add the location of the bin class to the directory path.(just add a semicolon and paste the path ). 您只需要将bin类的位置添加到目录路径中。(只需添加分号并粘贴路径)。 Then after creating a visual c++ console project you have to include needed include directories path to specific location.(If you need more explanation on that just add a comment) 然后在创建可视化c ++控制台项目之后,您必须包含指向特定位置的所需包含目录路径。(如果您需要更多解释,只需添加注释)

You need to set the environment variables, and then set the projects properties (C++ and Linker) according to your OpenCV version and directories. 您需要设置环境变量,然后根据您的OpenCV版本和目录设置项目属性(C ++和Linker)。 See my step-bystep guide with instructions and a video: 请参阅我的逐步指南以及说明和视频:

http://devel-open.blogspot.com.ar/2012/12/opencv-visual-studio-2008.html http://devel-open.blogspot.com.ar/2012/12/opencv-visual-studio-2008.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM