CV Stereo Calibrate (Chessboard)
Estimates the relative pose (R, T) between two cameras - and both sets of intrinsics unless they are pinned - from matched chessboard views (cv2.stereoCalibrate). Feed an IMAGE BATCH of stereo pairs (left and right views of the SAME board poses, same order); each pair is corner-detected independently and the matching 3-D/2-D correspondences are accumulated. Pre-calibrate each camera individually with 'Calibrate Camera' and feed BOTH K matrices here to PIN the intrinsics (CALIB_FIX_INTRINSIC - only R and T are then estimated, which is the recommended two-stage workflow); with one or neither K connected the intrinsics are estimated/refined here and any K you did pass is only an initial guess. Failure-tolerant: with fewer than 3 usable views returns found=false with identity R and zero T. Feed R, T, K, dist into 'cv2.stereoRectify' for rectification, then 'Stereo Disparity (SGBM)' for depth.
- images_left
- images_right
- K_left
- dist_left
- K_right
- dist_right
- K_left
- dist_left
- K_right
- dist_right
- R
- T
- rms_error
- found
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images_left | IMAGE | Batch of LEFT chessboard views (>= 3 usable pairs; ~10-20 gives a good fit). Must be in the same order as images_right. | |
| images_right | IMAGE | Batch of RIGHT chessboard views, same order/length as images_left. | |
| pattern_cols | INT | 92–40 | Inner corners per row (squares per row minus 1). |
| pattern_rows | INT | 62–40 | Inner corners per column (squares per column minus 1). |
| square_sizeopt | FLOAT | 1.000.0001–1000000 | Physical size of one square (e.g. mm); sets the world scale. Leave 1.0 for relative calibration. |
| K_leftopt | NPARRAY | 3x3 intrinsics for the left camera from 'Calibrate Camera'. Connect BOTH K_left and K_right to hold the intrinsics FIXED and solve only for R/T; on its own it is just an initial guess and still gets refined. Leave unconnected for a fresh estimate. | |
| dist_leftopt | NPARRAY | Left distortion coefficients from 'Calibrate Camera'. Also held fixed when both K matrices are connected. | |
| K_rightopt | NPARRAY | 3x3 intrinsics for the right camera. See K_left: both connected = intrinsics pinned, one alone = initial guess only. | |
| dist_rightopt | NPARRAY | Right distortion coefficients. |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| K_left | NPARRAY | Refined 3x3 intrinsic matrix for the left camera. |
| dist_left | NPARRAY | Refined distortion coefficients for the left camera. |
| K_right | NPARRAY | Refined 3x3 intrinsic matrix for the right camera. |
| dist_right | NPARRAY | Refined distortion coefficients for the right camera. |
| R | NPARRAY | 3x3 rotation matrix from left to right camera. |
| T | NPARRAY | 3x1 translation vector from left to right camera. |
| rms_error | FLOAT | Mean reprojection error in pixels; lower is better. |
| found | BOOLEAN | — |