自动/固定焦距
概述
抗振性能
- 无人机
- 割草机
- 重型机械
- 哈雷戴维森摩托车(以其强烈振动而闻名)等
对焦范围
手动对焦
- 运行时,使用此示例,您可以使用逗号和句点键来改变对焦
- 在启动时,使用以下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控制器)读取的实际值,是您应该依赖的字段。