Created
May 31, 2019 05:50
-
-
Save lockdef/635cd352a061a7596972435a4de48dcb to your computer and use it in GitHub Desktop.
OpenCVで動画を読み込むプログラムの雛形
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
ESC_KEY = 27 | |
cap = cv2.VideoCapture(0) | |
while True: | |
ret, frame = cap.read() | |
# | |
# ここに処理を書く | |
# | |
cv2.imshow('frame', frame) | |
if cv2.waitKey(1) == ESC_KEY: | |
break | |
cap.release() | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment