3D visionTroubleshooting

Missing depth points on tube edges: the stereo occlusion asymmetry

Why missing depth points cluster on one tube edge with a stereo camera, why reversing the rig swaps the side, and the mounting and backdrop that fix it.

LumaSpec Vision11 min read Share on LinkedIn

On this page 9 sections
  1. 01The symptom pattern, and what it rules out
  2. 02Why the band sits on one side: half-occlusion at the depth jump
  3. 03A second mechanism: an edge parallel to the baseline is unmatchable
  4. 04The dead band at 1 m: worked example
  5. 05Ten-minute tests before changing hardware
  6. 06Settings and hardware that hold up outdoors
  7. 07When stereo is the wrong tool for a diameter
  8. 08Checks before you commit
  9. 09Questions

You point a stereo depth camera at a tube to measure its diameter, and the point cloud comes back with a hole along one edge — only one side, and when you turn the camera around, the hole moves to the other side. Brightening the background improves it. That symptom pattern is worth reading precisely, because it rules out the usual suspects: not glare, not a dark surface, not a failing projector. It is the geometry of a two-imager rig. Here you get the mechanism, the width of the dead band to expect at your standoff, ten-minute tests that isolate each cause, the mounting and backdrop that fix it, and the cases where a different tool measures the diameter better.

The symptom pattern, and what it rules out

Three observations carry almost all the diagnostic weight:

  • The missing points sit on one side of the tube, not both.
  • Reversing the camera moves them to the other side.
  • A bright background behind the tube makes them shrink.

An illumination fault — weak projector return, glare, a dark surface — stays where it is when you rotate the rig. A baseline-linked geometry fault rotates with it. The background dependence tells you the matcher is starving for references outside the edge: the same family as the holes you get on specular or dark surfaces in a 3D camera point cloud, and unrelated to the close-range dropout seen on fuzzy surfaces and thin parts.

Why the band sits on one side: half-occlusion at the depth jump

A stereo camera measures depth by matching each pixel of one imager against a row of the other. The two imagers sit a baseline B apart, so they do not see the same scene. Where the tube silhouette meets the background, depth jumps from the tube to whatever is behind it, and disparity jumps with it. A strip of background one disparity-jump wide, directly beside the edge, is visible to one imager and hidden behind the tube in the other. No correspondence exists there, and the left–right consistency check that depth cameras run deletes the strip from the output.

Which side the strip lands on depends on the baseline direction and on which imager the depth image is referenced to. Turn the whole camera around and the imagers trade places, so the hole trades sides. That is exactly your symptom.

d = f · B / Z Δd = f · B · (1/Z_tube − 1/Z_background) dead band ≈ Δd pixels σ_Z ≈ Z² / (f · B) · σ_d

The same discontinuity also produces flying pixels smeared between object and background: pixels that average the two depths instead of going empty. Standoff moves both artifacts — at long range the disparity jump itself shrinks, which is why the edges of a cardboard box vanish from a depth image at long standoff.

What the bright background does is narrower than it looks. Texture on the background gives the matcher valid references everywhere the geometry allows, so the invalid region collapses back to the geometric strip. Without it, matching windows that straddle the edge contain unmatchable background, and the hole spreads onto the tube flank — the pixels you actually need.

A second mechanism: an edge parallel to the baseline is unmatchable

The intuitive mounting — baseline parallel to the tube axis, "so there should be little occlusion" — is half right and wholly unlucky. Occlusion is indeed minimal along an edge that runs parallel to the baseline. But matching searches along the epipolar line, which is parallel to the baseline too. A straight, uniform edge offers no brightness change along the search direction: every candidate shift fits equally, confidence collapses, and the matcher returns invalid depth or leans on whichever side its search finds a reference first. On a bare tube the two imagers see almost identical, translated copies of the surface, so only the projected pattern breaks the tie.

It breaks near the silhouette, because the projected structured-light pattern hits the surface at grazing incidence there: the same dots that cover the flank are stretched and dimmed across a band inside each edge. That part is symmetric on both edges. The asymmetric part — occlusion and search direction — is what swaps sides when you reverse the rig.

The dead band at 1 m: worked example

