3D visionTroubleshooting

Poor stereo depth quality: fix calibration and focus mismatch first

Unit-to-unit stereo depth quality differences usually trace to calibration or focus. Check both per camera, then recapture calibration on a textured target.

LumaSpec Vision13 min read Share on LinkedIn

On this page 10 sections
  1. 01Why do two identical stereo cameras return different depth quality?
  2. 02Is the calibration stored on the camera actually that unit's?
  3. 03How much depth error does a calibration or focus problem cost?
  4. 04Do autofocus and fixed-focus modules really behave differently?
  5. 05How far can a fixed-focus module hold sharp features?
  6. 06Why does depth quality drop near windows and bright lights?
  7. 07How do I recalibrate a stereo depth camera properly?
  8. 08Which symptom points to which fix?
  9. 09When is recalibration not the fix?
  10. 10Questions

You set up two stereo depth cameras of the same model. One returns dense, clean depth and ranges a plane at 1 m to within a few millimeters. The other returns patchy disparity and ranges the same plane tens of millimeters off, and nothing about the housings tells you why. Most unit-to-unit gaps like this trace to two things you can check in an afternoon: the calibration stored on each device and the focus behavior of its mono pair. This guide gives you the read-back check, the focus identification step, the arithmetic that puts a millimeter figure on each fault, a recalibration procedure, and the rule that decides when a unit is finished.

Why do two identical stereo cameras return different depth quality?

In the field, order the causes by probability: calibration that was never captured for that unit or has drifted, a focus mismatch between autofocus and fixed-focus modules, then exposure and scene texture.

Units that look the same are not built the same. Baseline, sensor alignment and lens focus each carry production tolerance, and per-unit calibration exists to absorb exactly those differences. A unit that missed the step at the factory, or whose calibration no longer matches its current mechanical state, produces a disparity map that looks plausible while the ranges are quietly wrong.

Work the buckets in the order that costs the least time: read the stored calibration (minutes per unit), identify the focus type (minutes), then check exposure on the real scene (one capture). Let the pattern narrow it for you too: a unit that underperforms in every scene, not just one, is pointing at the device rather than the setup. The scale side of that story, how stored numbers become range, is in stereo disparity scale and calibration.

Is the calibration stored on the camera actually that unit's?

Read the calibration back from each device before you compare images: every stereo module stores its calibration on board, and a unit running default or empty numbers returns ranges whose scale error grows with distance.

Stereo modules hold calibration in onboard storage, and SDKs ship a calibration-reader or device-inspection example that prints it. Run that example against each unit and read three things off the result:

  • Whether calibration exists at all: empty fields, placeholder values or a generic default mean the unit was never calibrated for itself.
  • Whether the intrinsics match the resolution you run: a calibration captured at a different resolution needs rescaling before comparison.
  • Whether the baseline is consistent with the mechanical design: a far-off value hints at a generic file or a swapped unit.

The signature of wrong calibration is a scale error. A plane at 1,000 mm reading 1,060 mm is 6% long, and the same 6% shows up as 30 mm at 500 mm and 120 mm at 2,000 mm. Percentage error that travels with the camera rather than the scene is calibration talking.

Before comparing ranges between units, also confirm their depth unit and precision settings match.

How much depth error does a calibration or focus problem cost?

Depth error from a disparity error scales with range squared: a 0.2 pixel error on a 75 mm-baseline module with a 370 pixel focal length is about 7 mm at 1 m and 29 mm at 2 m, so far-range accuracy collapses first.

Both faults land on the same bottleneck: disparity. Stereo converts a pixel shift between the two mono images into range through the pinhole relation, so any disparity error, from wrong intrinsics, defocus or matching noise, maps into range with range squared:

d = B · f_px / Z ΔZ ≈ Z² · Δd / (B · f_px)

Worked example, on an illustrative module: 75 mm baseline, 1280-pixel-wide mono pair, 120° horizontal field of view. Focal length in pixels: f_px = 640 / tan 60° ≈ 370. Disparity at 1 m: d = 75 × 370 / 1000 = 27.8 px. A fault costing 0.2 px of disparity error gives ΔZ = 1000² × 0.2 / (75 × 370) ≈ 7 mm at 1 m, and 2000² × 0.2 / (75 × 370) ≈ 29 mm at 2 m. Double the range, quadruple the error, which is exactly the signature a stale calibration produces.

