1 | initial version |
Thanks a lot. That cleared up something. The following code will take a snapshot with the web cam and save it in the directory of the code:
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)
cv.SaveImage('test1.jpg', img)
if cv.WaitKey(10) == 27:
break
cv.DestroyAllWindows()
2 | No.2 Revision |
Thanks a lot. That cleared up something. The following code will take a snapshot with the web cam and save it in the directory of the code:
import cv2.cv as cv
import cv.NamedWindow("camera", 1)
cv.DestroyAllWindows()
3 | No.3 Revision |
Thanks a lot. That cleared up something. The following code will take a snapshot with the web cam and save it in the directory of the code:
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)
cv.SaveImage('test1.jpg', img)
if cv.WaitKey(10) == 27:
break
cv.DestroyAllWindows()