fixed "The requested array has an inhomogeneous shape"

This commit is contained in:
davidpagnon 2024-01-08 14:48:19 +01:00
parent 4ce2cdbcfd
commit fe0a3e66c2

View File

@ -428,11 +428,12 @@ def triangulation_from_best_cameras(config, coords_2D_kpt, coords_2D_kpt_swapped
for id_swapped in range(len(id_cams_swapped))]
for id_off in range(len(id_cams_off))])
else:
coords_2D_kpt_calc_off_swap = np.array([[reprojection(projection_matrices_filt[id_off], Q_filt_off_swap[id_off][id_swapped])
for id_swapped in range(len(id_cams_swapped))]
for id_off in range(len(id_cams_off))])
x_calc_off_swap = coords_2D_kpt_calc_off_swap[:,:,0]
y_calc_off_swap = coords_2D_kpt_calc_off_swap[:,:,1]
coords_2D_kpt_calc_off_swap = [np.array([reprojection(projection_matrices_filt[id_off], Q_filt_off_swap[id_off][id_swapped])
for id_swapped in range(len(id_cams_swapped))])
for id_off in range(len(id_cams_off))]
# print(repr(coords_2D_kpt_calc_off_swap))
x_calc_off_swap = [c[:,0] for c in coords_2D_kpt_calc_off_swap]
y_calc_off_swap = [c[:,1] for c in coords_2D_kpt_calc_off_swap]
# Reprojection error
# print('x_files_filt_off_swap ', x_files_filt_off_swap)