camera = CameraController() detector = MotionDetector(camera) # Start main output display namedWindow('Display') waitKey(20) namedWindow('Debug') # Start the dataloggers log = Datalogger('detection_log.log') imageprinter = Imagesave('captured_images') plotprinter = Graphsave('captured_plots') # Initialize output behaviours, the argument is the viewport they are going to use to display the output handwaves = Handwave('Display') cow = Cow('Display') speed = Speed('Display') coffetime = Coffee('Display') fastest = Fastest('Display') # List the effects, in order of precedence effect_list = [cow, fastest, coffetime, speed, handwaves] # Start camera controller thread # camera.start() key = -1 #while key != 27: # 1048603 while key == -1: # 1048603 # Update the detector camera.update() # For nonthreading camera
#! /usr/bin/env python ############################################################################### ## ## cow_test.py -- part of the bypasser program ## ## Copyright (c) 2014 Riccardo Sven Risuleo ## ## This software may be modified and distributed under the terms ## of the MIT license. See the LICENSE file for details. ## ############################################################################### import cv2 from behaviours.cow import Cow cv2.namedWindow('test') cv2.waitKey(20) moo = Cow('test') moo.push((0, 0)) print(moo.condition()) # Returns true 5% of the time XD moo.show()
#! /usr/bin/env python ############################################################################### ## ## cow_test.py -- part of the bypasser program ## ## Copyright (c) 2014 Riccardo Sven Risuleo ## ## This software may be modified and distributed under the terms ## of the MIT license. See the LICENSE file for details. ## ############################################################################### import cv2 from behaviours.cow import Cow cv2.namedWindow('test') cv2.waitKey(20) moo = Cow('test') moo.push((0,0)) print(moo.condition()) # Returns true 5% of the time XD moo.show()