본문 바로가기

Development/Python

Displaying live webcam

728x90
#!/usr/bin/env python2.7
import cv

CAMERA_INDEX = 0

cv.NamedWindow("Video", cv.CV_WINDOW_AUTOSIZE)
capture = cv.CaptureFromCAM(CAMERA_INDEX)

while True:
    frame = cv.QueryFrame(capture)
    cv.ShowImage("w1", frame)


출처: http://calebmadrigal.com/intro-opencv-python/

반응형

'Development > Python' 카테고리의 다른 글

MAC + Macports + Python 2.7 + OpenCV  (0) 2014.09.21