WIN7+OPENCV3.0.0+VS2010 Installation and Configuration

Source: Internet
Author: User

Recently read "study OpenCV", want to run face recognition example, so first with the environment.

1, OpenCV Download:

Specific, http://opencv.org/, the official website is too slow, Baidu network disk Resources link: http://pan.baidu.com/s/1eStj5tg Password: 0pat

2, OpenCV decompression

Official website OpenCV After the download is an EXE file, directly extracted to the folder to put, I was placed in the D:\Program files, click Extract. After a total decompression there will be four files: build, sources, LICENSE.txt, README.md.txt.

3. Setting the environment variables of the computer

The computer--right--Properties--Advanced system settings--advanced--environment variables--system variable-->path, adding D:\Program in Path files\opencv\build\x64 \vc12\bin;d:\program Files\opencv\build\x86\vc12\bin. (Because my computer is 64-bit, I added X64.) )

4. OPENCV Configuration

Create a new Win32 Console Application project that opens the property manager for this project, such as the project name Test1, with Debug|win32 and Release|win32 under the property manager.

(1) Double-click Debug|win32 Microsoft.Cpp.Win32.user, will open the property page, in the VC + + directory in the inclusion directory to add:

D:\Program Files\opencv\build\include

D:\Program FILES\OPENCV\BUILD\INCLUDE\OPENCV

D:\Program Files\opencv\build\include\opencv2.

In the library directory, add:

D:\Program Files\opencv\build\x64\vc12\lib

D:\Program Files\opencv\build\x86\vc12\lib

To prevent the vulnerability, I specifically added a 32-bit library directory.

In the linker, click Input, select additional dependencies Opencv_ts300d.lib, Opencv_world300d.lib.

(2) Double-click on the Release|win32 Microsoft.Cpp.Win32.user, in the linker, clicking Input, select Additional dependencies Opencv_ts300.lib, Opencv_world300.lib.

5. Experiment

Test routines

#include <iostream>#include<opencv2/core/core.hpp>#include<opencv2/highgui/highgui.hpp>using namespaceCV;intMain () {//read a picture (original picture of the game)Mat Img=imread ("pic.jpg");//jpg file in the same directory as the CPP file//Create a window named "Game Original picture"Namedwindow ("Game original Painting"); //display the game's original picture in the windowImshow ("Game original Painting", IMG); //wait for 6000 ms after the window automatically shuts downWaitkey (6000);}

Test results:

6, in the process of running a number of problems appeared, now listed, for reference

(1) Lack of MSVCP120.dll

A detailed explanation: http://jingyan.baidu.com/article/93f9803f0c599ae0e46f558a.html

(2) More questions to refer to: http://blog.csdn.net/poem_qianmo/article/details/19809337/the Great God wrote before, good writing

WIN7+OPENCV3.0.0+VS2010 Installation and Configuration

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.