Stereo calibration establishes how two cameras turn the same physical scene into corresponding image coordinates. You need reliable paired observations, a target with known dimensions, and camera mounts that remain fixed afterward. A calibration app is convenient, but the underlying workflow does not depend on one. This procedure takes you from checkerboard measurements through intrinsic calibration, relative pose estimation, rectification, and independent checks before calculating your first disparity map.
1. Define the setup and freeze the optics
Use two cameras with overlapping views, suitable lenses, a rigid mounting arrangement, and a flat checkerboard. Your software needs corner detection, camera calibration, stereo calibration, and stereo rectification functions. Obtain software and documentation through the manufacturer or its authorized distributors.
Calibrate at the image resolution, crop, focus, and optical configuration you intend to use. Disable autofocus and avoid changing zoom afterward. If automatic exposure makes the board inconsistent between images, use fixed exposure settings that preserve clear black-to-white transitions.
The calibration produces several separate results:
- Intrinsic parameters for each camera, including focal lengths and principal point in pixel coordinates.
- Lens distortion coefficients for each camera.
- Rotation and translation describing the relationship between the cameras.
- Rectification transforms and image remapping tables for the chosen output size.
The baseline is the distance between the camera centers, not the distance between housing edges. Its calibrated value inherits the units used for the target dimensions.
Choose the physical arrangement before collecting images. The wide-baseline stereo camera selection guide explains the trade between depth sensitivity and matching difficulty.
2. Choose cameras, lenses, and a stable mount
Browse area scan cameras and use the camera finder to compare interface, shutter type, sensor format, and resolution. For moving scenes, verify hardware synchronization capabilities and exposure timing in the selected camera documentation. An interface name alone does not establish synchronization support.
The LS-CMR-0053 and LS-CMR-0166 are rolling-shutter cameras with GigE and USB3 interfaces, respectively. Treat them as acquisition options to evaluate, not as a recommendation to combine unlike cameras into a stereo pair. Rolling-shutter acquisition requires particular care when either the target or camera moves.
| Specification | LS-CMR-0053 | LS-CMR-0166 |
|---|---|---|
| Resolution | 4000 px x 3000 px | 4000 × 3000 (12MP) |
| Pixel size | 1.85 μm x 1.85 μm | 1.85 μm |
| Max. frame rate | 9 fps | 30 fps |
| Sensor model | IMX 226 | Sony IMX226 |
| Shutter | Rolling Shutter | rolling shutter |
| Data interface | GigE | USB 3.0 |
| Pixel bit depth | 8 / 10 / 12 bits | 10-bit |
| Price | $560.00 | $560.00 |
All 2 share: Sensor size 1/1.7". Values as printed in each product's data sheet; open a part for its drawing and full specifications.
Matching camera and lens configurations simplify commissioning, although calibration can accommodate different intrinsics. Check lens mount compatibility, image-circle coverage, focus range, and usable sharpness across the shared view.
Use the machine vision lenses category and lens finder to narrow these requirements. The LS-FFL-0567 is a C-mount lens candidate whose suitability still depends on your required coverage and working distance. It is not a universal stereo lens recommendation.
- Type
- Machine vision fixed
- Sensor format
- 1.1"
- Mount
- C-mount
- Resolution
- 16-25 MP
A stand is useful during data collection, but the relationship between the cameras must remain rigid. The LS-MNT-0068 is a camera stand with a glass tray. Check mounting provisions and rigidity before selecting it for a particular arrangement.
- Type
- Camera stands with glass tray
Compare camera stands through the accessories finder. A rigid common support matters more than convenient independent adjustment once calibration begins.
3. Measure the checkerboard and define its coordinates
-
Count inner corners rather than squares. A board with 10 columns and 7 rows of squares has 9 by 6 inner corners, giving 54 corner observations per image. Confirm which dimension your detector calls rows and which it calls columns.
-
Measure the actual square spacing. Do not assume the printed target retained its intended size. Measure several intervals in both directions, then divide by the number of intervals. Unequal horizontal and vertical scaling invalidates a model that assumes equal square dimensions.
-
Create a consistent target coordinate system. For a flat target, assign each corner coordinates
(i × s, j × s, 0), wheresis the measured spacing. Use the same point ordering in every image and both cameras.
For example, with 20 mm spacing, adjacent object points differ by 20 mm. A corner four intervals along the first axis and three along the second has coordinates (80, 60, 0) in millimeters.
Choose enough image sampling for reliable corner localization. As an illustrative sampling target, a 20 mm square spanning 200 pixels across a 240 mm field requires:
This is sampling arithmetic, not a universal detector requirement. Corner quality also depends on focus, contrast, perspective, and blur.
Keep a border around the pattern so the detector can distinguish its outer squares. The target coverage and margin guide helps plan framing. For target construction, use the calibration target flatness guide to decide whether a mounted print is adequate.
4. Capture paired images with useful pose diversity
-
Acquire both images at the same target pose. Use verified synchronization when the board moves. If synchronization is unavailable, stop the board completely and leave it stationary until both exposures finish. Pairing files by similar timestamps does not correct movement between exposures.
-
Vary orientation, distance, and position. Start with roughly 20–30 usable pairs as a collection target, not a guarantee of accuracy. Include front-facing views, moderate tilts around both board axes, different distances, and coverage near the shared image boundaries.
-
Inspect each pair before keeping it. Reject motion blur, clipped highlights, severe defocus, incomplete required corner detections, and frames captured during board movement. Maintain a pair identifier so deleting one image also excludes its partner from the stereo dataset.
Do not collect every view with the board centered and parallel to the sensors. Those images provide little diversity for separating focal length, pose, and distortion effects. Conversely, extreme tilts can make squares too narrow for reliable localization.
Keep the camera assembly fixed while moving the target. A changed baseline halfway through collection creates observations that no single stereo model can explain.
Reserve several additional poses for validation. Do not include those images in the parameter fit.
5. Estimate intrinsics, then solve relative pose
-
Detect and refine corresponding corners. Run the detector on each original image, then refine corner locations to subpixel precision where supported. Overlay the detected grid and point indices. Check that paired indices describe the same physical corners, including any ordering reversals caused by target symmetry.
-
Estimate each camera's intrinsics. Supply target coordinates, detected image coordinates, and the correct image dimensions. Begin with a conventional distortion model appropriate to the lens. Add model complexity only when residual patterns and independent validation justify it.
-
Estimate the fixed relationship between cameras. Use matched target observations from the paired dataset. A useful starting workflow holds the independently estimated intrinsics fixed while fitting stereo rotation and translation. Joint refinement is another option when supported and backed by adequate data.
For one common transform convention:
Here, R is a rotation matrix and T is a translation vector. Confirm your library's convention before exporting results; some interfaces report the inverse relationship.
Save per-view reprojection errors, not just the overall average. A small mean can hide one badly indexed pair or weak coverage near an image edge. Review suspect observations before removing them, and never delete views solely to obtain a more attractive score.
If calibration behaves implausibly, check dimensions, point order, and pose diversity before adding distortion coefficients. More parameters cannot repair incorrectly paired observations.
6. Rectify images using the calibrated geometry
-
Compute stereo rectification for the intended output geometry. Supply both intrinsic models, distortion coefficients, relative pose, and source image size. Select output size and cropping deliberately. Rectification can trade retained field of view against invalid borders and resampling.
-
Generate and apply the paired remapping tables. Process both images through the corresponding maps before disparity matching. Do not mix an undistorted image from one pipeline with a rectified image from another.
For a conventional horizontal stereo arrangement, rectification places corresponding scene points on approximately the same image row. It does not make their horizontal coordinates equal; that remaining horizontal displacement is the disparity.
Inspect rectified checkerboard images with horizontal reference lines. Corresponding corners should align vertically across the overlap, including near the edges. Black borders outside valid remapped regions are not scene observations and should be excluded from matching.
Keep the rectified camera matrices and depth-reprojection information alongside the maps. The effective focal length after rectification can differ from the original fitted focal length.
If the images will be resized afterward, adjust the geometry consistently. The safer initial implementation is to match at the calibrated rectification output size and validate that complete pipeline first.
7. Work through disparity and depth with explicit units
For a horizontal rectified pair with matching horizontal principal points and the usual positive-disparity convention, depth follows the pinhole relationship below. These numbers describe an illustrative application, not any listed product.
Use rectified focal length f_rect in pixels, baseline B in millimeters, and disparity d in pixels. The resulting depth Z is in millimeters. If rectified principal points differ, use the library's full reprojection model rather than this simplified equation.
Suppose the baseline is 100 mm, rectified focal length is 1200 pixels, and measured disparity is 60 pixels:
A useful first-order uncertainty estimate considers disparity uncertainty alone:
The assumed disparity uncertainty is 0.2 pixels. Calibration errors, target scale errors, mechanical movement, and poor correspondence can add further error.
Notice the squared dependence on distance. A calibration that works at a nearby plane does not establish acceptable depth performance throughout a much larger range.
Also confirm the disparity representation. Some matchers return scaled integer values rather than direct pixel disparities. Apply the documented conversion before calculating depth, and mask invalid or zero disparities.
8. Verify calibration before tuning the matcher
Use the held-out target pairs and independently measured distances. Evaluate geometry first, then matching behavior.
| Check | What to measure | What a failure suggests |
|---|---|---|
| Corner reprojection | Residuals by image and image region | Bad detections, inadequate poses, or an unsuitable lens model |
| Rectified alignment | Vertical difference between corresponding corners | Pairing errors, incorrect maps, or unstable calibration |
| Baseline plausibility | Calibrated camera-center separation versus mechanical estimate | Unit mistakes, scale errors, or transform misunderstanding |
| Known-distance depth | Reconstructed depth at several measured positions | Scale error, disparity conversion error, or incorrect reprojection geometry |
| Repeatability | Results after repeated captures without moving the setup | Timing, vibration, exposure, or detection instability |
For an illustrative commissioning budget, suppose vertical mismatch should remain below 0.5 pixels for most validation corners. Examine the median, a high percentile, and the maximum rather than reporting only the mean. This is a chosen acceptance target, not a universal calibration standard.
Verify depth near the image center and toward the overlap boundaries. Report invalid measurements separately instead of averaging them into a depth statistic.
A known-distance check must reference the appropriate camera coordinate frame, not an arbitrary housing surface. The image-marker measurement calibration guide explains why coordinate definitions and independent measurements matter.
Once geometric checks pass, use stereo disparity troubleshooting after rectification for missing matches, incorrect disparity ranges, and matching artifacts. Changing matcher settings cannot correct an incorrect stereo transform.
9. Recognize when this workflow needs modification
A conventional checkerboard and pinhole distortion model are not always sufficient. Strongly wide-angle optics may need a different camera model. A target that bends or changes dimensions cannot supply stable metric geometry.
If the cameras do not share enough view of the same target, reconsider the target size and placement. Separate monocular calibrations alone do not establish the relationship between cameras; the stereo pose still requires shared geometric information.
Motion during rolling-shutter readout can distort the board even when both cameras receive the same trigger. Stop the target during calibration, then separately validate the cameras under the application's actual motion conditions.
Do not use disparity as a substitute for a risk assessment or a safety-rated sensing function. Ordinary stereo inspection geometry does not establish a safety function.
Recalibrate or validate after camera movement, lens replacement, focus adjustment, or changes to image geometry. The calibration recovery guide helps distinguish a configuration change from a mechanical shift.
10. Check the record before ordering or deployment
- Record target spacing, units, inner-corner dimensions, and physical condition.
- Confirm both views contain enough shared target coverage at useful orientations.
- Verify lens mount, image-circle coverage, focus range, and mounting clearance before ordering.
- Confirm synchronization requirements against documented camera capabilities.
- Save raw image pairs, detections, solver settings, and rejected-pair reasons.
- Version intrinsic parameters, stereo transforms, rectification maps, output size, and validation results together.
- Define acceptance limits for vertical alignment, depth error, and repeatability across the operating range.
- Repeat validation after final mounting and cable installation.
Start component selection with the camera configuration step. If the optical geometry or mounting arrangement remains uncertain, send the field of view, working range, motion conditions, and validation target to applications support before committing to a stereo assembly.
Questions
Can I calibrate a stereo pair without a dedicated calibration app?
Yes. You need software functions for detecting target points, estimating camera intrinsics, solving the relative camera pose, and generating rectification maps. A graphical application packages these operations but is not mathematically required. Use supported software obtained through legitimate channels, and retain the calibration inputs and settings for repeatability.
Do checkerboard image pairs need synchronized exposure?
The cameras must observe the target at the same physical pose. Hardware synchronization is useful when the target moves, but a completely stationary target can support sequential exposures. For moving production scenes, verify exposure timing and readout behavior separately; successful calibration with a stationary board does not prove motion compatibility.
Why are two independently calibrated cameras not enough for disparity?
The camera models and relative pose are separate results. Independent calibration describes each camera's projection and distortion, but stereo processing also needs their fixed spatial relationship. Estimate that relationship from shared observations, then rectify both views using a consistent output geometry before calculating disparity.
How many checkerboard pairs should I collect?
Start with roughly 20–30 usable pairs covering varied positions, tilts, and distances, then judge the result with independent validation images. Additional nearly identical views contribute little. Poor corner localization, incorrect dimensions, or target bending can make a large dataset less useful than a smaller, well-controlled collection.
When should stereo calibration be repeated?
Validate after any change that could alter projection or relative pose, including camera movement, focus adjustment, lens replacement, and image cropping or scaling. Some image-coordinate changes can be handled mathematically, but only when the complete transformation is known. Retain a reference target test to detect unexpected drift.

