Пример #1
0
    def browse_excel(self):
        ExcelPath = askopenfilename(
            title='Sélectionner le fichier de paramètres',
            filetypes=[('Fichiers Excel', '*.xls;*.xlsx')])
        if not ExcelPath:  # Annulé
            return
        try:
            parameters_all = parameter_parser.get_parameters(
                ExcelPath, ExcelPath, get_all_params=True)
        except:
            messagebox.showerror(
                'Error', 'Impossible de charger le fichier de paramètres')
            return

        self.parameters_all = parameters_all
        self.ExcelPath.set(ExcelPath)
        self.Info.set('Fichier de paramètres chargé avec succès.')
        self.comboBoxID['state'] = 'readonly'
        self.comboBoxID['values'] = [
            params['Sensor_Label'] + ' (' + str(params['Sensor_ID']) + ')'
            for params in self.parameters_all
        ]
# construct the argument parse and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--ID", required=False, help="ID to look for")
args = vars(ap.parse_args())

if args["ID"]:
    with open('data/my_id.txt', 'w') as f:
        f.write(args["ID"])
        logger.info('Overwriting my_id.txt with ' + args["ID"])


# ****** Start up checks/get parameters ******
# Check file structure
file_paths = startup_checks.check_filesystem()

# Load parameters
parameters = parameter_parser.get_parameters()

if parameters['Debug_Mode']:
    print('Skimage starting in debug mode')
    

# ****** Start core processing ******
camera_core = core.CameraCore(parameters)

camera_core.camera_tracking_loop()