自动/固定对焦
最后更新
概述
抗振性
- 无人机
- 割草机
- 重型机械
- 哈雷戴维森摩托车(以其振动而闻名)等。
对焦范围
手动对焦
- 运行时,通过此处示例,您可以使用“,”和“.”来改变对焦
- 启动时,使用以下 Python 代码:
Python
1pipeline = dai.Pipeline()
2rgbCam = pipeline.create(dai.node.ColorCamera)
3rgbCam.initialControl.setManualFocus(100) # 0..255识别对焦类型

Python
1import depthai as dai
2with dai.Device() as device:
3 print(device.getConnectedCameraFeatures())hasAutofocusIC 字段对于 AF 相机将为 1,对于 FF 相机将为 0。因此在这种情况下,我们的 OAK-D 相机是 AF:Python
1[
2 {socket: CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 0, hasAutofocusIC: 1, name: color},
3 {socket: CAM_B, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: left},
4 {socket: CAM_C, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: right}
5]hasAutofocus字段是存储在 EEPROM 中的(可能不正确),主要用于向后兼容。hasAutofocusIC字段是从相机模块(VCM 控制器)读取的实际值。您应该依赖此字段。