nianticlabs / monodepth2

[ICCV 2019] Monocular depth estimation from a single image
Other
4.05k stars 949 forks source link

Questions about pose estimation #496

Open own295554312 opened 1 month ago

own295554312 commented 1 month ago

The problem I'm wondering about is line 112 in evaluate_pose.py

for i in range(1, len(gt_global_poses)): gt_local_poses.append( np.linalg.inv(np.dot(np.linalg.inv(gt_global_poses[i - 1]), gt_global_poses[i])))

I know the point of this code is to get the pose from frame i-1 to frame i nevertheless

np.dot(np.linalg.inv(gt_global_poses[i - 1]), gt_global_poses[i]))

This formula has already obtained the positional transformation from i-1 to i Why do we need to find the inverse matrix again?

own295554312 commented 1 month ago

我想知道的问题是 evaluate_pose.py 中的第 112 行

for i in range(1, len(gt_global_poses)): gt_local_poses.append( np.linalg.inv(np.dot(np.linalg.inv(gt_global_poses[i - 1]), gt_global_poses[i])))

我知道这段代码的目的是获取从第 i-1 帧到第 i 帧的姿势 然而:

np.dot(np.linalg.inv(gt_global_poses[i - 1]), gt_global_poses[i]))

这个公式不是已经得到了从 i-1 到 i 的位姿变换嘛 为什么还要再次求逆矩阵?