3D visionTroubleshooting

Why depth image edges of a cardboard box vanish at long standoff

Why depth image edges vanish at long standoff: the distance-squared noise rule, emitter and backdrop fixes, and the mount height decision.

LumaSpec Vision9 min read Share on LinkedIn

On this page 9 sections
  1. 01Depth noise grows with the square of distance
  2. 02Pixels across the edge
  3. 03Cause 1: the standoff is past the projector's working range
  4. 04Cause 2: the IR projector is not firing on every frame
  5. 05Cause 3: the scene offers no depth contrast
  6. 06Exposure and frame averaging
  7. 07The decision for each set-up
  8. 08Checks before you re-mount
  9. 09Questions

You aimed the camera, the RGB preview looks sharp, and the box is obvious to your eye — yet the depth image shows a soft lump where the box edges should be. At a 2 m mount height this is the common failure for overhead box dimensioning, and it rarely has anything to do with your image-processing code. This guide gives you the two numbers that decide the outcome — depth noise versus standoff, and the height step versus that noise — plus the emitter and backdrop checks, and the point at which the right fix is a different sensor class rather than another parameter.

Depth noise grows with the square of distance

A stereo depth camera triangulates every pixel from the disparity d between its two views. With focal length f in pixels and baseline B in metres, the distance Z and its one-sigma noise σ_Z follow:

Z = f·B / d σ_Z = Z²·σ_d / (f·B)

σ_d is the disparity match error: 0.2-0.5 px is typical on a textured surface, worse on a uniform one. The Z² term is the whole story. Halve the standoff and the geometric noise drops to a quarter. The match error also degrades with distance, because the projected dot pattern illuminates the surface ever more weakly, so the real gain from moving the camera down beats 4:1.

Worked example, with illustrative figures typical of a logistics stereo depth camera: 87° horizontal field of view, 848 px depth width, 90 mm baseline, σ_d = 0.25 px. Substitute your model's own numbers; the arithmetic is the same.

f = (848 / 2) / tan(43.5°) = 424 / 0.949 = 447 px σ_Z at 2.0 m = (2.0² × 0.25) / (447 × 0.09) = 1.00 / 40.2 = 0.025 m ≈ 25 mm σ_Z at 1.0 m = (1.0² × 0.25) / 40.2 = 0.0062 m ≈ 6 mm

That is why edges survive at 1 m and vanish at 2 m: the noise quadruples while the coverage merely doubles.

Standoff Coverage width Geometric σ_Z Verdict for a 150 mm tall box
0.5 m 0.95 m 1.6 mm sharp edges, small field
1.0 m 1.90 m 6 mm the working choice
1.5 m 2.85 m 14 mm marginal; edges begin to round
2.0 m 3.80 m 25 mm edges wash out

Coverage width = 2·Z·tan(43.5°) for the example optics. A wider baseline helps linearly — doubling B halves σ_Z at the same standoff, which is what makes long-range stereo work at all; the long-range stereo accuracy guide works a full example. Once captured, the deformation these errors leave in a measured edge is the subject of why distance deforms stereo depth edges.

Pixels across the edge

Noise is only half the geometry; sampling is the other half. At the example optics the covered width is 1.9 × Z, so a 400 mm wide box spans 400 / 3800 × 848 ≈ 89 px at 2 m and 400 / 1900 × 848 ≈ 179 px at 1 m, where one pixel is 1.90 m / 848 ≈ 2.24 mm. Plan on at least 30 px across the box's narrow dimension, so a threshold or gradient filter sees a step rather than a ramp. Work out the covered width and pixel size at your own mount height with the field of view calculator:

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Both factors move together: at 2 m you take four times the noise on half the pixels. Moving the mount from 2 m to 1 m buys close to an order of magnitude in edge quality without touching a single parameter.

Cause 1: the standoff is past the projector's working range

Symptom: depth turns dark or patchy on the box faces while the RGB preview looks well lit, and edges render as rounded ramps instead of steps. Most likely cause: the camera sits beyond the range where the projected pattern still gives block matching enough contrast on a low-texture surface.

Test: lower the camera to 0.8-1.0 m on a temporary bracket and grab one frame. Edges appear — geometry is the cause, and no parameter recovers them at 2 m.

Fix: mount at the height the noise budget allows. Require σ_Z to stay at or below one tenth of the height step you must resolve. For a 150 mm box that means σ_Z ≤ 15 mm; with the example geometry (σ_Z = 0.0062 × Z²) that alone limits Z to √(0.015 / 0.0062) ≈ 1.55 m, and pattern falloff argues for planning the mount at 1.0-1.2 m. The 3D camera working distance and positioning guide covers the mounting trade-offs in detail.

Cause 2: the IR projector is not firing on every frame

Symptom: depth is dark or full of holes on uniform cardboard even though RGB brightness is fine, and exposure changes do nothing. With the pattern absent, passive stereo has nothing to match on textureless faces, so the engine returns holes or blends box into floor.

Test: open the IR intensity stream. You should see the dot pattern covering the box; a smooth grey frame means the projector is off or strobing with auto-exposure.

Fix: set the IR emitter to always-on so every frame carries the pattern at constant strength, and let auto-exposure manage the intensity stream separately. If the depth engine offers scene-density presets, a lower-density setting rejects marginal matches and keeps edges tighter, at the cost of more holes in weak areas. Strong ambient light creates its own washout failure; the IR depth noise guide shows how to tell the two apart.

Cause 3: the scene offers no depth contrast

The edge you want is the height step between box top and floor, and it competes with σ_Z. A 150 mm step against 25 mm of noise at 2 m is a ramp that thresholding absorbs; the same step against 6 mm at 1 m is a cliff. This is also why changing the floor colour achieves little: colour contrast lives in the RGB image, while the depth engine sees only geometry and IR reflectance.

