#include <opencv2\opencv.hpp>
using namespace cv;//包含cv命名空间
void main()
{
Mat srcImage = imread("C:\Users\yefci\Pictures\Saved Pictures\1.png");//这里的路径是直接从win资源管理器复制过来的
imshow("原始图片", srcImage);//显示图像
waitKey(0);//等待任意键按下
}
Unhandled exception at 0x76E23EF2 in open.exe: Microsoft C++ exception: cv::Exception at memory location 0x00CEF800.
会出现上面问题,解决办法如下:
修改路径名称:
"C://Users/yefci/Pictures/Saved Pictures/1.png"