OpenCV Q&A Forum - RSS feed answersenCopyright <a href="">OpenCV foundation</a>, 2012-2018.Wed, 10 Jul 2019 09:33:44 -0500VideoCapture.read everybody, I have a problem with my soft but I don't know where the bug is. The purpose is only open the camera on my laptop then print every frame. I can open the camera but when I read with method, the output image seems to be "empty" because when I use imshow, it print a black image on the screen.. I tried to delay after initialization but it wasn't better. Have you ever had the same problem ? Otherwise, do you have an idea ? For information, I'm using Windows 10 The code is very simple: int main(int argc, char** argv) { Mat image; VideoCapture capture;; if(capture.isOpened()) { capture.set(CAP_PROP_FPS, 30); printf("Capture is open. fps = %f\n", capture.get(CAP_PROP_FPS)); namedWindow("Cam", WINDOW_AUTOSIZE); while(true){; imshow("Cam", image); if(image.empty()){ cout << "empty!" << endl; }else{ cout << "image OK -> " << mean(image) << endl; } if(waitKey(10) == 27) break; } } return 0; } Thank you for reading me and for your help :)img_uniWed, 10 Jul 2019 09:33:44 -0500