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.