#include<iostream>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main()
{
// 读入一张图片(游戏原画)
Mat imge = imread("img.jpg");
// 创建一个名为 "游戏原画"窗口
namedWindow("my image");
// 在窗口中显示游戏原画
imshow("my image", imge);
// 等待6000 ms后窗口自动关闭
waitKey(6000);
}
显示窗口出来了,但是没有图片。OpenCV Error: Assertion Failed (size.width>0 && size.height>0) in cv:imshow file 。
。。