# 校准恢复出厂设置

此示例展示了如何对设备校准数据执行恢复出厂设置。此操作会移除任何用户应用的校准，并将设备恢复至其原始出厂校准设置。

## 类似示例

 * [校准写入](https://docs.luxonis.com/software-v3/depthai/examples/calibration/calibration_flash.md)
 * [校准加载](https://docs.luxonis.com/software-v3/depthai/examples/calibration/calibration_load.md)
 * [校准导出](https://docs.luxonis.com/software-v3/depthai/examples/calibration/calibration_dump.md)

## 演示

示例脚本输出显示成功恢复出厂设置：

```bash
~/depthai-core/examples/python/calibration$ python3 calibration_factory_reset.py
恢复出厂设置校准成功
```

如果操作失败，您可能会看到：

```bash
~/depthai-core/examples/python/calibration$ python3 calibration_factory_reset.py
恢复出厂设置校准失败：[错误信息]
```

## 准备工作

这个示例需要DepthAI v3 API，参见[安装说明](https://docs.luxonis.com/software-v3/depthai.md)。

## 源代码

```python
#!/usr/bin/env python3

import depthai as dai

device = dai.Device(dai.UsbSpeed.HIGH)
try:
    device.factoryResetCalibration()
    print(f'Factory reset calibration OK')
except Exception as ex:
    print(f'Factory reset calibration FAIL: {ex}')
```

### 需要帮助？

请前往 [OAKChina 官网](https://www.oakchina.cn/) 获取技术支持或解答您的任何疑问。
