报错提示:
使用OAK-FFC-P跑API里的示例mono-preview.py时,出现如下报错:
Traceback (most recent call last):
line 32,in <module>
File "E:\Proects\PycharmProiects depthai-python-oakchina examples MonoCamera mono_preview.py"
with dai.Device(pipeline) as device:
RuntimeError: MonoCamera(0) - Could not map AUTO camera socket
解决方法:
用OAK-FFC相机时不要使用 setCamera ,使用 setBoardSocket
例如:
setCamera(“left”) -> setBoardSocket(dai.CameraBoardSocket.CAM_B)
setCamera(“right”) -> setBoardSocket(dai.CameraBoardSocket.CAM_C)
这个官方示例可以把这两行代码注释掉,就可以正常跑通。
monoLeft.setCamera(“left”)
monoRight.setCamera(“right”)