码迷,mamicode.com
首页 > 其他好文 > 详细

Learning OpenCV Lecture 1 (Using OpenCV in VS2010)

时间:2014-07-22 23:07:32      阅读:253      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   http   color   os   

1、Create a new Win32 Console Application

bubuko.com,布布扣
bubuko.com,布布扣
 
2、Open the Property Manager by View->Property Manage
rbubuko.com,布布扣
bubuko.com,布布扣
In Visual C++ 2010, a property sheet is an XML file that describes your project settings. We will now create a new one by right-clicking on the Debug | Win32 node of the project, and by selecting the Add New Project Property Sheet option (as seen in the following screenshot):
bubuko.com,布布扣
 
3、The new property sheet is then added once we click on Add. We now need to edit it. Simply double-click on the property sheet‘s name and select VC++ Directories, as seen here:
bubuko.com,布布扣
Edit the Include Directories textfield and add the path to the include files of your OpenCV library:
bubuko.com,布布扣
Do the same thing with the Library Directories. This time you add the path to your OpenCV library files:
bubuko.com,布布扣
 
4、Go to the Input item of the Linker node, as seen in the following screenshot: Edit
bubuko.com,布布扣
Edit the Additional Dependencies textfield and add the following list of library modules:
bubuko.com,布布扣
Note that we specified the libraries with names ending with the letter "d". These are the binaries for the Debug mode. You will need to create another (almost identical) property sheet for the Release mode. You follow the same procedure, but you add it under the Release | Win32 node. This time, the library names are specified without appending a "d" at the end.
 
5、Add a new .cpp file
bubuko.com,布布扣
Once you have recopied the code in the preceding figure (it will be explained later), you can compile it and run it using the Start green arrow in the Toolbar at the top of your screen. You will see your image displayed for five seconds. An example is seen here:
bubuko.com,布布扣
 bubuko.com,布布扣
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Learning OpenCV Lecture 1 (Using OpenCV in VS2010),布布扣,bubuko.com

Learning OpenCV Lecture 1 (Using OpenCV in VS2010)

标签:des   style   blog   http   color   os   

原文地址:http://www.cnblogs.com/starlitnext/p/3861325.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!