3D visionTroubleshooting

One stereo camera out of focus: diagnose it with a chessboard

Hold a chessboard static, score both stereo eyes with the same sharpness metric, and decide between cleaning, recalibrating or replacing the defocused camera.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01What one soft eye does to depth
  2. 02Likely causes, most probable first
  3. 03The chessboard test that settles it
  4. 04Worked example: a 1280 x 800 module with a soft left eye at three distances
  5. 05Reading the result
  6. 06The fix that follows from the score
  7. 07What calibration can and cannot change
  8. 08Prevention: the ten-minute incoming check
  9. 09Questions

A stereo depth camera only earns its depth when both eyes resolve the scene equally well. When one eye returns soft captures while its twin is sharp, depth confidence collapses across the shared field. The usual first move — a fresh calibration — changes nothing, because calibration fits a model to whatever blur it is given. The bench test below settles the question in minutes: a static chessboard, one sharpness metric applied identically to both eyes, and a ratio with a fixed threshold. You will finish able to say, with numbers, whether the soft eye is dirt on the window, a distance problem or a defective fixed-focus module, and what to do in each case.

What one soft eye does to depth

The fault shows in the raw feeds first. Open each mono stream on the same board: one eye renders corners and part edges crisply, the other smears the same features across several pixels. Depth output follows: confidence drops over most of the scene, the point cloud thins or empties, and mismatched disparities cluster on fine texture. Stereo matching needs the same feature in both images, so one defocused eye costs depth across the whole overlap rather than on one side of the frame.

Poor depth with both eyes equally sharp is a different case; there the suspects are calibration and stream settings, covered in poor stereo depth quality: fix calibration and focus mismatch first. This page handles the asymmetric case, where the two eyes disagree about the same scene.

Likely causes, most probable first

Work down the list and stop when a test convicts.

  1. Something on that eye's window. A leftover protective film, a fingerprint or a dust film cuts contrast exactly like defocus. Shine a light obliquely across each window, clean as you would any lens, and retest before anything else.
  2. A factory focus fault in that module. Fixed-focus barrels are aligned at assembly, and an individual unit can leave with one eye sitting away from its nominal depth. This is the leading suspect when the unit is new and one eye fails at every distance.
  3. Impact or vibration moved the barrel. Compare against captures from when the camera was known good: a score that was healthy last month and is a fraction of its twin today points at mechanical movement, not software.
  4. A stream or processing asymmetry. Sharpening or denoise applied to one eye only, or a lossy save format, fakes blur. Stream both mono feeds raw, exposure locked, files saved losslessly, and the asymmetry either survives or it does not.
  5. Not a cause: calibration. A wrong calibration corrupts depth while both images stay sharp. It never softens a capture, so blur in one stream rules calibration out as the origin.

The chessboard test that settles it

Fixed-focus stereo eyes are set sharp at a nominal depth and hold contrast across a depth range around it; outside that range both eyes soften together. Sweeping three distances separates a range problem, where the two scores fall together, from a defective eye, where one falls alone while its twin stays high.

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.

Everything in the test needs to stay where you put it: a slide-table stand such as the LS-MNT-0040, with 700 mm of height and a 400 x 450 mm base, carries the camera and lets you step through the distances without touching focus, framing or the board.

Camera standsMachine vision camera stand, professional slide-table type, height 700 mm, 400 x 450 mm base (LS-MNT-0040)LS-MNT-0040
Type
Camera stands
$629.00View partBuild a system with it

Then run the sweep:

  1. Print a chessboard with 9 x 6 inner corners and 25 mm squares on matte paper, glue it dead flat to a rigid plate, and keep the squares large in the image. The target-size rule is the same as for any calibration capture: each square should span at least a few dozen pixels at the nearest working distance, or the corner detection itself becomes the weak link.
  2. Mount the camera and the board so nothing moves for the whole sweep.
  3. Set three distances across the module's working range, for example 500, 800 and 1,100 mm on a module rated near one metre; the 3D camera working distance and positioning guide covers choosing that range.
  4. Stream both mono eyes raw. Lock exposure and gain to identical values, turn auto-exposure off, and save lossless PNG files: JPEG smoothing lowers the score for reasons unrelated to focus.
  5. Capture five frames per eye per distance and discard any frame with motion smear.
  6. Score every capture with the variance of the Laplacian over the same board crop.
  7. Pair the scores distance by distance and divide the soft eye's score by the sharp eye's score.
  8. Clean both windows and repeat the sweep once if any ratio lands in the borderline band described below.
s = Var( Laplacian(I) ) r = s_soft / s_sharp

Here I denotes the grayscale crop, identical in both eyes; the Laplacian is the standard second-derivative edge filter, and blur strips high-frequency energy from edges, so the defocused eye scores lower on the same board. Scene contrast and exposure move the absolute scores, so only the ratio of the same capture pair carries meaning.

Worked example: a 1280 x 800 module with a soft left eye at three distances

Example values, typical for a fixed-focus stereo module; the decision rule itself never needs the pixel count:

  • Two mono eyes, 1280 x 800 px each.
  • Board of 10 x 7 squares at 25 mm (9 x 6 inner corners), so 250 mm wide.
  • Distances 500, 800 and 1,100 mm; exposure 4 ms and gain x1 locked on both eyes; lossless captures.
  • At 800 mm the board spans half the frame width: 1280 / 2 = 640 px across 10 squares, so 640 / 10 = 64 px per square, and a 384 x 384 px crop (6 x 6 squares) is scored in both eyes at every distance.
  • Measured example scores: at 800 mm left 380, right 1,420; at 500 mm left 610, right 2,350; at 1,100 mm left 240, right 890.

The rule, in words: r = soft divided by sharp, per distance. r of 0.6 or above passes; 0.33 to 0.6 is the clean-and-retest band; below one third at every distance convicts the eye's optics.

