Ask Your Question

Revision history [back]

im a beginner of opencv. plz help me

i've just installed opencv 3.3 ver and visual studio 17

whenever i run this code

include "cv.hpp"

include "iostream"

using namespace std; using namespace cv;

int main() {

Mat img;

img = imread("lena.png", 1);
if (img.empty())
    return -1;

imshow("img", img);

return 0;


a gary window advent but disappear without displaying lena.png.

i read others' code. some write namedWindow. others don't

but their results are same.

what is problem?? code ?? or settings?