Environmental configuration and use of OpenCV4.x on Vs2017

Environment configuration Ring environment with home

1. Configure the include directory
2. Configure the library directory
3. Configure the connector
4. Configure environment variables
5. Restart VS2015/VS2017
6. Test

Insert picture description here

Insert picture description here

Insert picture description here

Insert picture description here

Insert picture description here

Insert picture description here

1. Configure the include directory

Insert picture description here

2. Configure the library directory

Insert picture description here

3. Configure the connector

Insert picture description here

4. Configure environment variables

Insert picture description here

5. Restart VS2015/VS2017

6. Test

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

using namespace cv;
using namespace std;

int main(int argc, char** argv) {
    
    
	Mat src = imread("E:/cat.png");

	if (src.empty()) {
    
    
		printf("image is empty!!!");
		return -1;
	}

	namedWindow("image", WINDOW_AUTOSIZE);
	imshow("image", src);
	waitKey(0);
	destroyAllWindows();
	return 0;
}

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_41375318/article/details/112982656