mirror of
https://github.com/opencv/opencv.git
synced 2024-11-26 20:20:20 +08:00
16 lines
256 B
Python
Executable File
16 lines
256 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import cv2.cv as 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
|
|
cv.DestroyAllWindows()
|