Created
July 5, 2011 15:25
-
-
Save vo/1065053 to your computer and use it in GitHub Desktop.
Capture Image to Disk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from opencv import cv | |
from opencv import highgui | |
from datetime import datetime | |
capture = highgui.cvCreateCameraCapture(0) | |
for i in range(0, 15): | |
img = highgui.cvQueryFrame(capture) | |
filename = datetime.now().strftime("%Y-%m-%d %H:%M:%S.jpg") | |
highgui.cvSaveImage(filename, img) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment