Opencv 3.1.0 + vs2015 development environment configuration tutorial

Time:2020-10-26

This example for you to share the Android Jiugongge picture display of the specific code, for your reference, the specific content is as follows

1、 Preparatory work

a. Vs2015 environment

b. From https://opencv.org/ download

2、 Start installation

a. Double clickThe following configuration installation path is obtained:

b. Set a path and click extract to start the installation

3、 Configure environment variables

After the above steps are completed, you need to configure the environment variables of the computer: Computer – properties – advanced system settings:

Click Advanced system settings as follows:

Click environment variable: add the following to the system variable path: D: opencv3.1.0 / opencv / build / x64 / vc14 / bin

Pay attention to change the front to your own corresponding path

Click OK to restart the computer. Be sure to restart the computer.

4、 Configuration item

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

In the configuration properties – VC directory, modify the included 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, linker input additional dependency:

opencv_world310.lib

After confirmation, test with the following code:

#include<iostream>  
#include <opencv2/core/core.hpp>  
#include <opencv2/highgui/highgui.hpp>  
 
 
using namespace cv; 
 
 
int main() 
{ 
  //Read in a picture (original game picture)  
  Mat img = imread("pic.jpg"); 
  //Create a window called the original game  
  Cvnamedwindow ("game original painting"); 
  //Display the original game picture in the window  
  Imshow (IMG); 
  //After waiting for 6000 MS, the window will close automatically  
  waitKey(6000); 
}

The following screen appears during operation:

The above is the whole content of this article, I hope to help you in your study, and I hope you can support developeppaer more.

Recommended Today

Let me also summarize the knowledge of nginx

Recently, I want to deeply study the related knowledge of nginx, so I summarize the following contents. Nginx configuration parameters Nginx common commands Nginx variable Virtual host configuration Nginx’s own module Fastcgi related configuration Common functions Load balancing configuration Static and dynamic separation configuration Anti theft chain What is nginx? Nginx is a free, open […]