Example #1
0
	def check_picture_action(self):
		print 'taking picture of check'
		time = str(datetime.now())

		camera = picamera.PiCamera()
		camera.start_preview(fullscreen = False, window=(400, 400, 640, 480))
		
		waiter = pic_window(self)
		self.wait_window(waiter.top)

		camera.capture(time+'.jpg')
		camera.stop_preview()

		im = Image.open(time+".jpg")
		text = image_to_string(im)
		im = im.resize((480, 270), Image.ANTIALIAS)
		photo = ImageTk.PhotoImage(im)

		self.df_pic_label.config(image = photo)
		self.df_pic_label.photo = photo

		try:
			self.deposit_amount = int(text)
			self.df_value_label.config("$"+monies+" detected")
		except:
			self.df_value_label.config("No money detected")
Example #2
0
	def security_picture_action(self):
		print 'taking security picture'
		time = str(datetime.now())

		camera = picamera.PiCamera()
		camera.start_preview(fullscreen = False, window=(400, 400, 640, 480))
		waiter = pic_window(self)
		self.wait_window(waiter.top)
		camera.capture(time+'.jpg')
		camera.stop_preview()

		self.security_pic = Image.open(time+".jpg")
		im = im.resize((480, 270), Image.ANTIALIAS)
		photo = ImageTk.PhotoImage(im)
		self.pf_pic_label.config(image = photo)
		self.pf_pic_label.photo = photo