반응형 비디오처리1 OpenCV - VideoCapture, VideoWriter 1. Import Library import sys import cv2 import matplotlib.pyplot as plt 2. VideoCapture Class # 원래 있던 비디오 반전 시켜줌 cap = cv2.VideoCapture('./data/Another Day of Sun.mp4') fps = round(cap.get(cv2.CAP_PROP_FPS)) delay = round(1000 / fps) while True: ret, frame = cap.read() inversed = ~frame cv2.imshow('frame', frame) cv2.imshow('inversed', inversed) if cv2.waitKey(delay) == 27: break cap.release() c.. 2022. 1. 3. 이전 1 다음 반응형