24,854
社区成员
发帖
与我相关
我的任务
分享
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file /tmp/opencv-20170224-1869-10nlf6f/opencv-2.4.13.2/modules/highgui/src/window.cpp, line 261
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv-20170224-1869-10nlf6f/opencv-2.4.13.2/modules/highgui/src/window.cpp:261: error: (-215) size.width>0 && size.height>0 in function imshow
(lldb)
#include <opencv2/opencv.hpp>
using namespace cv;
int main()
{
Mat srcImage = imread("1.jpg");
imshow("test", srcImage);
waitKey(6000);
return 0;
}