前言:
不说废话,直接上图干净利落
4、链接器配置
6、将文件复制到C盘的C:\Windows\SysWOW64
和C:\Windows\System32
文件夹中
7、最后一步:运行测试环境,测试图片自己加进去,要用双斜杠。
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main()
{
Mat img = imread("C:\\Users\\Pictures\\test.jpg");
if (img.empty())
{
printf("Could not find the image!\n");
return -1;
}
imshow("ImputImage", img);
waitKey(0);
return 0;
}
能正常输出则说明配置成功。