vc = cv2.VideoCapture("./video/1-208.mp4" )
while vc.isOpened():
# get a frame
ret, frame = vc.read()
if frame is None:
break
# show a frame
if ret == True:
frame = cv2.resize(frame,(400,400))
frame = detect(frame)
cv2.imshow("video", frame)
if cv2.waitKey(20) & 0xFF == ord('q'):
break
vc.release()
cv2.destroyAllWindows()
cv2读取视频文件并展示
最新推荐文章于 2024-04-04 20:57:10 发布