Put numbers on it. The inputs are illustrative but representative of a compact IR stereo rig — substitute your own baseline and focal length: baseline B = 50 mm, focal length f = 900 px on the depth stream, tube front at Z = 1000 mm, background plane 500 mm behind the tube.

  • Tube disparity: d = 900 × 50 / 1000 = 45 px
  • Background disparity: d = 900 × 50 / 1500 = 30 px
  • Dead band: Δd = 45 − 30 = 15 px beside the edge

Ground sample distance at the tube is Z / f = 1000 / 900 ≈ 1.1 mm per pixel, so 15 px is about 17 mm of lost silhouette. Depth precision is why you never read the diameter from depth values: σ_Z ≈ Z² / (f · B) · σ_d = (1000² / (900 × 50)) × 0.2 ≈ 4.4 mm at 1 m for a 0.2 px subpixel error. The edge location carries the diameter, not the depth reading, so fit a circle or cylinder to the valid flank points. How distance deforms stereo depth edges and what a wide baseline does to long-range depth accuracy both follow from this formula.

Move the backdrop from 500 mm behind the tube to 100 mm behind: Δd = 900 × 50 × (1/1000 − 1/1100) ≈ 4 px. Closer background, smaller jump, narrower band — the cheapest fix on this page.

Ten-minute tests before changing hardware

What you see Mechanism Test Fix
Band swaps sides when the rig is reversed Half-occlusion at the depth jump Reverse the rig and re-capture Baseline across the tube; fit the flank
Band shrinks when anything bright goes behind the tube Background too dark or textureless to match Hold a printed speckle board 100 mm behind Permanent textured backdrop, close behind
Both edges weak, projected dots dim near the silhouettes Grazing incidence of the pattern Tilt the rig a few degrees off-axis Baseline across the tube; IR wash on the backdrop
Depth degrades only in daylight Ambient IR swamps the projected pattern Shade the station and re-capture Long-pass IR filter, shade, or passive texture

Then run these in order:

  1. Rotate the rig 90° so the baseline crosses the tube and capture again — the ambiguity failure disappears, leaving only the bounded geometric strip.
  2. Add a matte board carrying a random printed speckle pattern, dots a few pixels across, 100–200 mm behind the tube, and confirm in the IR stream — not the RGB one — that it is bright.
  3. Load one saved tuning preset for all conditions instead of letting per-frame auto settings wander, then count valid pixels along each edge in the exported cloud.

Settings and hardware that hold up outdoors

Three adjustments carry most of the gain. Raise the auto-exposure mean-intensity set point until the IR stream of both the tube flank and the background sits well above the noise floor. Raise projector power indoors; in daylight it contributes little, because ambient IR dominates and the failure becomes the autoexposure floor of an IR depth camera in bright light. Fix exposure and matching parameters in the viewer's tuning preset — a saved configuration file your application loads before streaming — so outdoor and indoor captures run one known configuration. The general handling of depth camera noise in bright ambient light follows the same order.

On the optical side, a long-pass filter matched to the projector wavelength, fitted over each imager, removes most of the visible ambient that poisons the match. Behind the tube, an infrared bar light washing a matte, patterned board keeps the background references alive in shade and indoors — infrared output at 850 nm or 940 nm does this directly.

When stereo is the wrong tool for a diameter

If the deliverable is a diameter — one number per tube — a stereo camera is an expensive way to get it, because the measurement lives in the silhouette, and the silhouette is exactly where matching is weakest.

Static tube, diameter only: backlight and a 2D camera. Put a diffuse backlight behind the tube and measure the silhouette with an area scan camera: the tube blocks the light, both edges become intensity steps, and subpixel edge fitting does the rest. Worked example: a 12 MP camera with 4000 px across a 100 mm field of view resolves 100 / 4000 = 0.025 mm per pixel. A 60 mm tube spans 60 / 0.025 = 2400 px; a ±0.1 mm tolerance is 0.1 / 0.025 = 4 px per side, and a 0.2 px edge fit reaches 0.2 × 0.025 = 0.005 mm of repeatability. Check your own numbers with the camera resolution calculator.

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

Two cameras from our range cover both speeds:

