Ask Your Question

Revision history [back]

Unhandled exception at 0x00007FFB8B3F9159 in test1.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000A35178F4E0.

I've recently installed the OpenCV in Visual Studio. My little program reads and open an image it doesn't work bc of this error at the 'imshow' line. I don't understand exactly what I have to do for this error. I'll put here my code (a simple code for reading an image). Thank you so much

include<opencv2 opencv.hpp="">

include<opencv2 core="" mat.hpp="">

include<iostream>

using namespace std; using namespace cv;

int main() { Mat img = imread("lena.png"); namedWindow("image", WINDOW_NORMAL); imshow("image", img); //the error appears here and the name of it is Excepsion Unhandled (the compile step has been done successfully and the built too, but at Local Window Debugger Step (Run Step) it appears in the middle of process) waitKey(0); return 0; }

At the include lines I've mentioned this libraries: opencv2/opencv.hpp, opencv2/core/mat.hpp, iostream.

Unhandled exception at 0x00007FFB8B3F9159 in test1.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000A35178F4E0.

I've recently installed the OpenCV in Visual Studio. My little program reads and open an image it doesn't work bc of this error at the 'imshow' line. I don't understand exactly what I have to do for this error. I'll put here my code (a simple code for reading an image). Thank you so much

include<opencv2 opencv.hpp="">

#include<opencv2/opencv.hpp>
#include<opencv2/core/mat.hpp>
#include<iostream>
  

include<opencv2 core="" mat.hpp="">

include<iostream>

using namespace std; using namespace cv;

cv;

int main() { Mat img = imread("lena.png"); namedWindow("image", WINDOW_NORMAL); imshow("image", img); //the error appears here and the name of it is Excepsion Unhandled (the compile step has been done successfully and the built too, but at Local Window Debugger Step (Run Step) it appears in the middle of process) waitKey(0); return 0; }

}

At the include lines I've mentioned this libraries: opencv2/opencv.hpp, opencv2/core/mat.hpp, iostream.