Hardware : RPi , LogiTech C310
Software : OpenCV 2.3.1
Python Code :
import cv2.cv as cv
import time
cv.NameWindow('capture',1)
cap = cv.CaptureFromCAM(-1)
cv.SetCaptureProperty(cap,CV_CAP_PROP_FRAME_HEIGHT,240)
cv.SetCaptureProperty(cap,CV_CAP_PROP_FRAME_WIDTH,320)
while True:
frame = cv.QueryFrame(cap)
cv.ShowImage('capture',frame)
currtime = time.time()
filename = 'images/'
filename += 'str(currtime)
filename += '.jpg'
cv.SaveImage(filename,frame)
##Wait 60 Seconds
time.sleep(60)
PS. I also install guvcview and tightvncserver
PS.Next step is to write a web-based to view theis photos
Comments