Print detailed calibration information.
(extrinsic: dict)
| 228 | |
| 229 | |
| 230 | def print_calibration_info(extrinsic: dict): |
| 231 | """Print detailed calibration information.""" |
| 232 | print("\n=== Extrinsic Calibration Info ===") |
| 233 | |
| 234 | # Show if baseline constraint was used |
| 235 | if extrinsic.get("stereoBaselineMeters"): |
| 236 | print(f"Stereo baseline constraint: {extrinsic['stereoBaselineMeters']*100:.1f} cm (enforced)") |
| 237 | |
| 238 | left_h2c = extrinsic.get("leftHeadToCamera") |
| 239 | left_cam_pos = None |
| 240 | if left_h2c: |
| 241 | T_head_camera = matrix_from_array(left_h2c) |
| 242 | # Camera pose in head frame = inverse of T_head^camera |
| 243 | T_camera_in_head = np.linalg.inv(T_head_camera) |
| 244 | left_cam_pos = get_position(T_camera_in_head) |
| 245 | print(f"\nLeft Camera pose in head frame:") |
| 246 | print(f" Position: x={left_cam_pos[0]*100:.2f}cm, y={left_cam_pos[1]*100:.2f}cm, z={left_cam_pos[2]*100:.2f}cm") |
| 247 | print(f" (Negative Z = in front of head)") |
| 248 | |
| 249 | right_h2c = extrinsic.get("rightHeadToCamera") |
| 250 | |
| 251 | |
| 252 | def print_intrinsic_info(intrinsic: dict): |
no test coverage detected