(Kate) installation of opencv-2.4.3 under win8-64 bit system and configuration in visual_studio2010

Source: Internet
Author: User

Environment:

Operating system: window8.1 64bit

OPENCV version: OPencv-2.4.3

VS Version: vs 2010

First, install the OPENCV

1.OPENCV official website http://opencv.org/Download OPencv-2.4.3

2. After download, directly double-click the installation, select the installation file, extract the OpenCV function library to the specified path, such as D:\, select the installation path, click "Extract"

After the installation is complete, the file path D:\OpenCV2.4.3 is the library of functions needed for development.

Second, set environment variables

Right-click My computer → properties → advanced → environment variables.

1. user variable settings

Set PATH

Select path and click Edit. Add the following path at the end of path: C:\Program files\opencv244\opencv\build\x86\vc10\bin.

Note: 1. To add a semicolon in front of the path, separated from the previous path, but no English semicolon at the end of the path, unless the path is added later;

2, according to their own situation, will be changed to your Opencv\build\x86\vc10\bin folder where the path;

3, if it is a 64-bit system, you can change the Opencv\build\x86\vc10\bin to Opencv\build\x64\vc10\bin.

4. Two paths are added to enable 32-bit and 64-bit flexible switching

2. new OpenCV variable

Click New, and in the dialog box that pops up, set the variable name and variable values to OPENCV and C:\Program Files\opencv244\opencv\build, respectively.

Note: 1, variable names can be defined by themselves;

2. The variable value can be changed to the path where your Opencv\build folder is located.

3. system Variable Settings

Set PATH

Select path and click Edit. Add the following path at the end of path: C:\Program files\opencv244\opencv\build\x86\vc10\bin.

Note: 1. To add a semicolon in front of the path, separated from the previous path, but no English semicolon at the end of the path, unless the path is added later;

2, according to their own situation, will be changed to your Opencv\build\x86\vc10\bin folder where the path;

3, if it is a 64-bit system, you can change the Opencv\build\x86\vc10\bin to Opencv\build\x64\vc10\bin.

4. Two paths are added, can achieve 32-bit and 64-bit flexible switching!!!!

Description: After setting the environment variables, you need to restart your computer to take effect.

Third, configuration VS2010

No VS2010, can go to the official website to download

    1. Open VS2010, click "File"-"new"-"Project"-select "Visual C + +" corresponding to "Win32 console Application", enter "name", such as "Win32opencv", write well and click "OK", click "Finish". Specific as

1, open VS2010, new project →win32 console project → complete.

    1. Click "Project"-"Win32opencv Property"

3. Select "Configuration Properties" and click "Configuration Manager" to configure the x64 platform. Windows 32-bit programs are compiled into 64-bit steps as follows:

VS2010 New VC + + Project The default component platform is 32-bit

 

1) Click the "Win32" drop-down box to open the "Configuration Manager"

2). Click on the "Active Solution management Platform" drop-down box and select "New"

3). Click the "type or select a new platform" drop-down box, select "x64", then click "OK"

4). Configuration complete, you can see the project platform has become x64, click Close to complete.

4 , click View --" Property Manager . once configured in the property manager , It is equivalent to a common configuration , and No additional configuration is necessary for the new project !!!

32-bit or 64-bit configuration as required. Note: Since 2.4.1, Debug and release will conflict, there will be debug can run but release can not run the situation. So I need to reconfigure the switch between debug and release.

Click the VC + + directory on the left, edit the executable directory on the right, include the directory and the library directory, add the corresponding path respectively.

The corresponding path is as follows:

1) executable file directory // This ignore, this can not configure!!!!

C:\Program Files\opencv244\opencv\build\x86\vc10\bin

Description: 1, according to their own situation, will be changed to your Opencv\build\x86\vc10\bin folder where the path;

2, if it is a 64-bit system, you can change the Opencv\build\x86\vc10\bin to Opencv\build\x64\vc10\bin.

2) Include directory

C:\Program Files\opencv244\opencv\build\include

C:\Program FILES\OPENCV244\OPENCV\BUILD\INCLUDE\OPENCV

C:\Program Files\opencv244\opencv\build\include\opencv2

Description

1, according to their own circumstances, will be changed to your

    • Opencv\build\include, OPENCV\BUILD\INCLUDE\OPENCV, and Opencv\build\include\opencv2 folders are located in the same path;

2. The Include directory below the build folder is not selected as the Include folder under the same root directory as the build folder.

3, if the 64-bit configuration is not successful, you can try to include the following path is included in

D:\Program Files\opencv\include

D:\Program FILES\OPENCV\INCLUDE\OPENCV

D:\Program Files\opencv\include\opencv2

