3D visionExplainer

Stereo calibration resolution mismatch: rescale or recalibrate?

Fix a stereo calibration resolution mismatch by rescaling known image transforms, rebuilding rectification, and checking measured dimensions.

LumaSpec Vision9 min read Share on LinkedIn

On this page 9 sections
  1. 01Decide whether the image geometry is known
  2. 02Transform intrinsics using the actual pixel mapping
  3. 03See how the mismatch changes triangulated coordinates
  4. 04Regenerate rectification for the processing images
  5. 05Recalibrate when the mapping cannot be established
  6. 06Verify image alignment and physical dimensions separately
  7. 07Choose acquisition hardware around a repeatable mode
  8. 08Checks before deployment or ordering
  9. 09Questions

Using calibration from one image size with another can produce plausible-looking stereo reconstructions with incorrect dimensions. The difficult part is deciding whether the new resolution represents a simple coordinate change or different camera geometry. This explainer is for engineers moving calibration between capture and processing resolutions. You will learn when to transform intrinsics, which stereo parameters must be regenerated, and how to verify the resulting coordinates without relying on a single calibration score.

Decide whether the image geometry is known

A resolution mismatch does not automatically require new target images. It requires calibration parameters that describe the exact images entering triangulation.

The deciding question is not simply whether the width and height changed. Ask how each output pixel relates to the original calibrated image.

Change between calibration and processing Can existing calibration be adapted? Required action
Full image resized with a known mapping Usually yes Transform intrinsics and regenerate rectification
Known crop, followed by known resizing Usually yes Include the crop offset and scale in the transformation
Known padding around an otherwise unchanged image Usually yes Shift the principal point by the padding offset
Different camera readout mode with undocumented geometry Not safely from dimensions alone Characterize the mapping or calibrate the operating mode
Lens focus, zoom, or camera mounting changed Image resizing alone is insufficient Revalidate and recalibrate the affected parameters
Images already rectified by another processing stage Not by treating them as raw images Obtain that stage's projection and rectification parameters

Changing file dimensions tells you the output array size, not the optical field of view or sensor region used. A smaller image might be a resized full frame, a central crop, or a different readout mode.

If calibration also crosses software packages, first resolve the conventions described in importing stereo calibration parameters across software formats. Correct resizing cannot repair a transposed rotation or an incorrectly interpreted translation.

Transform intrinsics using the actual pixel mapping

For the usual zero-skew camera model, the intrinsic matrix contains horizontal and vertical focal lengths in pixels and the principal point. A known resize or crop changes these pixel coordinates without moving the physical cameras.

K = [fx 0 cx] [ 0 fy cy] [ 0 0 1] x_new = sx × x_old + tx y_new = sy × y_old + ty A = [sx 0 tx] [ 0 sy ty] [ 0 0 1] K_new = A × K_old fx_new = sx × fx_old fy_new = sy × fy_old cx_new = sx × cx_old + tx cy_new = sy × cy_old + ty

Here, sx and sy are scale factors. The offsets tx and ty account for cropping, padding, and the resampler's pixel-coordinate convention.

Consider a full-frame resize from 640 × 360 pixels to 800 × 480 pixels:

sx = 800 / 640 = 1.25 sy = 480 / 360 ≈ 1.3333

The unequal factors mean the image is stretched differently along each axis. That is not inherently incompatible with calibration: separate horizontal and vertical focal lengths describe the known stretch. It is incompatible with simply multiplying every intrinsic parameter by one common factor.

Do not calculate these factors from dimensions unless the operation really resizes the entire calibrated image. If the input is first cropped, use the cropped dimensions to determine scale, and include the crop origin in the offsets.

Pixel-center conventions also matter. A resampler using the mapping below introduces a small translation as well as scaling:

x_new = sx × (x_old + 0.5) - 0.5 = sx × x_old + (sx - 1) / 2

Use the documented mapping of your imaging library rather than mixing conventions. With a standard normalized-coordinate distortion model, the distortion coefficients remain unchanged for a pure resize or crop represented by this intrinsic transformation. Pixel-based distortion formulations need their own documented conversion.

The separate guide to camera intrinsic parameter conversion explains why parameters must stay associated with their particular image stream.

See how the mismatch changes triangulated coordinates

The simplest rectified stereo depth equation assumes horizontal epipolar lines and equal horizontal principal points in the rectified images.

Z = fx_rect × B / d d = x_left - x_right

