Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

problem with reading image to Mat

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

problem with reading image to Mat

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>< iostream>

include <string>< string>

include <imgproc\imgproc.hpp>< imgproc\imgproc.hpp>

include <core\core.hpp>< core\core.hpp>

include <highgui\highgui.hpp>< highgui\highgui.hpp>

using namespace std; 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

problem with reading image to Mat

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();*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

problem with reading image to Mat

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 <iostream>
#include <string>

#include <imgproc\imgproc.hpp>  
#include <core\core.hpp>        
#include <highgui\highgui.hpp>        

include < string>

include < imgproc\imgproc.hpp>

include < core\core.hpp>

include < highgui\highgui.hpp>

using namespace std;

std; using namespace cv;

cv; Mat img;

Mat img;

int main(int argc, char *argv[])

{

*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