OpenCV Error: Assertion failed
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow, fi le D:\opencv\sources\modules\highgui\src\window.cpp, line 269
The code is:
But I also tried cv::Mat patternImage = cv::imread("F:\opencv - Copy (2)\Pattern.jpg"); and cv::Mat patternImage = cv::imread("F:/opencv - Copy (2)/Pattern.jpg");
But the error is always the same.
In another computer I use vs2010 and opencv 2.32 this error does not exsit. But in this computer I use vs2013 and opencv 2.49 with opengl. I meet this error. Can anybody help me please. Thanks a lot.
Add: strange thing is the same code can run if I create another project, but when it added to my current project, it doesn't work.