📜  使用 opencv 读取视频 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:59.933000             🧑  作者: Mango

代码示例2
import cv2
frameWidth = 640
frameHeight = 480
cap = cv2.VideoCapture("Resources/test_ video.mp4")
while True:
    success, img = cap.read()
    img = cv2.resize(img, (frameWidth, frameHeight))
    cv2.imshow("Result", img)
    if cv2.waitKey(1) and 0xFF == ord('q'):
         break