2014-06-12 12:10:14 -0600 | asked a question | OpenCV in VS10: Assertion Fail with imread() Function I am using OpenCV 2.4.9 in Visual Studio 2010 and am trying to run simple source code provided on a tutorial website: However, when I try to run the executable (and comment out that if statement) I get: Assertion failed (size.width>0 && size.height>0) in cv::imshow ......(file path) I have looked at just about every related thread I have found on here. The file path is not wrong, I have printed it out and even moved the executable and jpg to the same folder. Furthermore, this sample code from another tutorial does the exact same thing flawlessly, so I doubt it's a project configuration error but not sure: Can anyone explain why the second program works but not the first, and how I can fix the first one? P.S.: It's not that I need to find a workaround to accomplish something, I'm trying to run sample code to verify the installation works, but it apparently doesn't if one sample program runs but not the other. |