Working caprue func

This commit is contained in:
HeshamTB 2018-11-22 02:11:54 +00:00
parent 3f710e9ab3
commit 50bb02ab67

View File

@ -4,7 +4,7 @@ import numpy as np
from picamera import PiCamera
from time import sleep
def capture(numberOfPhotos, path):
def capture(path):
try:
choice = input('Number of photos: ')
print('Initializing camera')
@ -14,7 +14,10 @@ def capture(numberOfPhotos, path):
sleep(2)
except:
print('[ Error ] Can not initialize PiCamera')
for i in range(0, numberOfPhotos):
camera.capture(path+i+'.jpg')
print('Captured '+str(i)'\nPath ('path+i+'.jpg)')
for i in range(0, choice):
camera.capture(path+str(i)+'.jpg')
print('Captured '+str(i)+'\nPath ('+path+str(i)+'.jpg)')
sleep(1)
capture('test/')