OAK StereoDepth shows zero: separate invalid pixels from near-range limits

An OAK StereoDepth value of 0 means invalid or unknown depth, not an object at zero distance. The value alone does not reveal the cause. A blank surface may provide no reliable correspondence, a confidence or brightness filter may reject the pixel, left-right checking may discard an occlusion mismatch, or the target may be too close for the configured disparity range or the cameras’ shared view.

This guide follows the current Luxonis configuration and DepthAI v3 node documentation checked September 20, 2026. We did not run a camera or validate a preset. Treat every numeric range as a property of the exact camera, calibration, resolution, platform and configuration.

First identify why the pixel became invalid

Passive stereo matches visual structure between the left and right images. Luxonis’s scene-texture guidance explains why a blank wall or floor can produce noisy or invalid depth: there may be no distinctive feature to match.

Zero can also be produced deliberately. The documented confidence threshold invalidates disparities that fail its criterion, while brightness filtering can reject underexposed or overexposed pixels. On RVC2, the confidence scale is inverted: 0 is most confident and 255 least. Pixels above the configured threshold become zero; raising the threshold increases fill but can admit weaker matches. Spatial and temporal filters may fill or retain missing values, so a denser output is not automatically more accurate.

Look at the pattern before changing settings. Large holes on a plain surface suggest correspondence or exposure; thin boundary gaps suggest occlusion; failure that begins as an object approaches suggests minimum-range or shared-view geometry.

Use the depth equation before guessing a range

The depth-from-disparity relation is:

z = fB / d

Here, z is depth, f is focal length in pixels, B is the stereo baseline and d is disparity in pixels. A close object produces larger disparity. If the required disparity exceeds the configured search range, the system cannot represent that depth with the current setup. At long range, disparity becomes small, so a small disparity error creates a larger depth error.

This is why there is no useful universal “minimum OAK depth.” The boundary changes with calibration, baseline, resolution and maximum disparity. The current minimum-depth section gives model-specific examples; use the formula with the calibration and mode actually deployed.

Match each mode to the failure it addresses

The controls below answer different questions. Applying all of them at once makes a result harder to interpret.

Diagnostic need Control What it changes Boundary to record
Reject mismatches near occlusions LR Check Compares left-to-right and right-to-left disparity and removes inconsistent pixels Rejection can increase holes near boundaries; on RVC4 it runs in software on CPU
Reach closer disparities Extended Disparity Expands the disparity search toward larger values The RVC2 v3 reference marks it incompatible with subpixel mode; confirm the exact release and platform
Improve disparity precision, especially farther away Subpixel Adds fractional disparity levels RVC2 exposes fractional-bit choices and filter limits; RVC4 fixes subpixel at four fractional bits and does not disable it
Trade fill rate against rejection Confidence and post-processing filters Invalidates, preserves or fills pixels according to filter rules More filled pixels do not prove better depth accuracy

The v3 node’s platform-specific configuration separates RVC2 and RVC4 presets and limitations. Keep that split in logs and tests. In particular, do not transfer an RVC2 mode interaction or fractional-bit setting to RVC4 by name alone.

The LR Check description treats the two camera directions as a consistency test around occlusions. It cannot create texture on a wall or move the geometric near limit; it can only reject inconsistent matches.

Check shared-view geometry for very close objects

Stereo requires the same point to be visible in both cameras. At close range, the left image contains an outer region the right camera cannot see, and vice versa. Luxonis documents these close-range invalid bands. Increasing disparity range does not create a second view where none exists.

Disparity shift can move the searched interval toward closer depths when the far boundary is known, but it reduces maximum range sharply. The v3 reference scopes that control to RVC2. Record both MinZ and MaxZ; a setting that recovers a tabletop target may remove valid background depth.

Diagnose one boundary at a time

  1. Record the OAK model, RVC platform, DepthAI version, calibration, mono resolution, preset, alignment and enabled filters.
  2. Save synchronized rectified left and right frames, disparity and depth. Retain the available confidence diagnostics and mark invalid pixels; the diagnostic outputs available differ by platform.
  3. Place a textured target at the same distance as the failing blank target. If texture restores depth, correspondence is the leading cause.
  4. Move the target through known distances. If failure begins near a repeatable boundary, calculate expected disparity from z = fB/d and inspect shared-view coverage.
  5. Change one control only: LR Check for occlusion consistency, Extended Disparity for closer search, subpixel for precision, or one filter for a stated rejection rule.
  6. Compare valid-pixel rate and error against known geometry. Keep a denser map only when accuracy and boundary behavior remain acceptable.

If the required range or surface conditions remain outside the camera’s useful envelope, return to the broader robot depth-camera selection guide.