Give the scene depth contrast instead:

  • Put a matte, dark belt or mat under the boxes. An absorbent surface soaks up the projected pattern instead of specularly bouncing it back, which is what punches holes in glossy floors.
  • Keep the backdrop clearly beyond the box top, because background pixels straddling the step turn into flying pixels — the flying pixels guide shows what they look like and how to reject them.
  • Remember the target is already ideal: rough cardboard returns the pattern diffusely. Shiny stretch wrap over it is the enemy.

Exposure and frame averaging

Leave auto-exposure on for the intensity stream. A fixed long exposure, say 33 ms, buys brightness at the cost of frame rate and motion smear, and neither helps edges. On a moving belt, size the exposure to the pixel instead: at 1 m standoff a pixel is 2.24 mm, so a belt at 0.5 m/s and a 2 ms exposure smears 0.5 m/s × 0.002 s = 1 mm, under half a pixel.

For a static box, average frames rather than lengthen exposure. Noise falls with the square root of the frame count, so averaging 16 frames takes the 6 mm at 1 m down to 6 / √16 = 1.5 mm. Edge-aware filtering continues the job in software; the depth map noise smoothing guide covers the pipeline after capture.

The decision for each set-up

Adjustable mount, static dimensioning station. Set the standoff from the noise budget: for boxes around 150 mm tall, mount at 1.0-1.2 m, force the projector always-on, average 16 frames, and expect heights to land within about ±10 mm.

Mount fixed at 2 m or more by the building. Stop tuning parameters and change how the edge contrast is made:

3D sensorsHikrobot MIS-DP3850-01P 3D laser profile sensorMIS-DP3850-01P
Type
Laser profiler
$12,379.00 · quotedView and quote
3D sensorsHikrobot MV-HLVS-16K100-L60 Line-scan 2.5D, 16K resolution, Sampling rate 120 kHz, Emitting area length 600 mmMV-HLVS-16K100-L60
Type
2.5D inspection
Price on requestView and quote
3D sensorsHikrobot MV-DPS200P-02 Projected structured-light 3D cameraMV-DPS200P-02
Type
Stereo / structured light
$8,829.00 · quotedView and quote

A 3D laser profile sensor such as the MIS-DP3850-01P lays a laser line across the box, so the edge becomes a step in the recovered profile rather than a texture match; the laser line extraction guide covers reading that line cleanly. For continuous conveyor flow, the MV-HLVS-16K100-L60 line-scan 2.5D system pairs 16K resolution with a 120 kHz sampling rate and a 600 mm emitting area length. For scenes where passive stereo runs out of texture, the MV-DPS200P-02 projected structured-light 3D camera brings the pattern projector with it, so edge contrast is designed in rather than hoped for. Weigh the classes against each other in the box dimensioning guide, then browse the 3D sensors range or the camera finder.

Proving the geometry before the overhead install. Do it on a bench stand first:

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

The LS-MNT-0040 professional slide-table stand carries the camera at a 700 mm height on a 400 x 450 mm base, so you can tune the measurement with the same camera you plan to fly. Browse the camera stands category or the accessories finder for taller and X/Y variants, or open the system configurator to match sensor, mount and lighting in one pass.

Checks before you re-mount

  • Compute σ_Z at the planned standoff from f, B and an honest σ_d, and require σ_Z ≤ step / 10 before ordering hardware.
  • Grab the IR intensity stream at the final height and confirm the dot pattern in every frame.
  • Confirm 30 px or more across the box's narrow dimension in the depth image.
  • Check the backdrop: matte, absorbent and beyond the box top, so no background depth mixes into the step.
  • On a belt, size the exposure so motion smear stays under one pixel at the speed you actually run.
  • For static stations, average at least 16 frames and re-run the measurement 20 times to confirm repeatability.

Ten minutes of this arithmetic settles the project before any hardware is ordered; the 3D topic page collects the surrounding guides on placement, calibration and point-cloud cleanup.

Questions

How close can I mount a depth camera before it stops working?

Every fixed-baseline stereo model documents a minimum range, commonly near 0.3-0.5 m, below which disparity saturates and the near field goes invalid. Work down from your current height in 0.2 m steps and stop when the box top no longer fits the field of view or the depth clips. Between that minimum and the height limit from your noise budget, mount at the lower end for the sharpest edges.

Does a higher-resolution depth stream recover the edges?

It helps less than you expect. The noise term scales with Z² divided by the focal length in pixels, so doubling the depth resolution roughly halves the geometric noise at the same standoff. But it does nothing for a missing projector pattern, it multiplies data volume and processing time, and pixel-level matching gets harder on a textureless surface. Fix standoff and emitter first; treat resolution as a fine adjustment.

What accuracy can I expect when dimensioning boxes from depth at 1 m?

With the example geometry, one-sigma depth noise is about 6 mm at 1 m, so a 150 mm box height resolves comfortably and a height reading lands within roughly ±10 mm after averaging 16 frames. Lateral dimensions come from the edge pixels: at 2.24 mm per pixel and one to two pixels of edge uncertainty, expect about ±5 mm on a 400 mm width, near ±1.3 percent.

The ceiling fixes my camera at 2 m. What are my options?

Stop tuning exposure and change how the edge contrast is made. A 3D laser profile sensor lays a laser line across the box, so the edge is a step in the profile rather than a texture match. A line-scan 2.5D system measures boxes continuously on the belt, and a projected structured-light camera is built for scenes where passive stereo has no texture to match. Match the sensor class to the mount, not the mount to the sensor.