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.