OpenCV4 daily practice day1: VS2015+opencv4.1.0+ reading test

1. Configuration environment

VS2015 installation package: https://pan.baidu.com/s/1N1IffqHzXQ3l9O3R7MF0ZA Extraction code: rgjo
opencv 4.1.0 installation package: https://sourceforge.net/projects/opencvlibrary/files/4.1.0/opencv-4.1. 0-vc14_vc15.exe/download

Environment variable setting step1:
Insert picture description here
Environment variable setting step2:
Insert picture description here
Insert picture description here
Insert picture description here

2. Test procedure

Insert picture description here
Operation result (GIF animation):
Insert picture description here

3. Attached test code:

#include<opencv2\opencv.hpp>
#include<iostream>

using namespace std;
using namespace cv;

int main(int argc, char** argv)
{
    
    
	Mat img;
	img = imread("花子君.jpg");
	if (img.empty())
	{
    
    
		cout << "请确认图片文件名称是否正确" << endl;
		return -1;
	}
	imshow("test", img);
	waitKey(0);
	return 0;
}

Guess you like

Origin blog.csdn.net/weixin_43297891/article/details/114269043