Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

imshow shows black screen

$
0
0
I did create a project where everything was running as intended. Then I reinstalled my system, copied the project and I get black screen when showing any frame of proccessed video. My simple code: #include #include "opencv2/opencv.hpp" #include #include using namespace cv; using namespace std; int main(int, char**) { VideoCapture cap("videofile.avi"); if (!cap.isOpened()) // check if we succeeded return -1; namedWindow("Frame", 1); for (;;) { Mat frame; if (!cap.read(frame)) { cerr << "Unable to read next frame." << endl; cerr << "Exiting..." << endl; exit(EXIT_FAILURE); } imshow("Frame", frame); if (waitKey(30) >= 0) break; } return 0; } The output I am getting: ![imshow output](/upfiles/14549184545223801.jpg) I have installed all possible codecs I. Even the FFMPEG which I didn't need last time I was running the project. There's also this log in console which has never been there before ***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>