📜  如何在opencv python代码示例中读取视频

📅  最后修改于: 2022-03-11 14:45:19.437000             🧑  作者: 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