Inside AI
← Build & Hack
Proposed build / Edge AI

From a depth map to an installed OAK App

Untested first-build guide: obtain a plausible distance map before packaging and testing an on-camera application.

Device profile · Luxonis OAK 4 D Auto Focus ↗
Start with the documented setup

This is a proposed workflow. Follow the linked official setup, then use the checks below to decide whether it works on your hardware.

Luxonis OAK 4 D housing with central RGB lens and left and right stereo cameras.
Official OAK 4 D family photograph, checked 14 Nov 2026. The selected AF SKU shares this housing; this image alone does not identify lens focus or prove internal configuration. Copyright Luxonis; reuse authorization is unverified. Remote source may change. Hardware reference for this proposed build; not a result from our test. Luxonis ↗

Prepare and establish a baseline

Use OAK-4-D-AF, suitable PoE+ power, the included M12-to-RJ45 cable and a computer on the local link. Put a textured planar target at a measured distance within the documented working range. Follow Depth examples or OAK Viewer using the v3/RVC4 route. Confirm changes in target distance produce sensible output; keep the exact preset and resolution.

Package the application

Follow OAK Apps to create main.py, requirements.txt and oakapp.toml, then use oakctl app build and app install. Match oakctl to Luxonis OS before building. The depth example is the baseline; a new distance-zone event logger needs application code and invalid-depth handling. No ready-made logger or executed build is claimed here.

Start, enable and observe

Use the official app list/start/logs commands and app enable for autostart. Observe an application log/output while moving the target. Then disconnect the development computer while preserving camera power. Check continued operation through a planned local output or reconnect and inspect persisted logs; merely losing the viewer is not proof of a stopped app.

Test the offline boundary

After dependencies and models are present, cold-boot with WAN access removed and verify that the enabled app starts. An already-built .oakapp can be installed offline, but that does not ensure every app is network-independent. Record OS/DepthAI/tool versions and failures. Continue with the depth comparison before relying on zone decisions.

Primary sources

Luxonis: OAK 4 D store Luxonis: OAK 4 D specifications and AF availability Luxonis: depth methods and tradeoffs Luxonis: deploying OAK Apps Luxonis: offline RVC4 model conversion Luxonis: DepthAI v3 DepthAI core MIT license Luxonis: temporary OAK 4 surcharge