The same numbers give the quantization floor: one full pixel of disparity at 1 m is 1,000,000 / 27,750 ≈ 36 mm, so a matcher with 0.1–0.5 px of subpixel noise lives between roughly 4 and 18 mm at that range. Expecting 2 mm at 1 m from this module is beyond its geometry, not a calibration failure. The full disparity-to-coordinate derivation is in depth from a matched stereo point pair, and the rounding bias is quantified in stereo depth height overestimation from disparity quantization.

Do autofocus and fixed-focus modules really behave differently?

Yes: an autofocus module moves its lens during operation, which quietly invalidates any stored calibration, while a fixed-focus module holds one lens position for life, so identify each unit's type and never mix the two in one rig.

Identify the type from software rather than the housing: stereo SDKs expose a device-inspection query that lists each connected camera and whether a focus actuator sits behind it. If your installed build lacks that query, update the SDK to the current release and retry: the check arrived in later versions, and an old build fails with an unknown-attribute error instead of an answer.

The behaviors diverge from there. A fixed-focus module holds one lens position for life, and its calibration describes that position. An autofocus module moves its lens whenever the scene or exposure logic prompts it, and every move changes the focal length in pixels your calibration assumes. In operation that reads as depth quality that pulses on a static scene and ranges that track focus events rather than object motion.

Three production rules follow: lock the focus before calibrating, disable autofocus at runtime, and never mix focus types across a pair or across a fleet expected to agree. The lock-first workflow is in calibrate a camera with autofocus: lock the focus first.

How far can a fixed-focus module hold sharp features?

A fixed-focus module focused at 0.8 m at f/2.0 with a 2.5 mm lens has a hyperfocal distance near 1.04 m, which keeps the blur circle under 3 µm from about 0.45 m to 3.4 m; past about 3.4 m features soften and matching noise grows.

The blur circle grows as objects move off the focus distance, and feature matching degrades long before the image looks obviously soft to your eye:

H = f² / (N · c) + f near = H · s / (H + s − f) far = H · s / (H − s + f)

Same illustrative module: focus distance s = 800 mm, f/2.0, circle of confusion set to the pixel size, c = 3 µm = 0.003 mm, focal length f = 2.5 mm. Hyperfocal distance H = 2.5² / (2.0 × 0.003) + 2.5 = 6.25 / 0.006 + 2.5 ≈ 1,044 mm. Near limit = 1,044 × 800 / (1,044 + 797.5) = 835,200 / 1,841.5 ≈ 453 mm. Far limit = 835,200 / (1,044 − 797.5) = 835,200 / 246.5 ≈ 3,388 mm.

So this module holds acceptable sharpness from about 0.45 m to 3.4 m; a scene living at 5 m defocuses, matching noise rises, and the depth image blames the algorithm when the lens is the cause. Set the focus distance to the working distance, not to infinity, and re-run the estimate whenever the working distance moves. What stretches the band: a smaller aperture (higher f-number) and a larger pixel both widen it, roughly in proportion.

