中国 · 南京 · 栖霞区紫东路2号紫东国际创意园B3-2幢5F
+86-18994094214 (仅工作日:8:30~17:30)
contact@oakchina.cn

【66】RuntimeError: MonoCamera(0) – Could not map AUTO camera socket

View Categories

【66】RuntimeError: MonoCamera(0) – Could not map AUTO camera socket

< 1 min read

报错提示:

使用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”)