biocv extension is now .calib

This commit is contained in:
davidpagnon 2024-02-27 11:36:56 +01:00
parent 05ffe7f36f
commit cc27642468

View File

@ -1296,13 +1296,15 @@ def calibrate_cams_all(config):
binning_factor = 1
elif convert_filetype=='easymocap': #intri.yml and intri.yml
convert_ext = '.yml'
file_to_convert_path = sorted(glob.glob(os.path.join(calib_dir, '*.yml')))
file_to_convert_path = sorted(glob.glob(os.path.join(calib_dir, f'*{convert_ext}')))
binning_factor = 1
elif convert_filetype=='biocv': # all files without extension
convert_ext = 'no'
list_dir = os.listdir(calib_dir)
list_dir_noext = sorted([os.path.splitext(f)[0] for f in list_dir if os.path.splitext(f)[1]==''])
file_to_convert_path = [os.path.join(calib_dir,f) for f in list_dir_noext if os.path.isfile(os.path.join(calib_dir, f))]
elif convert_filetype=='biocv': # all files without extension -> now with .calib extension
# convert_ext = 'no'
# list_dir = os.listdir(calib_dir)
# list_dir_noext = sorted([os.path.splitext(f)[0] for f in list_dir if os.path.splitext(f)[1]==''])
# file_to_convert_path = [os.path.join(calib_dir,f) for f in list_dir_noext if os.path.isfile(os.path.join(calib_dir, f))]
convert_ext = '.calib'
file_to_convert_path = sorted(glob.glob(os.path.join(calib_dir, f'*{convert_ext}')))
binning_factor = 1
elif convert_filetype=='anipose' or convert_filetype=='freemocap': # no conversion needed, skips this stage
logging.info(f'\n--> No conversion needed from AniPose nor from FreeMocap. Calibration skipped.\n')