Closed rEufrazio closed 4 years ago
Could someone please help me here? I'm two weeks in and still have the same problem.
I recently discovered that this just happens when I use the returned_frame in any way, even if I assign it to another variable.
Already updated and downgraded the library and dependencies to every possible option, and tried using the other "for" methods, with no success.
If anyone could help me in any way I would be very grateful.
I managed to solve the problem. It looks like the function will always display this message when anything wrong happens inside the forFrame() call. The error was being caused simply because I was calling the cv2.imshow() function incorrectly and not calling cv2.waitKey() inside the method.
The code I am trying to run is the one below, and it is almost identical to the one available at the documentation for "Video and Live-Feed Detection and Analysis":
The error is as follows:
I have already installed the latest version, v.2.1.5, and tried the YOLOv3 and TinyYOLOv3 models, both returning the same error. Also tried 2 different cameras.
At first I thought it might be the threading problem, as I was using the multithreaded solution from imutils, but it turns out that the same thing is happening with the cv2.VideoCapture.
Could you please help me out? I have no idea what is causing this problem.