Vs2013 + opencv2.4.9 (10) Configure [zz]

Source: Internet
Author: User

Set the opencv SDK decompression directory and click extract to decompress it.

 

I am used to extracting data to this location.

The decompression process is as follows.

2,File directory Introduction

Decompress the package and generate it in the directory.OpencvFolder

 

In the opencv folder, there are two folders: Build and sources. Build is the SDK package, and sources is the source code package (which also contains the source code of opencv examples)

 

Under the build folder, include is the folder where the C & C ++ header file is located; Doc is the document folder; Java is the library folder developed by Java; python is the python Development Library folder; x64 and x86 are compiled 64-bit and 32-bit library folders of C & C ++, which contain three folders: VC10, vc11, and vc12, corresponding to VC ++ 2010, VC ++ 2012, and VC ++ 2013 respectively.

 

Because the library files generated by VC ++ of different versions need to run differently, you must select the corresponding binary library file When configuring the VC ++ project. In the vc xx folder, the bin folder is a public dynamic link library. After configuration in the system environment variables, opencv projects can share them; the LIB folder is the static link file required for implicit calling of the dynamic library; The staticlib folder is the static Link Library, which is used to generate programs that do not rely on the dynamic library.

3,Set Environment Variables

"Start Menu"->"Control Panel"->"System" orRight-click "computer" and choose "properties" to open the system settings window.Select "Advanced System settings" to open the "System Properties" window.

 

 

Select "Advanced tab" and click "environment variables" to open the "environment variables" window.

 

Find in System VariablesPathVariable, inPathAdd ValueSDKInBinDirectory.

The directory set during decompression isD: \ Program Files, Used32Bitwise database,VC ++Yes2013, So addBinThe directory is

D: \ Program Files \ opencv \ build \ x86 \ vc12 \ bin.

CreateOpencvThe variable value is

D: \ Program Files \ opencv \ build(Based on the extracted directory)

Path(Note: adding in the middle);Separated in English)

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

Note: After environment variable configuration, the system must be restarted to take effect.

4,VC ++Project Configuration

Create a new project (this should happen)

Then openView->Property Manager

 

Double-click the place marked, and a property page is displayed.

 

SelectVC ++Directory

 

Directory of executable files

Click Edit on the right.

 

Create a location

 

I entered (if you are not sure, click the ellipsis on the right to select a folder)

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

 

Then include the Directory

Almost the same

 

I entered (if you are not sure, click the ellipsis on the right to select a folder)

D: \ Program Files \ opencv \ build \ include

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

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

 

Next is the library directory (if you are not sure, click the ellipsis on the right to select a folder)

 

I entered (if you are not sure, click the ellipsis on the right to select a folder)

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

 

The next step is to configure additional dependencies.

 

Enter the following link database name

12345678910111213141516171819202122232425262728293031323334 opencv_calib3d249d.lib opencv_contrib249d.lib opencv_core249d.lib opencv_features2d249d.lib opencv_flann249d.lib opencv_calib3d249.lib opencv_contrib249.lib opencv_core249.lib opencv_features2d249.lib opencv_flann249.lib opencv_gpu249.lib opencv_highgui249.libopencv_imgproc249.lib opencv_legacy249.lib opencv_ml249.lib opencv_nonfree249.lib opencv_objdetect249.lib opencv_photo249.lib opencv_stitching249.lib opencv_ts249.lib opencv_video249.lib opencv_videostab249.lib opencv_gpu249d.lib opencv_highgui249d.lib opencv_imgproc249d.lib opencv_legacy249d.lib opencv_ml249d.lib opencv_nonfree249d.lib opencv_objdetect249d.lib opencv_photo249d.lib opencv_stitching249d.lib opencv_ts249d.lib opencv_video249d.lib opencv_videostab249d.lib

 

Note: The only difference is thatDebugVersion UsedDLLAndLibAll files have suffixes.D,ReleaseVersion usedD. ConfigurationReleaseDo not forgetDDelete

5,Test phase

Add a file

#include <cv.h> #include 

Vs2013 + opencv2.4.9 (10) Configure [zz]

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.