Calibration¶
- class aquamvs.CalibrationData(cameras, water_z, interface_normal, n_air, n_water)[source]¶
Complete calibration data converted to PyTorch tensors.
- Parameters:
- cameras¶
Per-camera calibration data, keyed by camera name.
- Type:
- interface_normal¶
Interface normal vector, shape (3,), float32.
- Type:
- property ring_cameras: list[str]¶
Names of non-auxiliary cameras (sorted for determinism).
- Returns:
List of camera names where is_auxiliary=False, sorted alphabetically.
- class aquamvs.CameraData(name, K, dist_coeffs, R, t, image_size, is_fisheye, is_auxiliary)[source]¶
Per-camera calibration data as PyTorch tensors.
- Parameters:
- K¶
Intrinsic matrix, shape (3, 3), float32.
- Type:
- dist_coeffs¶
Distortion coefficients, shape (N,), float64. Pinhole: N=5 or N=8. Fisheye: N=4.
- Type:
- R¶
Rotation matrix (world to camera), shape (3, 3), float32.
- Type:
- t¶
Translation vector (world to camera), shape (3,), float32.
- Type:
- aquamvs.load_calibration_data(calibration_path)[source]¶
Load AquaCal calibration and convert to PyTorch tensors.
- Parameters:
calibration_path (str | Path) – Path to AquaCal calibration JSON file.
- Returns:
CalibrationData with all parameters as PyTorch tensors.
- Raises:
FileNotFoundError – If calibration file does not exist.
ValueError – If calibration file format is invalid.
- Return type:
- aquamvs.compute_undistortion_maps(camera)[source]¶
Compute undistortion remap tables and updated intrinsic matrix.
Dispatches between standard pinhole and fisheye OpenCV paths based on the camera’s lens model.
- Parameters:
camera (CameraData) – Per-camera calibration data from load_calibration_data().
- Returns:
Precomputed undistortion data for use with undistort_image().
- Return type:
UndistortionData