fx_rect is the focal length of the rectified projection in pixels. B is baseline length, and d is disparity in pixels. Depth has the same length unit as the baseline.

Suppose the original rectified focal length is 480 pixels, the baseline is 100 mm, and the measured disparity is 48 pixels:

Z = 480 × 100 / 48 = 1000 mm

Now resize both rectified images horizontally by 1.25. The corresponding focal length becomes 600 pixels, while disparity becomes 60 pixels:

Correct depth = 600 × 100 / 60 = 1000 mm Depth using the old focal length = 480 × 100 / 60 = 800 mm

This example produces a 20% depth underestimate despite otherwise correct correspondences. It illustrates a coordinate mismatch, not a predicted error for every stereo pipeline.

Incorrect principal points also affect lateral coordinates and can alter the depth denominator. When rectified horizontal principal points differ, the corresponding expression is:

Z = fx_rect × B / [d - (cx_left_rect - cx_right_rect)]

Use your rectified projection matrices or a correctly generated disparity-to-depth matrix rather than assuming the simpler equation always applies. The focal length needed here is not necessarily the focal length from the original raw calibration matrix.

Regenerate rectification for the processing images

Updating the intrinsic matrices is only part of the job. Rectification maps, projection matrices, and disparity-to-depth conversion must describe the same output geometry.

For a known transformation applied to raw images, use this sequence:

  1. Record the original image dimensions, calibration matrices, distortion model, and stereo extrinsics.
  2. Document the resize, crop, and padding applied independently to each camera stream.
  3. Transform each camera's intrinsic matrix into its new raw-image coordinates.
  4. Run stereo rectification using those transformed intrinsics, the existing distortion coefficients where applicable, and the unchanged physical stereo relationship.
  5. Generate new remapping tables for the selected rectified output size.
  6. Use the resulting rectified projection matrices and disparity-to-depth conversion together.

The stereo rotation and translation do not change merely because software resizes images. Do not scale the baseline when scaling focal lengths in pixels.

However, do not reuse old rectification maps against differently sized raw images. Those maps encode sample locations for a particular input geometry. Changing only an output-size argument does not necessarily update their meaning.

If you resize images after rectification, transform the rectified projection geometry instead. Matching resizes preserve horizontal epipolar alignment, but different vertical scales or offsets between cameras generally do not. Independent horizontal crops also change disparity offsets.

The workflow for offline image rectification from stored calibration data helps separate raw-image parameters from rectified-image parameters. Before matching, follow the checks for verifying that stereo frames are truly rectified.

Recalibrate when the mapping cannot be established

A different sensor mode may change the active sensor region, sampling pattern, or processing path. Some modes can be represented by a known crop and scale; others cannot be inferred reliably from the advertised dimensions.

Ask for the documented mapping between modes. Record the active region, binning or subsampling behavior, orientation, and any internal geometric correction. If that information is unavailable, calibrating the actual operating mode is usually more defensible than guessing.

Recalibration is also appropriate when the lens focus or zoom changes enough to affect the required accuracy. Camera movement requires renewed stereo extrinsic calibration, even if each camera's individual intrinsic parameters remain usable.

Downsampling introduces another limit: mathematical conversion does not restore image detail. Target corners and production features occupy fewer pixels, changing localization uncertainty. Use appropriate filtering, as described in antialiasing when downsampling or warping images.

A calibration captured at higher resolution can therefore be geometrically transferable but still fail the production accuracy requirement. Validate at the processing resolution rather than judging only the original calibration images.

Verify image alignment and physical dimensions separately

Start with held-out target images acquired in the operating mode. These should not be the same observations used to fit the calibration.

Project known target points into the transformed images and measure reprojection residuals. Report the median, a high percentile, and their distribution across the image. A low average can hide larger errors near the edges.

After rectification, measure vertical disagreement between corresponding target points. For horizontal stereo matching, those points should lie on matching image rows within the application's alignment tolerance. A pattern that grows with image height suggests a scale or rectification problem.

Residuals must also be interpreted in their coordinate system. Resizing an image changes pixel-valued residuals even when the underlying angular error is unchanged.

Then check metric accuracy using independently known dimensions and positions. For example, place a measured reference at 3 working distances and 9 image locations. That gives 3 × 9 = 27 validation conditions covering depth and field position.

Calculate dimensional error explicitly:

Relative error = (measured length - reference length) / reference length × 100% Example = (198 mm - 200 mm) / 200 mm × 100% = -1%

