It takes 30 seconds to "imshow" a "VideoCapture" from USB cam. Why?
I just installed Python 3.7.4 and OpenCV-Python (using pip) on a reasonably fast desktop PC (I5, 16GB RAM). Using a UbiSoft WebCam that was meant for a Wii but appears in Device Manager as "USB camera" and works in Skype. Trying tutorial (tabs-spacing is messed up in this window; assume correct as it eventually works):
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while(True):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('video', gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
It eventually works but takes about 30 seconds to get the output video displayed.
Are you Nintendo camera?