def run_main():
# First initialize the camera capture object with the cv2.VideoCapture class.
camera = cv2.VideoCapture(camera_port)
#To create a new window for display
#Disabled it for now as we can't see the image on the cap
#cv2.namedWindow(display, cv2.WINDOW_NORMAL)
# Discard the first few frame to adjust the camera light levels
for i in xrange(ramp_frames):
temp = get_image(camera)
#Now take the image and save it after every 1 second
while(1):
try:
time.sleep(1)
take_save_image(camera)
except Exception, e:
print "Exception occured \n"
print e
pass
评论列表
文章目录