DepthAI
  • DepthAI组件
    • AprilTags
    • 基准测试
    • 相机
    • 校准
    • DetectionNetwork
    • 事件
    • FeatureTracker
    • HostNodes
    • ImageAlign
    • ImageManip
    • IMU
    • 杂项
    • 模型库
    • NeuralDepth
    • NeuralNetwork
    • ObjectTracker
    • 点云
    • RecordReplay
    • RGBD
    • 脚本
    • SpatialDetectionNetwork
    • SpatialLocationCalculator
    • StereoDepth
    • 同步
    • VideoEncoder
    • 可视化器
    • VSLAM
    • 扭曲
    • RVC2 特有
  • 高级教程
  • API 参考
  • 工具
软件栈

本页目录

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

校准转储

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.getCalibration().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}')

需要帮助?

请前往 OAKChina 官网 获取技术支持或解答您的任何疑问。