OpenCV中遇到 Unhandled exception at 0x76E23EF2 in open.exe: Microsoft C++ exception

#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"

猜你喜欢

转载自blog.csdn.net/yefcion/article/details/79947025