📜  leer video con opencv - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:44.302000             🧑  作者: Mango

代码示例1
import cv2

capture = cv2.VideoCapture('gato.avi')

while (capture.isOpened()):
    ret, frame = capture.read()
    if (ret == True):
        cv2.imshow("gato0", frame)
        if (cv2.waitKey(30) == ord('s')):
            break
    else:
        break

capture.release()
cv2.destroyAllWindows()