Area scan camerasHikrobot MV-CU020-90GC 2.5 MP Area Scan Camera, GigE, GMAX4002, ColorMV-CU020-90GC
Sensor format
1/1.7"
Lens mount
C-mount
$309.00View part
Area scan cameras12 MP USB3 area scan camera, IMX226, 1/1.7" rolling shutter, 30 fps, 4000 × 3000 resolution (LS-CMR-0166)LS-CMR-0166
Sensor format
1/1.7"
Interface
USB3
$560.00View part

The MV-CU020-90GC is a 2.5 MP GigE camera with a global shutter — take it when the tube moves. The LS-CMR-0166 resolves 4000 × 3000 at up to 30 fps with a rolling shutter, which suits a stationary part.

Moving line, diameter with height and position: a laser profiler. A profiler throws a line across the tube and reads the height profile directly — no correspondence search, no background dependency, and it holds on bare metal where projected speckle has nothing to grip.

3D sensorsHikrobot MV-DP4180-03P 3D Laser Profile SensorMV-DP4180-03P
Type
Laser profiler
$12,389.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

The MV-DP4180-03P is a 3D laser profile sensor for fixed-standoff gauging on a line. The MV-DLS300P-04, a laser galvanometer stereo camera, adds a scanned laser to stereo geometry for surfaces that defeat passive matching.

The decision, case by case:

  • Diameter of a static tube, no 3D position needed: backlight and a 2D camera.
  • Diameter plus height and position on a moving line: a laser profiler across the tube.
  • Full surface inspection plus diameter, or mixed parts in one capture: keep the stereo rig with the mounting and backdrop fixes above.

For the wider trade-off, see industrial 3D camera selection: stereo, ToF or structured light and choosing a 2D or 3D camera for conveyor pick and place.

Checks before you commit

  • Baseline perpendicular to the tube axis, confirmed in one captured stereo pair — the edge must cross the epipolar lines.
  • Backdrop 100–200 mm behind the tube, matte, patterned, bright in the IR stream — a closer background means a smaller Δd.
  • One preset file loaded by the application, exposure fixed, projector power chosen for the worst-case light.
  • Diameter taken from a circle or cylinder fit to valid flank points, never from single edge pixels or filled depth.
  • Valid-pixel counts along both edges compared between the two mount orientations, expecting the asymmetry to be gone.
  • The exported cloud inspected directly — stereo point cloud visualization: missing XYZ points separates real holes from viewer decimation.

Questions

Why does the dead band swap sides when I reverse the camera?

The depth image is computed against one reference imager. The occluded strip always lies on the side of the edge that the second imager cannot see, so it appears on one side of the tube in the reference view. Reversing the rig trades the imagers' positions, and the strip follows. If the band stayed put through a reversal, you would be looking at an illumination or surface problem instead.

Does a brighter background create depth points, or just hide the holes?

It creates them, within a limit. Every pixel the geometry allows to be matched — background outside the disparity-jump strip, and flank pixels whose windows stop straddling unmatchable background — returns valid depth once the background carries texture. The strip one disparity-jump wide beside the edge stays empty no matter what, because one imager genuinely cannot see it. Count valid pixels before and after: the gain is real up to that strip.

How close behind the tube should the backdrop be?

As close as the process allows. The dead band is f·B·(1/Z_tube − 1/Z_background), so it shrinks as the background depth approaches the tube depth. With the worked numbers — a 50 mm baseline, 900 px focal length, tube at 1000 mm — a backdrop 500 mm behind gives a 15 px band, while 100 mm behind gives about 4 px. Keep a gap that clears the tube's diameter variation and any handling equipment.

Can I fill the missing band in software instead?

You can, and for this measurement you should not. Interpolation across the edge pulls depth values from the flank and the background, rounds the silhouette, and biases any edge-to-edge diameter. Use filling for visualization only; take the diameter from a circle or cylinder fit to the valid flank points, which tolerates an empty strip beside the edge.

Is a laser profiler the better tool for tube diameter?

For diameter as the deliverable, yes, in most cases. A profiler reads a height profile directly — no correspondence search, no background texture requirement, and it holds up on bare metal where projected speckle has nothing to grip. Stereo earns its place when you also need surface appearance or a full field of parts in one capture. If the tube is static and you need only the diameter, a backlight with a 2D camera beats both.