I have some C++ code and everything was working fine with OpenCV except the function imread(file)
. It was finding correctly the file and loading the name, but it wasn't loading any data.
Mat pattImage = imread(fileName, 0);
After some reaserch on the web I realized that I was in debug mode but with the release OpenCV libraries, instead of the debug ones.
debug library: opencv_core231d.lib
release library: opencv_core231.lib
Though it is the tipical stupid error I thought this shouldn't have anything to do, the debug libraries are supposed to allow OpenCV code debugging while the release libraries allow faster execution of the code, but I don't understand why imread was failing.
Can anybody explain me the differences between debug and release libraries in OpenCV and why this error occurs?
Is it an OpenCV bug?
See Question&Answers more detail:os