I'm using Visual Studio 2012 with OpenCv 2.4.3 and I don't know if I'm doing sth wrong but I can't do the simplest imread(), because there is a problem with memory I think. Here is the code:
include <iostream>
include <string>
include <imgproc\imgproc.hpp>
include <core\core.hpp>
include <highgui\highgui.hpp>
using namespace std; using namespace cv;
Mat img;
int main(int argc, char *argv[]) { img = imread("lena.jpg", 1); namedWindow("Lena", CV_WINDOW_AUTOSIZE); imshow("Lena", img); waitKey();
return 0;
}
During debuging it stops at imread() and throws exception: Unhandled exception at 0x5B9665AF (msvcr90d.dll) in opencv_test.exe: 0xC0000005: Access violation reading location 0xCCCCCCCC.
If anyone knows what could be wrong, please help