当前位置:网站首页>How to install opencv? Opencv download installation tutorial

How to install opencv? Opencv download installation tutorial

2022-06-25 04:07:00 Program type

OpenCV It's based on BSD The license ( Open source ) Distributed cross-platform computer vision library , Can run in Linux、Windows、Android and Mac OS On the operating system . Let's introduce OpenCV How to download and install .

opencv How to install ?

Software preparation

step 1: Download on official website OpenCV Installation package , Because the server is abroad , You can also download through the cloud disk link shared by netizens

step 2: Open installation package , Select a path and click “Extract”

step 3:Visual Studio 2017 You can download the free community version directly from the Microsoft official website .

OpenCV Environment configuration of

step 1: Click on “ This computer ”, The right choice “ attribute ”

step 2: Click on “ Advanced system setup ”

  step 3: choice “ environment variable ”

  step 4: Choose “Path” Click on “ edit ”

step 5: Click on “ Edit text ”

step 6: Add... At the end “C:\opencv\build\x64\vc14\bin;” Click on “ determine ”, Then log off the computer before it takes effect

Visual Studio Configuration on

step 1: First, create a new one “Windows Console Application ” Project

step 2: find “ View ”->“ Other windows ”->“ Property Manager ”

step 3: Choose “Debug | x64” Under the “Microsoft.Cpp.x64.user ”, Right click on the “ attribute ”

step 4: Click on “VC++”, Choose “ Contains the directory ” Click the triangle Icon , find “ edit ”

step 5: Add the following path ( It depends on your installation position ):

C:\opencv\build\include\opencv2

C:\opencv\build\include\opencv

C:\opencv\build\include

And then click “ determine ”

step 6: Click on “VC++”, Choose “ The library catalog ” Click the triangle Icon , find “ edit ”

step 7: Add the following path ( It depends on your installation position ):

C:\opencv\build\x64\vc14\lib

And then click “ determine ”

step 8: find “ The linker ”->“ Input ” Under the “ Additional dependency ” Click on “ edit ”

step 9: Add the following information :

opencv_world340.lib

opencv_world340d.lib

And then click “ determine ”

step 10: find “ The linker ”->“ routine ” Under the “ Additional Library Directory ”, Click edit 、

step 11: Add the following path ( It depends on your installation position ):

C:\opencv\build\x64\vc14\lib

And then click “ determine ”

step 12: Here is a code to test whether the configuration is successful :

#include

#include

#include

using namespace cv;

int main()

{

// Read in a picture ( The original picture of the game )

Mat img = imread("pic.jpg");

// Create a file called " The original picture of the game " window

namedWindow(" The original picture of the game ");

// Display the original game picture in the window

imshow(" The original picture of the game ", img);

// wait for 6000 ms The back window closes automatically

waitKey(6000);

}

Finally, I will share some of my artificial intelligence learning materials for free , Including some AI Common framework actual combat video 、 Image recognition 、OpenCV、NLQ、 machine learning 、pytorch、 Computer vision 、 Videos such as deep learning and neural network 、 Courseware source code 、 Famous essence resources at home and abroad 、AI Hot papers 、 Industry reports, etc .

For better systematic learning AI, I recommend that you collect one .

Here are some screenshots , Free download method is attached at the end of the article .

One 、 Artificial intelligence courses and projects

Two 、 Famous essence resources at home and abroad

3、 ... and 、 Collection of papers on artificial intelligence

Four 、 AI Industry Report

Learn Artificial Intelligence well , Read more , Do more , practice , If you want to improve your level , We must learn to settle down and learn slowly and systematically , Only in the end can we gain something .

Click on the business card below , Scan the code and download the information for free .

原网站

版权声明
本文为[Program type]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250051510333.html