--- /dev/null
+#!/usr/bin/env python
+
+"""Go image recognition."""
+
+from src import capture
+
+capture.main()
--- /dev/null
+#!/usr/bin/env python
+
+"""Go image recognition."""
+
+from src import timer
+
+timer.main()
def live(self, q):
"""Run live preview on the screen."""
clock = pygame.time.Clock()
- while True:
+ done = False
+ while not done:
if q:
try:
line = q.get_nowait() # or q.get(timeout=.1)
last = 0
clock = pygame.time.Clock()
- while True:
+ done = False
+ while not done:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
def take(self):
"""Take a new image from the camera."""
+ print "taking pic"
im = self.cam.get_image()
self.screen.display_picture(im)
im.save(self.saving_dir + "{0:0>3}.jpg".format(self.im_number), 'JPEG')
timers = (Timer(main_time, args.b[0], args.b[1]), Timer(main_time, args.b[0], args.b[1]))
if args.cam:
- capture = subprocess.Popen(['python', 'capture.py', '-c', '-d', str(args.d), '-r',
+ capture = subprocess.Popen(['python', 'src/capture.py', '-c', '-d', str(args.d), '-r',
str(args.r[0]),
str(args.r[1])], stdin=subprocess.PIPE)
last = 0