Measuring how far a person stands from a sensor between 0.2 m and 3 m looks like easy work for a stereo depth camera, and it is — except at the near end. There a person sits closer than the disparity search can match, and fills the field of view with a strip of clothing, so depth and detection fail together. This explainer gives you the two formulas that set the near limit, a worked example with every number shown, and a decision for each near-range case. The same arithmetic covers kiosk proximity sensing, doorway counting and cobot workcell monitoring, wherever the question is how close a person can stand and still be measured.
What sets the minimum depth range of a stereo camera?
The largest disparity the matcher will search sets it: Z_min = f_px × B / d_max, so a camera with a 1200 px focal length, a 75 mm baseline and a 128 px search limit stops producing depth at about 0.70 m.
Stereo depth is triangulation. One scene point lands at different horizontal positions in the left and right images; that offset is the disparity d, and distance follows from it:
Here f_px is the focal length in pixels, B the baseline between the two lens centers in meters, and d the disparity in pixels. Distance and disparity are inversely related: halve the distance and the disparity doubles. The matcher only searches disparities up to d_max, and past that limit it returns nothing at all.
Each term is a lever:
- A longer baseline lowers far-range noise and raises the near limit in the same proportion — the full trade is in choosing a stereo camera baseline distance.
- A longer lens narrows the field of view and raises the near limit with it.
- A wider disparity search lowers the near limit and costs matching time.
Why does the near end break person detection?
Because two limits collide there: the disparity the geometry demands at that distance — about 450 px on the example camera worked out below — is three and a half times its 128 px search, and the field of view covers only an 11 cm strip of the person.
The first limit is disparity saturation. A point that close would need the matcher to slide one image 450 px against the other; the search window stops at 128 px, so no match exists inside it. Pixels past the limit are rejected rather than clipped, which is why a person walking too close vanishes from the depth map edge-first. The same clipping shapes the invalid band at the edges of a stereo depth image, and near objects are its extreme case: close objects that look like noise are usually past the search limit, not poorly measured.
The second limit is framing. A person detector needs head, shoulders and torso in one image to lock its pattern; an 11 cm patch of shirt carries none of those cues, however clean the depth is. Depth and detection fail independently at close range — fixing one does not fix the other, and at the closest working distance both fail.
Both limits are geometry. Recalibration, a faster matcher or more projected texture will not move either number.
How do you compute the near limit before you order the camera?
Multiply the focal length in pixels by the baseline and divide by the maximum searched disparity: with 1200 px, 75 mm and a 128 px search, the near limit is 1200 × 0.075 ÷ 128 = 0.70 m.
Take a short-baseline depth camera with a 640 px wide depth stream, 3.0 µm pixels and a 3.6 mm lens on a 75 mm baseline as example values, and substitute your own numbers in the same steps.
| Step | Arithmetic | Result |
|---|---|---|
| Focal length in pixels | 3.6 mm ÷ 3.0 µm | 1200 px |
| Product f_px × B | 1200 px × 0.075 m | 90 px·m |
| Near limit, 128 px search | 90 ÷ 128 | 0.70 m |
| Near limit, 255 px search | 90 ÷ 255 | 0.35 m |
| Disparity demanded at 0.2 m | 90 ÷ 0.2 m | 450 px |
At that distance the demanded disparity also eats the image itself: the two views would share only 640 - 450 = 190 px of horizontal overlap, so most of the scene is seen by one camera alone and cannot be matched at any quality.
Sensitivity is linear where it matters. Every 10 mm of extra baseline adds 1200 × 0.010 = 12 px·m, which moves the near limit by 12 ÷ 128 ≈ 0.09 m. Halving the baseline halves the near limit and doubles far-range noise; no setting breaks that line.
How much of a person does the field of view cover at close range?
Coverage grows at 0.53 m per meter of distance with this lens — 11 cm at the near spec, 53 cm at 1.0 m — so a 0.5 m torso only fits in the image from about 0.94 m.
With W_px = 640 and f_px = 1200, the multiplier is 0.533: at the far end the camera covers 1.6 m, room for two adults side by side. At the near end it covers 0.107 m of chest. Framing a whole torso that close needs a lens that does not exist in this format: 0.5 m of coverage there is a 2.5 ratio, or f_px = 640 ÷ 2.5 = 256 px, a 0.77 mm lens.
Read the same relation backwards to pick a lens for a required scene width at a fixed mount distance — the lens focal length calculator does that inversion, and how camera field of view changes with working distance covers the general case. The close-range version of this trade decides minimum distance versus field of view in close-range hand tracking.
Can a wider lens or active IR rescue close range?
A wider lens moves both limits — a 2.1 mm lens drops the near limit from 0.70 m to 0.41 m and widens coverage to 18 cm at the near spec — while projected IR texture moves neither: it only fixes matching on blank surfaces.
The wider-lens arithmetic: f_px = 2.1 mm ÷ 3.0 µm = 700 px, near limit 700 × 0.075 ÷ 128 = 0.41 m, coverage 0.2 × 640 ÷ 700 = 0.18 m at that distance, torso framed from 0.5 × 700 ÷ 640 = 0.55 m. Real progress, still short of the spec, and shorter lenses bring barrel distortion that calibration must absorb.
Active IR stereo adds a dot or speckle projector so the matcher locks onto featureless drywall and clothing. It raises the share of valid pixels at mid range; it touches neither d_max nor the field of view, so the near limit stands.
One setting does reach closer, at a price: a disparity shift slides the search window instead of widening it. With a 96 px shift the measurable band becomes 90 ÷ 224 = 0.40 m at the near edge and 90 ÷ 96 = 0.94 m at the far edge — close range gained, everything beyond about a meter lost. A duty band this wide cannot accept that in one setting; the mechanics are in setting the disparity shift to move the minimum range in your script.
Which sensor should you choose for close-range person distance?
Use stereo when your actual near limit is 0.4 m or more — it will hold centimeter-class accuracy at the far end — and switch to ToF or close-range structured light when the job truly starts at the spec's closest distance.
| Your real near limit | Decision |
|---|---|
| 1.0 m and beyond | Stereo, 128 px search, standard lens; a torso is framed from 0.94 m |
| 0.4 m to 1.0 m | Stereo, 255 px search, wide lens; expect invalid bands at the edges |
| Below 0.4 m | ToF or projected structured light; no stereo rig frames a person there |
Below the stereo floor the projector makes its own pattern, so a short baseline stops being a handicap. For close-range capture, compare a projected structured-light 3D camera with a laser galvanometer stereo camera:
- Type
- Stereo / structured light
- Type
- Stereo / structured light
ToF models commonly specify minimum distances in the 0.1 m to 0.4 m band, because a timing window — not image matching — sets their floor. When the job truly starts at arm's length, a ToF sensing camera is the direct answer:
- Type
- Depth / ToF camera
For the full walkthrough of choosing a 3D sensor that detects people reliably, see person detection with a depth camera; the near limit computed here is the first filter it applies.
What checks confirm the near limit on your bench?
Walk a matte 0.5 m panel toward the mounted camera and watch for the two events you predicted on paper: depth holes opening at the computed near limit, and the panel overflowing the field of view just below 0.94 m.
- At the far end, panel depth should sit flat within about 2 cm: δZ = Z² × δd ÷ (f_px × B) = 9 × 0.2 ÷ 90.
- At 1.0 m, expect solid depth and 0.53 m of coverage; a tape measure should agree within 10%.
- At 0.70 m with the 128 px search the panel should still hold depth; at 0.35 m with the 255 px search, expect a patchy frame with invalid edges.
- At the spec's closest distance, expect no depth at all and an 11 cm strip in the RGB image — the failure you computed, arriving on cue.
If the SDK exposes a disparity histogram, log it during the walk: a pile-up at d_max is the near limit arriving in real time.
When the panel test matches the arithmetic, order against numbers rather than hope. Filter the camera finder by sensor type, or start from the camera step of the system configurator. If your near limit lands between the rows above, contact us with your baseline, lens and search numbers, and we will run these two formulas against the models that fit.
Laser profilers and stereo 3D cameras
170 models · from $699.00Questions
What baseline would put 0.2 m inside the disparity search?
The product f_px × B must come in under d_max × 0.2 m. With a 128 px search that is 25.6 px·m, so a 1200 px focal length needs a 21 mm baseline. Depth noise at the far end then grows from about 2 cm to about 7 cm per 0.2 px of disparity error, and coverage that close stays an 11 cm strip. Possible on paper, the wrong trade in practice.
Is the minimum range in a data sheet where person detection starts?
No. The stated minimum is the closest distance at which any depth is produced, measured on a flat target facing the sensor. A person detector also needs enough body in frame, which sits further out — with the example lens a 0.5 m torso fits only from about 0.94 m. Budget about 1.5 times the stated minimum as the distance where detection becomes dependable.
Does disparity shift extend the near range for free?
No, it trades the far end for the near end. A shift slides the search window rather than widening it: with a 96 px shift on the example camera, the measurable band becomes 90 ÷ 224 = 0.40 m at the near edge and 90 ÷ 96 = 0.94 m at the far edge. You gain close depth and lose everything beyond about a meter, which a near-to-far duty cannot accept.
Why do objects inside the minimum range read as holes rather than short distances?
Because the block matcher finds no consistent left-right offset inside its search window once true disparity exceeds d_max, so the pixel is rejected and marked invalid instead of being reported at a clipped depth. That is why a person walking too close vanishes from the depth map edge-first while the color image still shows them whole.
How much depth noise should you expect at the far end?
Depth noise scales with distance squared: δZ = Z² × δd ÷ (f_px × B). With the example camera's 90 px·m and 0.2 px of disparity error that is 9 × 0.2 ÷ 90 = 0.02 m at the far end, and about 2 mm at 1 m. Far-range accuracy is not the constraint in a full-band person-distance job — the near end is.


