mirror of
https://github.com/opencv/opencv.git
synced 2024-12-18 19:38:02 +08:00
13 lines
204 B
Python
13 lines
204 B
Python
|
import cv
|
||
|
import time
|
||
|
|
||
|
cv.NamedWindow("camera", 1)
|
||
|
|
||
|
capture = cv.CaptureFromCAM(0)
|
||
|
|
||
|
while True:
|
||
|
img = cv.QueryFrame(capture)
|
||
|
cv.ShowImage("camera", img)
|
||
|
if cv.WaitKey(10) == 27:
|
||
|
break
|