Depth of field around the focus plane Light from the lens converges on the focus plane. In front of and behind it, each point spreads into a blur circle; the zone where that blur stays below about a pixel or two is the depth of field. A smaller aperture gives a narrower cone and a deeper zone.depth of fieldfocus planeapertureoutside it, pointsblur into circleswide aperture: steep cone, shallow zonesmall aperture (high F#): deeper zone
Depth of field around the focus plane. Light from the lens converges on the focus plane. In front of and behind it, each point spreads into a blur circle; the zone where that blur stays below about a pixel or two is the depth of field. A smaller aperture gives a narrower cone and a deeper zone.

Run your own module's numbers through the depth of field estimate below:

Depth of field and diffraction
Units
Depth of field
– mm
About the focus plane
– mm
Diffraction limit
– F/#
Blur limit
– µm
Diffraction spot
– µm
At this F-number
–

DOF ≈ 2 × N × c × (1 + m) / m², c = allowed blur × pixel size. Diffraction spot (Airy disk) ≈ 2.44 × wavelength × N × (1 + m); past the diffraction limit it is larger than the blur you allowed.

Browse lenses by aperture and format Open the full calculator

Why does depth quality drop near windows and bright lights?

Saturated pixels carry no intensity gradient, and stereo matching runs on gradient: when part of the mono pair clips near a window or lamp, those pixels return invalid or noisy disparity no matter how good the calibration is.

The test takes one capture: pull the mono pair from the failing scene and read the histogram. A visible spike in the top bin means highlights are clipping, and clipped regions return sparse, invalid or wildly noisy disparity. Cap the exposure, with fixed manual exposure or auto mode under an upper limit, until the spike shrinks to noise inside the area you inspect.

Exposure that never applies at startup produces the same signature. If the first frames of every shift look clipped until something changes, check the startup order in depth auto exposure not applied at startup: fix the setting order.

Specular hits on shiny parts clip locally even at correct exposure. Re-angle the camera a few degrees, add diffuse fill, or shade the window. Do not chase it with longer exposure: that grows the clipped area and widens the dead zone.

How do I recalibrate a stereo depth camera properly?

Capture 15 to 20 poses of a flat, textured target filling at least a third of the shared field of view, 0.3 to 2 m out, with focus locked and exposure fixed, then verify on a plane at known distance before writing to the device.

  1. Freeze the optical state: lock the focus (disable AF), set a fixed manual exposure, and run the resolution you use in production.
  2. Mount a flat, rigid checkerboard or coded target on a stiff backing, not curling paper.
  3. Place the target inside the shared field of view of both mono cameras, filling at least a third of the frame; a published stereo calibration study uses that fraction as the working minimum.
  4. Keep captures between about 0.3 and 2 m, with most of them at your production distance.
  5. Capture 15 to 20 poses: center, corners, moderate tilts in both directions. Keep the camera fixed and move the target.
  6. Run the SDK's calibration routine and record the reported reprojection or epipolar error; drop and recapture any pose it flags as an outlier.
  7. Verify before writing: aim at a flat board at a known distance, 1,000 mm for the example module, fit a plane, and read the RMS and center-distance error.
  8. Write the calibration to the device only after step 7 passes, then date the unit and tie the file to its serial number.

The capture and stream setup is walked through in stereo depth camera calibration: target capture and stream setup. Target size has its own failure mode: a board that fills the frame at 0.5 m is too small at 2 m, which is why checkerboard calibration fails at distance and why the fix is a larger target rather than more poses. The plane-fit method itself, including how edge error separates from center error, is in depth camera flat plane distortion: quantify edge error.

Acceptance band, derived from the module above: 0.2 px of disparity noise costs ±7 mm at 1 m, so hold the plane-fit RMS to single-digit millimeters and the center-range error within ±10 mm, about 1% of range. A unit that misses this band after two clean recalibrations belongs to the last section, not to the target.

Which symptom points to which fix?

Match the symptom before touching anything: range error that grows with distance points at calibration, depth that pulses on a static scene points at autofocus, fuzz confined to object edges is a matching artifact, and uniform noise everywhere is exposure or optics.

Symptom First suspect Test Fix
Ranges off by a near-constant percentage, worse at distance Missing or stale per-device calibration Read stored calibration; flat plane at 1 m Recalibrate per the procedure above
Depth pulses or hunts on a static scene Autofocus refocusing mid-capture Device inspection query for a focus actuator Lock focus, disable AF, recalibrate
Edges smear, float or bleed into the background Matching artifact at depth discontinuities Check whether noise lives only at edges Filter or accept; not a calibration fault
Invalid bands and fuzz near lights or windows Clipped highlights and glare Histogram spike at the top bin on the mono pair Cap exposure; shade or re-angle the scene
One unit fails, peers pass, unchanged after recalibration Mechanical or sensor fault Clean lenses; repeat the plane test twice Retire the unit

Two artifact rows deserve their own pages: edge fuzz floating between object and background is flying pixels between object and background in stereo depth edges, and the empty strip along image borders is why stereo depth images have an invalid band at the edges. Neither improves with recalibration. Prevention stays short: locked focus, capped exposure, and a monthly plane check that catches drift before an operator does.

When is recalibration not the fix?

If a clean recalibration still leaves the flat-plane test outside about ±10 mm at 1 m on two consecutive runs, the fault is mechanical or electrical: a decentered lens, drift, contamination or a tired sensor, so clean, retest, then retire the unit.

Physical causes leave fingerprints. A drop can decenter a lens or shift the baseline, and the calibration you capture afterward fits poorly no matter how many poses you take, or drifts within minutes as the module thermally cycles. Smudged optics scatter light and cut contrast: clean with optics tissues and retest before condemning anything. A failing sensor shows disparity dropout in fixed image regions across every scene.

Jitter that survives all of that, with a rigid mount, verified calibration, locked focus and clean exposure, points at vibration or inertial fusion rather than stereo geometry; the stereo depth jitter and IMU drift guide covers that branch. If your pipeline runs a learned stereo model instead of block matching, noisy disparity has model-specific causes; the noisy learned-stereo disparity guide walks them.

The end-of-road decision: a unit that misses its acceptance band on two clean recalibrations is retired. When the fleet needs out-of-the-box per-unit accuracy instead, specify factory-calibrated 3D sensors and pick them by type and range in the 3D sensor finder.

A projected structured-light camera such as the MV-DPS200P-02 supplies its own pattern, so depth quality stops depending on scene texture.

3D sensorsHikrobot MV-DPS200P-02 Projected structured-light 3D cameraMV-DPS200P-02
Type
Stereo / structured light
$8,829.00 · quotedView and quote

For scanning geometry at range, a laser galvanometer stereo camera like the MV-DLS300P-04 adds an actively steered laser line to the stereo pair.

3D sensorsHikrobot MV-DLS300P-04 Laser galvanometer stereo cameraMV-DLS300P-04
Type
Stereo / structured light
$16,579.00 · quotedView and quote

Any steered-laser unit is a laser product: during setup keep the beam off eye level, never look into it, and follow the laser labels on the housing.

To size a replacement against your own working distance and field of view, start the configurator below at the camera step, and keep the 3D imaging guides on hand for the depth-accuracy fixes this article links.

Build the whole station

The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.

Start with the camera

Questions

Can I copy one calibration file to every stereo camera of the same model?

No. Baseline, sensor placement and lens focus vary unit to unit within manufacturing tolerance, so a shared file adds a range-proportional error everywhere it is used. Read each device's stored calibration first; where it is missing or generic, recapture on that specific unit, and keep every written file tied to the unit's serial number so a swap never inherits a neighbor's numbers.

How often should a fixed stereo depth camera be recalibrated?

Recalibrate after any event that can move a lens relative to its sensor: a drop, a bracket or mount change, lens cleaning, or a large temperature swing from the calibration conditions. Between events, re-run the flat-plane check monthly and compare against the unit's own baseline; recalibrate when the error roughly doubles. A camera that stays mounted and passes the check needs nothing more.

Does a higher-resolution mono pair fix poor depth quality?

Rarely on its own. More pixels raise the focal length in pixels, which does shrink the depth error from disparity noise at a given range, but defocus, calibration error and clipped highlights do not scale with resolution, and in the field they dominate. Fix focus, calibration and exposure first; treat resolution as the long-range lever you pull last.

Why does depth read correctly in the viewer but wrongly in my robot cell?

The camera reports ranges in its own optical frame, and a robot acts in its own base frame; the missing piece is the camera-to-robot transform, not the stereo calibration. Mount the camera rigidly, calibrate that transform with the same tools you use for a 2D camera, and confirm the depth units the SDK emits before you blame the disparity numbers.

What acceptance band should a recalibrated stereo unit meet?

Set the band from the module's own disparity noise: hold the plane-fit RMS at the working distance near the quantization floor, and the center-range error within about 1% of distance. For the example module here that is single-digit millimeters of RMS and ±10 mm at 1 m; a unit missing its own band on two clean recalibrations is a hardware case.