Inside AI
← Deep Dives
Deep dive / Edge AI

From three images to one spatial estimate

Trace the separate recognition and geometry paths, then inspect why a neat bounding box can still give the wrong distance.

Device profile · Luxonis OAK-D Lite ↗

1. Two views become a disparity map

StereoDepth compares corresponding features between left and right views. The offset is disparity; camera geometry turns it into depth. Rectification and matching happen before the application sees a usable estimate. Left-right checking can reject inconsistent correspondences around occlusion boundaries. StereoDepth processing

2. Color becomes a label

The color path sends a model-sized image to the detector. Its class and box answer a recognition question; they do not independently establish physical distance. RVC2 schedules neural and image operations across shared accelerators, so adding a second network or high-resolution stream changes the workload. RVC2 architecture

3. The paths must meet in the same image coordinates

SpatialDetectionNetwork aligns depth with the recognition input and samples the region associated with a detection. It offers several depth aggregation methods; the documented default is median. A region containing both foreground and background can still produce an unhelpful estimate. Our proposed build therefore exposes the sampled region during testing instead of showing only a final number. Spatial calculation

4. Turn an estimate into an honest state

Our proposed application uses near, outside-zone and unknown. Choose the range from a marked bench test, require three consecutive fresh accepted observations before a transition, and clear the candidate when a result is invalid. Add a separate timeout for a stopped stream. These are design choices to test, not device guarantees.

The first useful extension

Once the region behavior is understood, try a distance-aware exhibit: a display changes only when a recognized object is placed in a marked physical zone. Keep it informational. Robot braking, human safety and precise dimensional inspection require independent evidence beyond this prototype.

Primary sources

OAK-D Lite hardware reference RVC2 architecture StereoDepth reference SpatialDetectionNetwork reference DepthAI v3 spatial detection example Luxonis model conversion DepthAI v3 installation and API OAK-D Lite official offer