System information (version)
- OpenCV => 4.4.0.44
- Operating System / Platform => Ubuntu 18.04.5
- Compiler => Visual Studio Code
Detailed description
When I import matplotlib.pyplot and uses cv2.imshow the window will just close on any key I press except for spacebar and Esc. The following code will not run but it returns no error, it simply stop running. It started after I upgrade my opencv from 4.2 to 4.4. I had tried to import matplotlib only and other matplotlib modules and they does not cause any problem.
Matplotlib version 3.3.2
Steps to reproduce
import cv2
import matplotlib.pyplot
cap = cv2.VideoCapture("video/7.mp4")
while True:
(ret, frame) = cap.read()
cv2.imshow("Processed Output", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cv2.destroyAllWindows()
cap.release()
print("End")
frameis empty, e.g.cap.read()fails or at the end of the video?