I am trying to run this simple OpenCV program, but i got this error:
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file .../opencv/modules/highgui/src/window.cpp, line 276
Code:
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
cv::Mat inputImage = cv::imread("/home/beniz1.jpg");
cv::imshow("Display Image", inputImage);
return 0;
}
What's the cause of this error?