此页面由 AI 自动翻译。查看英文原版
DepthAI
软件栈

本页目录

  • 相似示例
  • 演示
  • 设置
  • 源代码

校准转储

Supported on:RVC2RVC4
此示例演示了如何读取和显示设备上存储的校准数据。它从设备的 EEPROM 中检索用户校准和工厂校准数据,并以 JSON 格式输出。

相似示例

演示

示例脚本输出显示了 EEPROM 可用性检查和校准数据:
Command Line
1~/depthai-core/examples/python/calibration$ python3 calibration_dump.py
2    Is EEPROM available: True
3    User calibration: {
4      "batchName": "",
5      "batchTime": 1734532871,
6      "boardConf": "IR-C00M00-00",
7      "boardCustom": "",
8      "boardName": "NG9097",
9      "boardOptions": 7,
10      "boardRev": "R4M2E4",
11      "cameraData": [],
12      "deviceName": "",
13      "hardwareConf": "F1-FV01-BC001",
14      "housingExtrinsics": {
15        "rotationMatrix": [],
16        "specTranslation": {
17          "x": 0.0,
18          "y": 0.0,
19          "z": 0.0
20        },
21        "toCameraSocket": -1,
22        "translation": {
23          "x": 0.0,
24          "y": 0.0,
25          "z": 0.0
26        }
27      },
28      "productName": "OAK-D-PRO-W-POE",
29      "version": 7
30      ...
31    }
32    Factory calibration: {
33      ...
34    }

设置

此示例需要 DepthAI v3 API,请参阅 安装说明

源代码

Python
GitHub
1#!/usr/bin/env python3
2
3import depthai as dai
4import json
5
6device = dai.Device(dai.UsbSpeed.HIGH)
7print(f'Is EEPROM available: {device.isEepromAvailable()}')
8
9# User calibration
10try:
11    print(f'User calibration: {json.dumps(device.readCalibration2().eepromToJson(), indent=2)}')
12except Exception as ex:
13    print(f'No user calibration: {ex}')
14
15# Factory calibration
16try:
17    print(f'Factory calibration: {json.dumps(device.readFactoryCalibration().eepromToJson(), indent=2)}')
18except Exception as ex:
19    print(f'No factory calibration: {ex}')

需要帮助?

请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。