A stereo depth camera does not report every distance. Depth comes from disparity, and the matcher can only output disparity in fixed increments — whole pixels or fixed subpixel fractions — so the depths you can actually read form a ladder. Near 6 m the rungs can sit a metre apart. This guide gives you the one-line formula for the rung spacing at any range, works it through at exactly 6 m, tabulates it from 0.5 to 10 m, and turns it into a decision per task: where stereo holds, and where to reach for a profiler.
Where the depth step comes from
A stereo head locates the same feature in both of its images and measures the horizontal shift between them: the disparity d, in pixels. Similar triangles turn that shift into distance:
Z = f · B / d
where f is the focal length in pixels, B is the baseline in metres, and Z is the distance along the camera's optical axis. Z here is the camera's own Z coordinate, not always the straight-line range to a pixel — the distinction matters when the head is mounted at an angle (depth value vs true distance). For the full path from one matched pixel pair to XYZ coordinates, see disparity to 3D coordinates.
The matcher cannot output any disparity it likes. It reports at fixed increments — whole pixels, or fixed subpixel fractions such as eighths — so every distance it can state sits at Z = f·B/d for one of those increments. The reportable depths form a ladder, and the rung spacing is the depth step.
Keep that separate from depth units, the quantum of the reported number (1 mm is the common default on active stereo modules). Units decide how finely the value is rounded for output; the disparity ladder decides which distances exist to print. A stream can round to 1 mm and still only take values a metre apart at range. The same inverted geometry is why disparity-to-depth conversion bands are not fixed mm when you convert raw range values yourself.
The formula: the step grows with the square of range
δd is the disparity increment the matcher outputs: 1 for whole-pixel output, 0.125 for an eighth-pixel subpixel step. The second line is the local slope of the hyperbola Z = f·B/d — differentiate once and substitute d = f·B/Z. Two exact gaps bracket it: to the next nearer rung, f·B·δd / (d·(d+δd)), slightly smaller; to the next farther rung, slightly larger. Quote the differential as the step, and use the exact forms when a tolerance must hold in one direction.
The square is the whole story: halve the working distance and the step falls to a quarter; double it and the rungs spread fourfold. That is why one camera resolves about a millimetre at 0.5 m and reports metre-class rungs at the worked range with identical optics.
Worked example: exactly 6 m in a 640-pixel mode
Take a depth stream reporting f = 640 px and a 50 mm baseline — typical figures for a VGA-mode stereo head — looking at a surface at that range. Swap in your own calibration; the arithmetic is the point.
- Geometric gain: f · B = 640 × 0.050 m = 32 m·px.
- Disparity at the target: d = 32 / 6 = 5.33 px.
- Step per whole pixel: ΔZ = 6² / 32 = 36 / 32 = 1.125 m, about 1.1 m.
- Exact neighbours: the nearer rung sits at d + 1 = 6.33 px, Z = 32 / 6.33 = 5.05 m — 0.95 m below the target. The farther rung sits at d − 1 = 4.33 px, Z = 32 / 4.33 = 7.39 m — 1.39 m above. If the target lands on a value, the next value down is 5.05 m and the next up is 7.39 m, not 6.001 m.
- With an eighth-pixel subpixel step, δd = 0.125: ΔZ = 1.125 / 8 = 0.14 m. And because 5.33 px is not a multiple of 0.125, exactly 6.000 m is not on the ladder either: the nearest reportable depths are 32 / 5.375 = 5.95 m and 32 / 5.25 = 6.10 m.
The ladder from 0.5 to 10 m
Same head, f·B = 32 m·px, eighth-pixel output in the last column:
| Working distance | Disparity d = 32/Z | Step per pixel Z²/32 | Step per 1/8 px |
|---|---|---|---|
| 0.5 m | 64 px | 7.8 mm | 1.0 mm |
| 1 m | 32 px | 31 mm | 3.9 mm |
| 2 m | 16 px | 125 mm | 16 mm |
| 4 m | 8 px | 0.50 m | 63 mm |
| 6 m | 5.3 px | 1.13 m | 14 cm |
| 10 m | 3.2 px | 3.13 m | 39 cm |
Every column scales with f·B: a head with twice the geometric gain halves every rung; half the gain doubles them. Read the last column as the best spacing you can report, before matching error eats into it.
What moves the step: focal length in pixels, baseline, subpixel
Three levers, all inside the formula.
Focal length in pixels. f is the calibrated value for the exact mode you run, in pixels — not the millimetre rating on a lens barrel, and it changes between modes (read f and baseline per camera). A 1280-wide mode on the same optics doubles f and halves every rung; binning halves f and doubles them. If a smaller mode is a decimation the step grows; if it is a centre crop it does not — depth output-size settings interact with this in confusing ways (why depth output resolution settings seem ignored).
Baseline. Doubling B halves every step, at the cost of a bigger head and harder matching at close range. That sizing trade-off is its own decision: see choosing the baseline distance and wide-baseline stereo selection.
Subpixel increment. δd is whatever the matcher reports — whole pixels or a stated fraction.
Invert the formula to size a head to a target: f · B ≥ Z² · δd / ΔZ. For a 10 cm rung at the worked range with eighth-pixel output: f · B ≥ 36 × 0.125 / 0.10 = 45 m·px. Twice the example head — a 100 mm baseline at 640 px, or 1280 px at 50 mm — gives 64 m·px and a 7 cm rung.
Subpixel steps only hold when matching error stays small, and matching error is what a textured, high-contrast target minimises. A projected structured-light stereo camera paints its own pattern onto untextured parts, which is what keeps the error near its floor:
- Type
- Stereo / structured light
Subpixel steps are not accuracy
The rung spacing is a floor, not an error budget. On textured, static, evenly lit scenes, plan on 0.2–0.5 px of disparity error: at the example geometry that is 0.25 px × 1.125 m/px = 0.28 m at the worked range, and up to 0.56 m at the pessimistic end — several times the 14 cm subpixel rung. Weak texture, motion blur and glossy reflections push it further, and object edges sprout flying pixels that read metres off.
Quantization also biases averages. Readings of a flat surface scatter within a rung, and their mean can sit up to half a rung away from truth — one mechanism behind optimistic stereo heights, covered in quantization overestimation. Subpixel interpolation itself is not perfectly linear along the ladder, so a real head's rungs vary slightly around the formula; the bench check below is what turns the estimate into a number you can quote.
The decision, task by task
- Gripping inside 2 m: rung 16 mm at eighth-pixel output (half that at 1 m), looser than most grippers' repeatability — stereo holds.
- Volume and logistics at 3–6 metres: rungs 0.3–1.1 m per pixel, 3.5–14 cm subpixel — right for carton volume and count, wrong for dimension sign-off.
- Structure beyond 8 m: 2.0 m rungs at 8 m (64 / 32) and 3.13 m at 10 m per whole pixel — stereo maps the scene there, it does not measure it; double the baseline to halve the rungs, or accept structure-only output.
- A few millimetres at 1–2 m: the stereo rung (3.9 mm at 1 m) is the same order as matching error, so the honest tool changes, not the maths. A laser profile sensor triangulates a scanned laser line with calibrated optics — its depth step comes from the sensor geometry, not from a pixel match.
- Type
- Laser profiler
If the part needs that class of measurement over an area rather than a single line, hybrid heads exist in the same family: a stereo camera combined with a galvanometer-steered laser line, such as the MV-DLS300P-04.
Profilers, structured-light stereo, ToF and volume cameras all sit on one shelf:
Laser profilers and stereo 3D cameras
170 models · from $699.00Checks before you quote a step size
- Read f (px) and B (m) from the published calibration of the exact mode you will run.
- Compute d = f · B / Z at your working distance. Below about 8 px you are on the steep part of the hyperbola — quote rungs in metres, not millimetres.
- Pin down δd — whole-pixel or subpixel — from the matcher's output granularity before you promise a rung spacing.
- Bench-check: put a target at your range, move it by the predicted rung with a feeler or dial gauge, and confirm the reading steps by one rung. If it moves smoothly, a filter is interpolating between rungs — find the real δd before designing around the number.
- Add the matching-error budget (0.2–0.5 px planning) on top of the rung before quoting accuracy to a customer.
If the numbers put your task on the stereo side of the line, the camera finder filters by type and series, the 3D topic page collects the rest of the depth arithmetic, and we will check your geometry against a shortlist — send working distance, target rung and part finish through the contact page, or start a build in the camera configurator.
Questions
Does setting finer depth units shrink the depth step?
No. Depth units set the quantum of the reported number — 1 mm is a common default — so output can look smooth while the values still move in blocks of Z²·δd/(f·B). The ladder of reportable distances is fixed by the disparity increment and the geometry f·B. A finer unit makes the number look more precise; it adds no information and changes no rung.
Why are the gaps around the worked range different above and below?
Depth is inversely proportional to disparity, so the ladder is uneven: the nearer rung is closer than the farther one. In the worked example, 6 m falls at d = 5.33 px. The next nearer reportable depth is 5.05 m (a 0.95 m gap) and the next farther is 7.39 m (a 1.39 m gap). Z²/(f·B) is the local slope between them.
Does binning or a lower-resolution mode change the depth step?
Yes, whenever the mode changes the focal length in pixels. Binning halves f and doubles every rung; decimated lower-resolution modes behave the same way. A pure centre crop keeps f unchanged, so the step stays while the field narrows. Compare the calibrated focal length in pixels across the modes you plan to run rather than assuming from the resolution label.
How accurate is a stereo depth reading compared with its step?
Treat the rung as a floor. Matching error of 0.2–0.5 px is a fair planning range on textured, static scenes; at the example geometry that is 0.23–0.56 m at that range, several times the 14 cm subpixel rung. Texture, motion and ambient IR push the error up, so confirm on your own part before quoting a tolerance.
What if the target rung needs more f·B than the mount allows?
Solve f·B ≥ Z²·δd/ΔZ first. If the baseline or pixel focal length it demands will not fit the cell, the working distance is beyond stereo's useful zone for that tolerance. The honest options are a closer working distance, a laser profile sensor that gets its step from calibrated triangulation, or relaxing the tolerance to what the rung can deliver.

