(qw, qx, qy, qz)
| 6 | |
| 7 | # The reconstructed pose of an image is specified as the projection from world to the camera coordinate |
| 8 | def quat2rot(qw, qx, qy, qz): |
| 9 | R = np.array([ |
| 10 | [1 - 2 * (qy**2 + qz**2), 2 * (qx * qy - qz * qw), 2 * (qx * qz + qy * qw)], |
| 11 | [2 * (qx * qy + qz * qw), 1 - 2 * (qx**2 + qz**2), 2 * (qy * qz - qx * qw)], |
| 12 | [2 * (qx * qz - qy * qw), 2 * (qy * qz + qx * qw), 1 - 2 * (qx**2 + qy**2)] |
| 13 | ]) |
| 14 | return R |
| 15 | |
| 16 | def load_tum_gt(dataset_path): |
| 17 |