https://sourceforge.net/projects/opencvlibrary/files/
选择合适的版本下载即可
这里使用opencv-3.1.0.exe执行
将需要bin目录加入到环境变量Path
D:\opencv\31\opencv\build\x64\vc14\bin
#include<opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
int main()
{
Mat src = imread("D:/Snipaste_2023-06-26_08-30-27.png");
if (src.empty()) {
printf("could not load image....\n");
}
namedWindow("test opencv stup", CV_WINDOW_AUTOSIZE);
imshow("test Opencv stup", src);
waitKey(0);
return 0;
}