2012-11-23 19:57:22 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
2011-07-12 14:56:03 +02:00
|
|
|
import cv2.cv as cv
|
2010-05-11 19:44:00 +02:00
|
|
|
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
|
2012-03-19 00:21:54 +01:00
|
|
|
cv.DestroyAllWindows()
|