# DynamicCalibration

DynamicCalibration is a self-healing, on-device recalibration tool built into DepthAI 3.0. It allows stereo depth cameras to
automatically monitor and restore their stereo extrinsic calibration, ensuring stable depth accuracy over time — even after
thermal shifts, mechanical shocks, or mounting changes degrade factory alignment.

### Key capabilities

 * Restore depth performance — bring your disparity map back to crisp, geometrically consistent output.
 * Continuous or manual operation — works in real time or via manual triggers.
 * Calibration health monitoring — check alignment drift without modifying the device.
 * Fast, robust recalibration — typically completes in seconds using live stereo input.
 * No special targets needed — runs in natural scenes with feature-rich visual content.
 * Supports all stereo cameras running DepthAI 3.0 — including OAK-D, OAK-D-Lite, OAK-D Pro, CM4 PoE, and more.

### Try it out in OAK Viewer (no code required)

The fastest way to test the capabilities of DynamicCalibration is by using the latest version of the OAK-Viewer:

### OAK Viewer

OAK Viewer is a desktop GUI application that allows you to visualize the camera's streams and interact with the device. It is
available for Windows, macOS, and Linux.

[Click here to get started](https://docs.luxonis.com/software-v3/depthai/tools/oak-viewer.md)

## Automatic Calibration Procedures

AutoCalibration provides startup and continuous recalibration procedures under one feature.

### ON_START and CONTINUOUS

 * Start DCL automatically with ON_START before normal operation.
 * Keep DCL running with CONTINUOUS for ongoing self-healing during runtime.
 * No manual DCL trigger needed in your application flow.
 * Better chance of stable calibration in both startup and long-running deployments.

[See integration details](https://docs.luxonis.com/software-v3/depthai/depthai-components/host_nodes/dynamic_calibration.md)

## Scenery guidelines

Good calibration scenes make it easier for algorithms to detect, match, and track features. Recommended characteristics:

 * Include textured objects at multiple depths.
 * Avoid blank walls or featureless surfaces.
 * Slowly move the camera to cover the full FOV; avoid sudden motions.

| Recommendation | Original Image VS. Feature Coverage (in green) |
| --- | --- |
| ✅**Ensure rich texture and visual detail** - rich textures, edges, and objects evenly distributed across FOV create ideal
calibration conditions | |
| 🚫**Avoid flat or featureless surfaces** - lack of textured surfaces or visually distinct objects provide little usable features
| |
| 🚫**Avoid reflective and transparent surfaces** - reflective and transparent surfaces create false 3D features | |
| 🚫**Avoid dark scenes** - low contrast, shadows, and poorly lit scenes yield few detectable features | |
| 🚫**Avoid repetitive patterns** - many patterned regions look too similar to tell apart | |

## Developer Integration

Dynamic Calibration is included in DepthAI and does require extra installation. Run the following example to get an overview of
the implementation.

### Clone & Run the Example

```bash
git clone https://github.com/luxonis/depthai-core.git
cd depthai-core/
python3 -m venv venv
source venv/bin/activate
python3 examples/python/install_requirements.py
python3 examples/python/DynamicCalibration/calibration_integration.py
```

### Implement into your projects

Follow the [dynamic calibration library
documentation](https://docs.luxonis.com/software-v3/depthai/depthai-components/host_nodes/dynamic_calibration.md) to learn how to
implement Dynamic Calibration into your own projects.
