OpenCV imread(filename) fails in debug mode when using release libraries
I'll never get tired of telling people that the C++ OpenCV interface for Windows has the wierdest bugs.
Write a small test using the C interface to check if it works or not (cvLoadImage()
, etc).
Update: now that you know that the C interface works properly, you can either go to the mailing list and report this bug there or dig into the code yourself to find why it fails.
In release mode you must use release libraries, in debug mode - debug libraries. It is no bug.
Had this problem using Qt (Qt Creator), linking the debug version of the respective library fixed it. This can be done automatically in the project configuration file (.pro):
QTCreator .pro file: Setting LIBS path depending on DEBUG / RELEASE