Intrinsics Math
Intrinsics recover the camera matrix and distortion coefficients so raw frames can be undistorted before classification (and before extrinsic solve, which assumes already-rectified images).
Each calibration image contributes:
- Object points: known 3D checkerboard corners in the board frame (), spaced by
square_mon a(9,6)internal-corner grid. - Image points: the same corners detected in the photo (
findChessboardCorners+cornerSubPix).
OpenCV’s calibrateCamera / calibrateCameraRO estimates , distortion, and a per-image board pose by minimizing reprojection error: after projecting object points with the estimated pose and camera model, how far (in pixels) the predicted corners sit from the detections.
Our scripts seed from the lens datasheet (focal length and sensor size at 1920×1200) with CALIB_USE_INTRINSIC_GUESS, and typically fix (CALIB_FIX_K3) so the radial model stays plus tangential terms unless otherwise configured.
Output
Section titled “Output”seecam_calibration_{l|r}.yaml stores roughly:
camera_matrix:dist_coeffs: distortion vectorreprojection_error: scalar summary from the solve
At runtime, SeeCamManager loads that YAML, builds undistort maps from getOptimalNewCameraMatrix, and (for the right camera) rotates each frame 180°. Extrinsics must use the same runtime pixel space; see projection math.
Validation
Section titled “Validation”validate_rect_calibration.py re-detects boards on a held-out split, runs solvePnP with the saved /distortion, projects corners, and reports mean / max pixel error. Script target: mean ≤ 1.0 px.
Board poses should span the field of view. Center-only captures leave distortion and principal-point terms weakly constrained even when mean training error is low.
Procedure steps: calibration procedure.
