Check for consistent camera number

This commit is contained in:
David PAGNON 2024-02-19 13:30:27 +01:00 committed by GitHub
parent f9b236a6cd
commit ecd39ff943
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -604,6 +604,12 @@ def triangulate_all(config):
frames_nb = f_range[1]-f_range[0]
n_cams = len(json_dirs_names)
# Check that camera number is consistent between calibration file and pose folders
if n_cams != len(P):
raise Exception(f'Error: The number of cameras is not consistent:\
Found {len(P)} cameras in the calibration file,\
and {n_cams} cameras based on the number of pose folders.')
Q_tot, error_tot, nb_cams_excluded_tot,id_excluded_cams_tot = [], [], [], []
for f in tqdm(range(*f_range)):