while video.isOpened():
ret, frame = video.read()
if ret == True:
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)
cv2.imshow('video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break
ret, frame = video.read()
if ret == True:
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)
cv2.imshow('video', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
else:
break











本站有权保留或删除有争议评论。 参与本评论即表明您已经阅读并接受上述条款。