Choose pass limits from the inspection or guidance tolerance, accounting for reference uncertainty. Check depth and lateral dimensions rather than accepting one successful distance measurement.

A good reprojection score does not independently establish correct target scale, baseline units, or application accuracy. The discussion of calibration accuracy beyond reprojection error explains why physical checks are necessary alongside image residuals.

Choose acquisition hardware around a repeatable mode

Before choosing hardware, specify the image mode that calibration and production will share. Include sensor region, delivered dimensions, pixel format, orientation, and every geometric processing stage.

For separate-camera stereo, compare area scan cameras through the camera finder. Confirm synchronization and acquisition compatibility separately; an interface or resolution listing does not establish stereo timing performance.

The LS-CMR-0053 is a catalog candidate for an individual camera position. Its listing does not establish a validated stereo pairing.

Area scan cameras12 MP GigE area scan camera, IMX226, 1/1.7" rolling shutter, 9 fps (LS-CMR-0053)LS-CMR-0053
Sensor format
1/1.7"
Lens mount
C-mount
Interface
GigE
Resolution
12 MP
$560.00View partBuild a system with it

The LS-CMR-0166 is another catalog candidate to evaluate against your acquisition requirements. Confirm the required mode and integration behavior before building the stereo assembly.

Area scan cameras12 MP USB3 area scan camera, IMX226, 1/1.7" rolling shutter, 30 fps, 4000 × 3000 resolution (LS-CMR-0166)LS-CMR-0166
Sensor format
1/1.7"
Interface
USB3
Resolution
12 MP
Shutter
Rolling
$560.00View partBuild a system with it

If you prefer an integrated acquisition approach, compare 3D sensors and ask which calibration, rectification, and projection parameters are available for each output stream. Do not assume a depth image and a texture image share intrinsics merely because their dimensions match.

Checks before deployment or ordering

Keep a calibration record alongside the acquisition configuration. At minimum, check the following before accepting a changed processing resolution:

  • Image lineage: identify whether processing receives raw, undistorted, or rectified pixels.
  • Known transformation: record crop origins, scale factors, padding, and pixel-center conventions.
  • Separate camera parameters: transform each camera's intrinsics using its own image mapping.
  • Consistent rectification: regenerate maps and retain the matching projection and depth-conversion parameters.
  • Physical units: preserve baseline units and avoid treating pixel scaling as a change in camera spacing.
  • Held-out verification: inspect reprojection residuals, vertical alignment, and independently known dimensions.
  • Repeatable startup: restore the same camera mode and processing settings after restart.

The usual answer, “rescale the intrinsics,” is wrong when the image transformation is unknown or the physical geometry has changed. Conversely, collecting a new calibration is unnecessary solely because a documented software resize changes image dimensions.

Start with the camera configurator once the operating mode is defined. For help selecting acquisition hardware, contact the applications team with the calibration resolution, processing resolution, transformation sequence, working range, and required dimensional tolerance.

Questions

Can I use stereo calibration at a different processing resolution?

Yes, when you know the exact geometric relationship between the calibrated images and the processing images. Transform each intrinsic matrix for that mapping, then generate matching rectification and depth-conversion parameters. Different dimensions alone do not reveal whether the camera performed resizing, cropping, or a mode-dependent operation.

Should I scale the stereo baseline when resizing images?

No. The baseline describes physical camera separation, not image sampling. A software resize changes focal lengths and principal points expressed in pixels, while the physical stereo rotation and translation remain unchanged. Keep the baseline's length unit consistent with the coordinates you expect triangulation to return.

Do distortion coefficients change when I resize an image?

For a standard distortion model defined in normalized camera coordinates, a known resize or crop is handled through the intrinsic matrix without changing distortion coefficients. This assumes the underlying optics and image formation remain unchanged. A pixel-based distortion model or internally corrected camera stream requires its documented conversion.

Does a changed aspect ratio always require recalibration?

Unequal horizontal and vertical scale factors can describe a deliberate image stretch. Apply them separately and regenerate consistent stereo geometry. The larger concern is whether those factors describe the actual operation: a changed aspect ratio could instead result from cropping or a different sensor readout mode.

How do I verify that converted calibration is accurate?

Use held-out target observations to inspect reprojection residuals and rectified vertical alignment, then measure independent references throughout the working volume. Image residuals test geometric consistency, while physical measurements expose scale and unit errors. Acceptance limits should follow your application tolerance and reference measurement uncertainty.