The arithmetic:

  • 800 mm: r = 380 / 1,420 = 0.27
  • 500 mm: r = 610 / 2,350 = 0.26
  • 1,100 mm: r = 240 / 890 = 0.27

Result: the left eye sits at 26-27 percent of its twin at all three distances, under the one-third line with identical exposure and a lossless pipeline. The cross-check agrees: at the same corners the right eye crosses from dark to light within 2 px while the left needs about 6.

Decision: the left eye's optics are at fault, factory focus or damage. No calibration, re-flash or settings change alters that ratio, so claim a replacement from the seller and attach the captures and score pairs. The threshold's basis: twin eyes share one lens design and one nominal focus, so manufacturing tolerance moves the pair apart by tens of percent, and a stable factor of nearly four is not tolerance.

Reading the result

Absolute scores depend on the board, the contrast and the pixel size, which is why the table judges only the ratio of a matched pair captured at the same settings.

Result across the sweep What it means What to do
r of 0.6 or above at every distance Eyes match; optics are fine Sharp images with bad depth point at calibration or processing: restore factory calibration, then re-run your own
0.33 to 0.6 somewhere Borderline: contamination or exposure drift Clean the windows, re-lock exposure, repeat; a settled r of 0.6 or more closes it
Under 0.33 at every distance One eye defocused: factory fault or damage Claim a replacement and skip recalibration
Both scores fall together at the far distance Range problem, not a fault Work inside the rated distance range

The fix that follows from the score

If the window was the cause, the fix is cleaning: blower first, then a proper optical wipe, never a dry rub across a coating. Retest and expect the ratio to move above 0.6.

If the eye is convicted, the fix is replacement, not repair. Contact the seller's support with the serial number and proof of purchase; where the invoice has gone missing, support can usually trace the order from the buyer account, so ask before writing the unit off. Attach the evidence pack — lossless captures, score pairs, ratios — and a hardware focus fault is confirmed on first contact.

Do not open the housing to reach the barrel, for the same claim-time reason: a barrel you have turned is indistinguishable from a factory fault. When the claim is settled and you want a stereo head for a new build, the 3D sensor range covers both main designs: the MV-DPS200P-02 is a projected structured-light 3D camera that carries its own texture for low-contrast parts, and the MV-DLS300P-04 is a laser galvanometer stereo camera for scanned work at a stand-off.

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

Whichever unit arrives, run the same incoming sweep before it goes on the machine, then check its calibration against the average and maximum residual targets; if you capture a fresh board set, cover the volume properly as described in stereo calibration board coverage: fix the stall at the end.

What calibration can and cannot change

A stereo calibration returns one rotation and one translation that relate the left camera's coordinates to the right's, alongside each eye's intrinsics. Those numbers are fitted to the images as they arrive, blur included: a soft eye still yields a self-consistent calibration, with depth quality quietly paying for it. That is why a perfect recalibration on a defocused eye changes nothing you care about. The reverse case matters too: sharp images with wrong depth point at the calibration or its stored file. Restore the vendor's factory calibration first, retest, and only then capture a new board set.

Prevention: the ten-minute incoming check

  • Run the two-eye score sweep on every stereo module the day it arrives, before it is mounted anywhere, and keep the lossless captures and score pairs with the serial number as the baseline.
  • Mount so nothing can strike the housing: a knock that moves focus also moves calibration, which is why cameras that were moved drift off target. Any rigid mount from the camera stands range beats a loose tripod here.
  • Never twist a fixed-focus barrel to see whether it helps.
  • A focus that changes over the working day is a different fault, thermal shift of the mount, with its own diagnosis in camera focus drift with temperature.

The decision in one line: sweep three distances on a static board, divide the soft score by the sharp one, and under one third with clean windows and locked exposure you are looking at a defective eye — claim the replacement and keep the captures. For the calibration and set-up pages that surround this fault, the 3D camera guides collect them in one place, and the stand configurator walks a mounting set-up step by step.

Questions

Does one defocused eye ruin depth across the whole field of view?

Yes, wherever the two fields overlap. Stereo matching assigns depth by finding the same feature in both images; when one image is soft, the match fails there, so confidence drops and the point cloud thins across the shared field rather than on one side of it. Treat depth loss with a sharp twin eye as a symptom of the soft eye, and confirm with the score sweep before touching calibration.

Why must the test captures be PNG rather than JPEG?

JPEG is lossy and smooths fine edges as part of its compression, which lowers the Laplacian variance for reasons that have nothing to do with focus. A sharp eye saved at high compression can score like a defocused one and send the diagnosis the wrong way. Save both eyes lossless, keep exposure and gain identical, and score the same crop so the only variable left is the optics.

Both eyes are equally soft — is that the same fault?

No. Matched softness almost always means the camera sits outside its focus range at that distance, or the shared cover window is contaminated, so both eyes suffer together. Move into the rated working range first and retest; if both scores recover, nothing is defective. A fault that hits one eye alone, at every distance, while the twin stays sharp, is the module problem the ratio test exists to catch.

What should we send the seller when claiming a replacement?

The serial number, proof of purchase or the account the order shipped under, and the evidence pack: lossless captures from both eyes at two or three distances with identical exposure, the score pairs, the ratios, and a note that cleaning the windows changed nothing. That combination shows a hardware focus fault on first contact and avoids a round of generic troubleshooting questions.

Can a fixed-focus stereo eye be re-focused by the user?

No. The barrels are set and fixed at assembly, there is no user adjustment, and a barrel you have turned is indistinguishable from a factory fault when the claim is assessed. Opening the housing also defeats the laser projector's eye-safety design. The path that works is replacement through the seller, then verification of the new unit with the same incoming check.