D:\Program Files\opencv\modules\androidcamera\include

D:\Program Files\opencv\modules\calib3d\include

D:\Program Files\opencv\modules\contrib\include

D:\Program Files\opencv\modules\core\include

D:\Program Files\opencv\modules\features2d\include

D:\Program Files\opencv\modules\flann\include

D:\Program Files\opencv\modules\gpu\include

D:\Program Files\opencv\modules\highgui\include

D:\Program Files\opencv\modules\imgproc\include

D:\Program Files\opencv\modules\legacy\include

D:\Program Files\opencv\modules\ml\include

D:\Program Files\opencv\modules\nonfree\include

D:\Program Files\opencv\modules\objdetect\include

D:\Program Files\opencv\modules\ocl\include

D:\Program Files\opencv\modules\photo\include

D:\Program Files\opencv\modules\stitching\include

D:\Program Files\opencv\modules\ts\include

D:\Program Files\opencv\modules\video\include

D:\Program Files\opencv\modules\videostab\include

D:\Program Files\opencv\modules\world\include

3) Library Directory

C:\Program Files\opencv244\opencv\build\x86\vc10\lib

Description: 1, according to their own situation, will be changed to your Opencv\build\x86\vc10\lib folder where the path;

2, if it is a 64-bit system, you can change the opencv\build\x86\vc10\lib to Opencv\build\x64\vc10\lib.

5. Additional Dependencies

Click linker → Enter → additional dependencies, as shown in.

As shown in the additional dependencies, add the Lib file name in the Opencv\build\x86\vc10\lib folder:

Debug mode, additional dependencies are placed in the

Opencv_calib3d243d.lib

Opencv_contrib243d.lib

Opencv_core243d.lib

Opencv_features2d243d.lib

Opencv_flann243d.lib

Opencv_gpu243d.lib

Opencv_haartraining_engined.lib

Opencv_highgui243d.lib

Opencv_imgproc243d.lib

Opencv_legacy243d.lib

Opencv_ml243d.lib

Opencv_nonfree243d.lib

Opencv_objdetect243d.lib

Opencv_photo243d.lib

Opencv_stitching243d.lib

Opencv_ts243d.lib

Opencv_video243d.lib

Opencv_videostab243d.lib

Release mode, additional dependencies are placed in the

Opencv_calib3d243.lib

Opencv_contrib243.lib

Opencv_core243.lib

Opencv_features2d243.lib

Opencv_flann243.lib

Opencv_gpu243.lib

Opencv_haartraining_engine.lib

Opencv_highgui243.lib

Opencv_imgproc243.lib

Opencv_legacy243.lib

Opencv_ml243.lib

Opencv_nonfree243.lib

Opencv_objdetect243.lib

Opencv_photo243.lib

Opencv_stitching243.lib

Opencv_ts243.lib

Opencv_video243.lib

Opencv_videostab243.lib

Note: The above library is the library file inside the Opencv\build\x86\vc10\lib, the file name is followed by the lowercase letter "D" for the Debug library (debug mode library), there is no "D" for the release library (release mode library). End of 244

Is the version number, and your lib inside the same file. For example, the OpenCV2.4.3 lib file has a number at the end of 243. If the versions are different, correct them and make them consistent.

The rest is the test, you go online to find a play it! (The above content is from the Internet)

Appendix: OpenCV Lib

Opencv_calib3d243.lib
Opencv_contrib243.lib
Opencv_core243.lib
Opencv_features2d243.lib
Opencv_flann243.lib
Opencv_gpu243.lib
Opencv_haartraining_engine.lib
Opencv_highgui243.lib
Opencv_imgproc243.lib
Opencv_legacy243.lib
Opencv_ml243.lib
Opencv_nonfree243.lib
Opencv_objdetect243.lib
Opencv_photo243.lib
Opencv_stitching243.lib
Opencv_ts243.lib
Opencv_video243.lib
Opencv_videostab243.lib

Opencv_calib3d243d.lib
Opencv_contrib243d.lib
Opencv_core243d.lib
Opencv_features2d243d.lib
Opencv_flann243d.lib
Opencv_gpu243d.lib
Opencv_haartraining_engined.lib
Opencv_highgui243d.lib
Opencv_imgproc243d.lib
Opencv_legacy243d.lib
Opencv_ml243d.lib
Opencv_nonfree243d.lib
Opencv_objdetect243d.lib
Opencv_photo243d.lib
Opencv_stitching243d.lib
Opencv_ts243d.lib
Opencv_video243d.lib
Opencv_videostab243d.lib

(Kate) opencv-2.4.3 installation under Win8-64 bit system and configuration in visual_studio2010

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.