OpenCV environment configuration

Baidu Baike:

OpenCV is a cross-platform computer vision and machine learning software library distributed under the BSD license (open source) that runs on Linux, Windows, Android, and Mac OS operating systems. It is lightweight and efficient — it consists of a series of C functions and a small number of C++ classes. It also provides interfaces to Python, Ruby, MATLAB and other languages and implements many common algorithms in image processing and computer vision.

OpenCV is written in C++, it has C++, Python, Java and MATLAB interfaces, and supports Windows, Linux, Android and Mac OS, OpenCV mainly tends to real-time visual applications, and utilizes MMX and SSE instructions when available, Support for C#, Ch, Ruby, and GO is also available.

Software development Networking Group

QQ group: 686809487

Website:opencv.org/
Version: OpenCV – 4.5.1

Development tools: Microsoft Visual Studio Community 2019
Environment configuration

New project

Selected Release | x64 right-click select Properties set Properties

The Include Directories set

Path:

opencv\build\include\opencv2

opencv\build\include

The Library Directories set

Path:

opencv\build\x64\vc15\lib

Linker -> Input -> Additional Dependencies set

The preview image
#include <iostream> #include <opencv2/opencv.hpp> #include "QuickDemo.h" using namespace cv; Int main () {/ / read the file Mat SRC = imread (" C: / / opencv/project/project/C opencv_01 / images/persons. The PNG ", IMREAD_UNCHANGED); if (src.empty()) { return -1; } namedWindow("input", WINDOW_AUTOSIZE); imshow("input", src); waitKey(0); destroyAllWindows(); return 0; }Copy the code

Follow wechat public number, he Xiao background reply OpenCV to obtain the relevant code