I used Opencv to open my camera, then I want to show the image bu matplotlib. However, the frames freezes. Can I use matplotlib in real-time? Thank you!
cap = cv2.VideoCapture(0)
while (True):
ret, frame = cap.read()
if cv2.waitKey(1) & 0xFF == ord('q'):
break
plt.subplot(1,2,1), plt.imshow(frame, interpolation='nearest')
plt.show()