question:
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, file C:\builds\master_PackSlave-win32-vc12-shared\opencv\modules\highgui\src\window.cpp, line 271
The cause of the problem is:
#include<opencv2\opencv.hpp> using namespace cv; intmain() { Mat picture =imread("E:\1.jpg");//The picture must be added to the project directory imshow("Test program", picture); waitKey(20150901); return 0; }
Lieutenant General Mat picture = imread("E:\\1.jpg"); That's it!