[python] frame show form video file

#! /usr/bin/python
import cv2
vc = cv2.VideoCapture('video.mp4')
c=1
fps = 24
if vc.isOpened():
    rval , frame = vc.read()
else:
    rval = False
while rval:
    rval, frame = vc.read()
    cv2.imshow("Result",frame)
    cv2.waitKey(1000 / fps);
vc.release()

댓글

이 블로그의 인기 게시물

파이썬으로 Homomorphic Filtering 하기

파이썬으로 2D FFT/iFFT 하기: numpy 버전