A stereo calibration can be transferred between software packages without repeating image acquisition, provided both packages describe compatible camera models. The difficult part is not loading the files: it is preserving the meaning of every matrix, coefficient and coordinate. This procedure is for engineers moving an existing calibration into a different processing pipeline. You will build an explicit parameter mapping, check its geometry numerically, and validate the imported result before rectifying production images.
1. Inventory the calibration before importing
Start with the final estimated parameters, not every variable stored in the calibration workspace. Image rejection lists, optimization settings and intermediate estimates may be useful records, but they are not substitutes for the camera models.
- Identify the intrinsic parameters for each camera, including focal lengths, principal point and any skew term.
- Record the distortion model, coefficient names and coefficient order for each camera.
- Identify the relative rotation and translation, including which camera coordinates they transform.
- Record calibration image dimensions, translation units and camera identities.
- Check the destination's documented constructors and supported camera models.
Create a mapping sheet with columns for source field, meaning, units, destination field and required conversion. An unfamiliar variable name is not enough evidence to assign its meaning.
Keep the original files unchanged. Save the converted parameters separately, together with the mapping sheet and validation results. If the source model is unclear, the stereo calibration procedure explains the underlying quantities that a complete stereo solution needs.
2. Map intrinsics using a declared pixel convention
For column-vector projection, a common intrinsic matrix is:
Here, xd and yd are distorted normalized coordinates. The focal lengths fx and fy, principal point cx, cy, and matrix skew entry s are expressed in pixel coordinates.
Some formats store the transpose of this matrix because their equations multiply row vectors. Others store focal lengths and principal point separately. Matrix storage order in a file is also distinct from the mathematical use of row or column vectors.
- Reconstruct the source projection equation from its documentation.
- Convert that equation into the destination convention.
- Verify the result by projecting a normalized point with nonzero horizontal and vertical coordinates.
Check whether the source stores matrix skew directly or a normalized skew parameter. Those values cannot necessarily be copied unchanged.
Pixel origins also matter. If the first pixel center changes from coordinate 1 to coordinate 0, subtract 1 from both principal-point coordinates. Do not apply that shift merely because the programming language uses zero-based array indexing; confirm the camera model's actual coordinate convention.
For cropped or resized inputs, represent the pixel-coordinate change explicitly:
The offsets must include cropping and the resampler's pixel-center convention. The calibration image coverage guide helps distinguish image-geometry changes from inadequate target coverage.
3. Match distortion models before copying coefficients
Matching array lengths does not establish matching distortion models. A common radial-plus-tangential model uses the following equations, before conversion into pixels:
In this example, k1, k2, k3 are radial coefficients, while p1, p2 are tangential coefficients. A flat array might interleave these terms, while another format separates radial and tangential vectors.
- Match coefficients by their equations, not their positions in an array.
- Check whether the model maps ideal coordinates to distorted coordinates or describes the inverse relationship.
- Check for additional rational, prism, fisheye or other terms that the destination may not support.
Changing model direction is generally not equivalent to negating coefficients. Likewise, dropping unsupported terms changes the projection model rather than converting its format.
If the models differ, use a documented conversion method and quantify its approximation error across the image. Otherwise, retain the source projection implementation or recalibrate using a supported model.
The guide to interpreting distortion coefficients explains why coefficients must remain attached to their original model and image geometry.
4. Resolve rotation direction and translation units
Write the stereo transformation as an equation before constructing any destination object. One common convention is:
These equations assume column vectors, a proper rotation matrix and coordinates expressed in compatible units.
- Determine whether the source transforms left-camera points into right-camera coordinates or the reverse.
- Determine whether the destination expects that transformation or a camera pose.
- Convert the complete transformation if its direction must change.
A camera center is not generally the same quantity as transformation translation. Under the forward equation above, the right camera center expressed in left-camera coordinates is -transpose(R) × t.
If rotation is stored as a rotation vector, interpret it according to its documented definition. An axis-angle rotation vector is not a set of Euler angles. Quaternion component order and rotation direction also require explicit checks.
Confirm translation units from the calibration target dimensions or source documentation. Converting millimeters to meters requires multiplying translation by 0.001. Rotation and pixel focal lengths do not receive that scale factor.
5. Construct the destination objects explicitly
A typical destination requires separate camera models followed by a stereo model. Build them in that order rather than passing a workspace file directly into a constructor.
- Construct the left camera model from its converted intrinsics, distortion and image size.
- Construct the right camera model from its own converted values.
- Construct the stereo model using the documented relative transformation convention.
- Read the stored properties back and compare them with your mapping sheet.
Do not silently fill missing quantities with convenient defaults. A zero skew assumption may be appropriate for a supported model, but it should be deliberate. Image dimensions, coefficient counts and camera order should never be guessed.
Keep camera-model import separate from rectification settings. Output cropping, rectified focal length and output image dimensions may be choices made by the rectifier, not quantities copied from the original calibration.
Preserve camera serial identifiers or another stable identity mapping outside the mathematical model. A correct model assigned to the wrong image stream is still an incorrect stereo system.
6. Work through a numerical geometry check
Consider an illustrative undistorted pair with these hypothetical parameters:
- Both focal lengths are 800 pixels.
- Both principal points are at
(640, 480). - Relative rotation is the identity matrix.
- Translation from left coordinates to right coordinates is
(-120, 0, 0)millimeters.
These values are a calculation example, not specifications for any catalog camera.
For a point at (0, 0, 1200) millimeters in left-camera coordinates:
The depth equation here assumes a horizontal rectified pair with equal horizontal principal points and the stated disparity sign. It is not a general formula for arbitrary unrectified images.
If the destination expects the inverse transform, its translation becomes (120, 0, 0) millimeters for this identity-rotation example. For nonidentity rotation, use the complete inverse equation rather than only reversing translation signs.
Also test an off-axis point and points near the image edges. The centered example cannot expose every coefficient-order or skew error.
7. Validate the import before rectification
Use the same known three-dimensional points in the source and destination projection implementations. Compare their predicted raw-image coordinates for each camera separately.
As an initial software-equivalence target, consider a maximum difference below 0.01 pixel across a distributed test set when both implementations use the same model and numerical precision. This is an example acceptance threshold, not a statement of physical calibration accuracy. Set the actual threshold from your application's error budget.
| Check | What it isolates | Failure suggests |
|---|---|---|
| Left-camera projection agreement | Left intrinsic and distortion conversion | Layout, origin or coefficient mismatch |
| Right-camera projection agreement | Right intrinsic and distortion conversion | Wrong camera assignment or model mapping |
| Stereo point transformation | Relative pose conversion | Reversed transform or pose confusion |
| Positive depth for visible test points | Geometric consistency | Camera order or transformation error |
| Known physical length | Reconstruction scale | Translation-unit mismatch |
| Rectified vertical correspondence | Epipolar alignment | Pose, calibration or image-geometry error |
Source-to-destination agreement proves equivalence, not calibration quality. Independently check held-out target images and a known physical dimension.
For rectification, measure vertical coordinate differences between corresponding target points. Report the median, a high percentile and the maximum across the image, rather than relying on one central feature.
Use live stereo rectification for the subsequent processing pipeline. If aligned images still produce poor depth, follow the separate disparity-map troubleshooting procedure.
8. Diagnose failures without immediately recalibrating
A nearly constant projection offset suggests a principal-point or pixel-origin mismatch. Errors that grow toward image edges suggest distortion mapping, model mismatch or incorrect focal scaling.
Large stereo errors with good individual-camera projection agreement point toward the relative transformation. Wrong scale with otherwise plausible geometry points toward translation units or calibration target dimensions.
Check the actual images entering the pipeline. A stream may have been cropped, resized, rotated or already undistorted after calibration. Applying a raw-camera distortion model to an already corrected image introduces a second, unwanted correction.
A successful import also cannot repair acquisition-time errors. Moving targets captured at different times can disagree even when the static calibration is correct. Rolling readout can introduce additional motion-dependent differences.
Recalibration becomes appropriate when the original model is unavailable, unsupported terms produce unacceptable residuals, or the physical rig has changed. Refocusing, changing a lens, moving either camera or altering the sensor readout geometry can invalidate previously accepted parameters.
9. Check hardware identity before ordering replacements
Keep the existing rig if the problem is only a software convention mismatch. Calibration belongs to the actual optical assembly and operating configuration, not simply to a camera model number.
If hardware replacement is necessary, compare area scan cameras using the camera finder. Record the intended image dimensions, interface, shutter requirements and synchronization method before choosing a replacement.
The LS-CMR-0053 is a GigE example, while the LS-CMR-0166 is a USB3 example. Both list rolling shutters; neither interface alone establishes suitable stereo capture timing.
- Sensor format
- 1/1.7"
- Interface
- GigE
- Sensor format
- 1/1.7"
- Interface
- USB3
For optics, compare machine vision lenses in the lens finder. Verify image-circle coverage, mechanical compatibility, focus stability and the required field of view.
The LS-FFL-0602 and LS-FFL-0567 provide lens candidates with different listed sensor formats. Treat them as comparison options, not interchangeable replacements for an already calibrated assembly.
- Type
- Machine vision fixed
- Sensor format
- 1"
- Type
- Machine vision fixed
- Sensor format
- 1.1"
10. Release the imported calibration with a checklist
Before accepting the converted file, confirm:
- Each image stream is assigned to the intended camera model.
- Intrinsic layout and pixel origin match the destination equations.
- Distortion terms match by meaning, order and mapping direction.
- Relative rotation and translation use the documented transformation direction.
- Translation and reconstructed coordinates use declared physical units.
- Input dimensions, crop, resize and correction state match the model.
- Source and destination projections agree across the image.
- Held-out images meet the application's alignment and scale requirements.
- The converted file includes provenance and conversion notes.
Keep a fixed validation dataset so future library updates can be checked against the same evidence. Save both numerical results and the settings used to generate rectified images.
If new hardware is required, start with the camera system configurator. For selection help, use technical support with your required image geometry, capture timing and validation tolerances.
Questions
Can stereo calibration be transferred without recalibrating?
Yes, when the destination supports the source camera model and you can establish every parameter's meaning. Convert matrix layout, pixel coordinates, distortion ordering and the relative transformation explicitly. Confirm equivalent projections and physical scale before using the imported calibration for depth measurements.
Why does the imported intrinsic matrix appear transposed?
A stored matrix may be transposed because its software uses row-vector multiplication rather than column-vector multiplication. That does not automatically mean the camera model differs. Compare the documented projection equations, and distinguish mathematical transposition from how matrix elements are arranged in a file.
Can distortion coefficients be copied directly between formats?
Not safely without checking the model. Radial and tangential terms may be interleaved, separated or defined using different equations. Additional distortion terms may also be unsupported. Match each coefficient to its mathematical role, then test projected points near the center and image boundaries.
Why can rectification look correct while depth scale is wrong?
Translation units affect reconstructed scale but may not visibly spoil epipolar alignment. A model using meters where millimeters were intended can therefore produce plausible rectification and incorrect distances. Verify a known target dimension or baseline independently instead of judging the import only from image appearance.
When is recalibration preferable to parameter conversion?
Recalibrate when the physical assembly or optical settings have changed, the source model cannot be identified, or the destination cannot represent it accurately enough. First eliminate conversion errors using source-to-destination projection comparisons, because collecting new images will not explain an unresolved convention mismatch.



