自动/固定对焦
自动/固定对焦
概述
振动容差
- 无人机
- 除草机
- 重型机械
- 哈雷戴维森摩托车(以其振动而闻名)等。
对焦范围
手动对焦
- 运行时,使用 此处示例 来更改对焦
- 启动时,使用以下 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 控制器)读取的实际值。您应该依赖此字段。