快乐虾
(QQ群:Visual EmbedLinux Tools 375515651)
欢迎转载,但请保留作者信息
# -*- coding: utf-8 -*- import cv2 #获得视频的格式videoCapture = cv2.VideoCapture(‘f:\\tmp\\test.mp4’) #获得码率及尺寸fps = videoCapture.get(cv2.cv.CV_CAP_PROP_FPS)size = (int(videoCapture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)), int(videoCapture.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT))) #读帧success, frame = videoCapture.read() while success :cv2.imshow("Video", frame) #显示cv2.waitKey(1000/int(fps)) #延迟success, frame = videoCapture.read() #获取下一帧
,这个是非调试的交互窗口,是不能访问当前测试代码的。
,不求与人相比,但求超越自己,要哭就哭出激动的泪水,要笑就笑出成长的性格。