VS2017配置OpenCV3.4.1详细步骤转载自:https://blog.csdn.net/qq_41175905/article/details/80560429
如果按照上述步骤配置OpenCV后,出现了以下问题
我的解决方法是:
1.将上述步骤中添加vc14文件夹的步骤改换成添加vc15文件夹
2.将图片中的3个dll文件放入C:\Windows\System32目录下
代码转自:https://blog.csdn.net/qq_41175905/article/details/80560429
实例程序:
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main()
{
// 读入一张图片(poyanghu缩小图)
Mat img = imread("F:\\Classity\\test\\1.jpg");
// 创建一个名为 "图片"窗口
namedWindow("图片");
// 在窗口中显示图片
imshow("图片", img);
// 等待6000 ms后窗口自动关闭
waitKey(6000);
system("pause");
return 0;
}