Created
November 11, 2016 06:48
-
-
Save kieferbuch52/e5cc06210e17a591d174c4f5f5dabcf9 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env python | |
# coding:utf-8 | |
import cv2.cv as cv | |
import time | |
cv.NamedWindow("camera", 1) | |
capture = cv.CaptureFromCAM(0) | |
# 画像サイズの指定 | |
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_WIDTH,320) | |
cv.SetCaptureProperty(capture,cv.CV_CAP_PROP_FRAME_HEIGHT,240) | |
while True: | |
img = cv.QueryFrame(capture) | |
cv.ShowImage("camera", img) | |
if cv.WaitKey(10) > 0: | |
break | |
cv.DestroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment