OpenCV 3.1.0 + VS2015 Development Environment configuration tutorial, opencvvs2015

Source: Internet
Author: User

OpenCV 3.1.0 + VS2015 Development Environment configuration tutorial, opencvvs2015

The examples in this article share with you the specific code of the Android jiugongge image for your reference. The specific content is as follows:

I. Preparations

A. vs2015 Environment

B. Download from https://opencv.org/

Ii. Start Installation

A. Double-click the following installation path:

B. Set a path and click extract to start installation:

3. Configure Environment Variables

After completing the preceding steps, you need to configure the computer's environment variable: computer-> properties-> advanced system settings:

Click Advanced System settings as follows:

Click environment variable: Add: D: \ opencv3.1.0 \ opencv \ build \ x64 \ vc14 \ bin to the system variable path

Note that you need to change the corresponding path.

Click OK to restart the computer.

Iv. configuration items

A. After restarting the computer, create a project, right-click the project name, and select properties:

In the configuration properties-"vc" directory, modify the include directory:

D: \ opencv3.1.0 \ opencv \ build \ include \ opencv2

D: \ opencv3.1.0 \ opencv \ build \ include \ opencv

D: \ opencv3.1.0 \ opencv \ build \ include \

Click OK to modify the library directory:

D: \ opencv3.1.0 \ opencv \ build \ x64 \ vc14 \ lib

After confirmation, the linker-input-additional dependencies:

Opencv_world310.lib

After confirming, use the following code for testing:

# Include <iostream> # include <opencv2/core. hpp> # include <opencv2/highgui. hpp> using namespace cv; int main () {// read an image (original game image) Mat img = imread ("pic.jpg "); // create a window named "Game Original painting" cvNamedWindow ("Game Original painting"); // display the game original painting imshow ("Game Original painting", img) in the window ); // wait 6000 ms before the window closes waitKey (6000 );}

The following figure is displayed:

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.