diff --git a/fuse/fuse_trajectory.py b/fuse/fuse_trajectory.py index 839297d..2222c3c 100644 --- a/fuse/fuse_trajectory.py +++ b/fuse/fuse_trajectory.py @@ -193,7 +193,9 @@ def fuse(fixes_h5: str, poses_npz: str, out_h5: str, poses_world[i, :3, 3] = [t_xy[0], t_xy[1], z_world] xyz_world = poses_world[:, :3, 3] - rmse_m = float(residuals_2d[mask].mean()) + residuals_2d_refined = np.linalg.norm( + (scale_xy * (R2 @ src_xy[mask].T).T + t2) - dst_xy[mask], axis=1) + rmse_m = float(residuals_2d_refined.mean()) scale_out = scale_xy R_out = R3 t_out = t3