def create_new_system_instance(self): # Generate system id and add new system instance instance_name = str(threading.get_ident()) self.system_reference_array.append( shared_variables.Shared_Variables(name=instance_name, config=self.config)) LOG.info("Created system with id " + str(instance_name), "SYSTEM-" + str(instance_name)) print("Created system with id " + str(instance_name))
def start_instance(): # Capture camera _camera_capture = cv2.VideoCapture(0) # initiate shared variables instance _shared_variables = shared_variables.Shared_Variables(_camera_capture) # detection Thread _shared_variables.start_detection_thread() # show camera thread _shared_variables.start_camera_thread()
def start_instance(instance_name,camera_id,camera_mode='NORMAL'): LOG.log("Capturing Camera %s" % camera_id, instance_name) # Capture camera _camera_capture = cv2.VideoCapture(camera_id) # initiate shared variables instance _shared_variables = shared_variables.Shared_Variables(instance_name, _camera_capture) # detection Thread _shared_variables.start_detection_thread() # tracking Thread _shared_variables.start_tracking_thread() # show camera thread _shared_variables.start_camera_thread(camera_mode)
def main(): LOG.log("Starting system", "SYSTEM") shared_var = shared_variables.Shared_Variables(name="shared_version") controll_thread = controller.parse_controller(shared_var) controll_thread.start()