t_network.setDaemon(True) # setting daemon thread to exit t_network.start() tracker = Tracker(tracker_prop, tracker_lib_prop) # Threading Tracker t_tracker = ThreadTracker(tracker) t_tracker.setDaemon(True) t_tracker.start() window = GUI() cam.setGUI(window) cam.setLogger(logger_status) cam.setNetwork(network, t_network) cam.setTracker(tracker) cam.setNetworkParams(image_net_size, confidence) # Threading camera t_cam = ThreadCamera(cam) t_cam.setDaemon(True) t_cam.start() window.setNetwork(network, t_network) window.setTracker(tracker) if gui_cfg == 'on': window.show() # Threading GUI t_gui = ThreadGUI(window) t_gui.setDaemon(True) t_gui.start() sys.exit(window.app.exec_())
data = readConfig() cam, cam_depth = selectVideoSource(data) viz3d = None if cam_depth: viz3d = init_viz() window = GUI3D(cam, cam_depth) else: window = GUI(cam) window.show() estimator = Estimator(cam, cam_depth, viz3d, window, data["Estimator"]) # Threading camera t_cam = ThreadCamera(cam) t_cam.setDaemon(True) t_cam.start() t_cam_depth = ThreadCamera(cam_depth) t_cam_depth.setDaemon(True) t_cam_depth.start() # Threading estimator t_estimator = ThreadEstimator(estimator) t_estimator.setDaemon(True) t_estimator.start() # Threading GUI t_gui = ThreadGUI(window) t_gui.setDaemon(True) t_gui.start()