Opencv installation and configuration

Source: Internet
Author: User

 

0. Declaration: The environment used is Windows XP + Visual Studio 2005 + opencv2.0

 

1. Download opencv2.0, http://www.opencv.org.cn/index.php/Download
, Installed in C :/.


2. After installation, the file under C:/opencv2.0/lib/is *. dll. A. It is not a library file and must be converted to a library file.

3.
Http://www.cmake.org/cmake/resources/software.html
Download cmake and select windows (Win32

Installer ). Install and add environment variables (C:/Program
Files/cmake 2.8/bin ).


4. Run cmake (cmake-Gui) and locate source codeto the cmakelists.txt location (generally C:/opencv2.0 ),

Binaries locates C:/opencv2.0/cmake_compile_result and click Configure-> generate.

Became opencv. sln.


5. Use Visual Studio 2005 to open opencv. sln. Debug to regenerate the opencv solution. Under dubug, regenerate

Install; Release to regenerate the opencv solution. Therefore, in C:/opencv2.0/cmake_compile_result/lib/

The following six library files of * D. Lib are generated. Add environment variables to the directory where the current library file is located (C:/opencv2.0

/Cmake_compile_result/bin ).


6. You can write the opencv application under Visual Studio 2005. Create a Win32 console project and set

Lib (Project-properties-configuration properties-connection-input-add additional items-Add the six lib file names generated above, separated by spaces ).

 


7. Run the opencv application. The source code will be later. The solution is successfully generated. Run D:/try0621 in DOS

/Opencvhello/debug> opencvhello.exe. The image is displayed.

 

8. More content reference http://hi.baidu.com/mailrabbit/blog/item/d1248dcbd9a5088cc91768d0.html

 

9. The first opencv Program

// My first opencv program // This solution contains the library file # include "stdafx. H "# include <cv. h> # include 

 

Notes:

  • After a great deal of effort, I finally got it done.
  • A good sleep.
  • Go to opencv.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.