设备信息
设备信息
- 设备名称:IP 地址(对于 OAK PoE 摄像头)或 USB 路径(对于 OAK USB 摄像头)
- MxId:唯一的 Mx(芯片)标识符
- 状态:设备状态。请注意,OAK PoE 摄像头已刷入引导加载程序,该程序会初始化网络堆栈
演示
Command Line
1Searching for all available devices...
2
3Found device '1.3', MxId: '18443010D116631200', State: 'UNBOOTED'
4Found device '192.168.33.201', MxId: '184430102163DB0F00', State: 'BOOTLOADER'
5Found device '192.168.33.192', MxId: '1844301011F4C51200', State: 'BOOTLOADER'
6
7Booting the first available camera (1.3)...
8Available camera sensors: {<CameraBoardSocket.CAM_C: 2>: 'OV9282', <CameraBoardSocket.CAM_A: 0>: 'IMX378', <CameraBoardSocket.CAM_B: 1>: 'OV9282'}
9Product name: OAK-D Pro AF, board name DM9098源代码
Python
PythonGitHub
1import depthai as dai
2from typing import List
3
4print('Searching for all available devices...\n')
5# Query all available devices (USB and POE OAK cameras)
6infos: List[dai.DeviceInfo] = dai.DeviceBootloader.getAllAvailableDevices()
7
8if len(infos) == 0:
9 print("Couldn't find any available devices.")
10 exit(-1)
11
12
13for info in infos:
14 # Converts enum eg. 'XLinkDeviceState.X_LINK_UNBOOTED' to 'UNBOOTED'
15 state = str(info.state).split('X_LINK_')[1]
16
17 print(f"Found device '{info.name}', MxId: '{info.mxid}', State: '{state}'")
18
19
20# Connect to a specific device. We will just take the first one
21print(f"\nBooting the first available camera ({infos[0].name})...")
22with dai.Device(dai.Pipeline(), infos[0], usb2Mode=False) as device:
23 print("Available camera sensors: ", device.getCameraSensorNames())
24 calib = device.readCalibration()
25 eeprom = calib.getEepromData()
26 print(f"Product name: {eeprom.productName}, board name {eeprom.boardName}")需要帮助?
请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。