Hi, some later questions from that thread that I wanted to post into another thread (FFC 4P PoE no camera detected - Luxonis Forum) for cleanliness.
The depthai-viewer is not working for this board with the two cams mentioned (IMX477, IMX582), It's on the newest version. The same depthai-viewer works for the 4-port PoE board with the same 2 cameras:
(DepthAITests) PS C:\Users\Lookout\PycharmProjects\DepthAITests> depthai-viewer
[2023-10-26T18:17:46Z WARN eframe::native::file_storage] Failed to parse RON: 4:5576: Expected end of string
Backend started successfully.
[2023-10-26 14:17:47] INFO [websockets.server.wrap:707] server listening on [::1]:9001
[2023-10-26 14:17:47] INFO [websockets.server.wrap:707] server listening on 127.0.0.1:9001
[2023-10-26T18:17:47Z INFO ewebsock::native_tungstenite] WebSocket handshake has been successfully completed
return _run_code(code, main_globals, None,
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\site-packages\depthai_viewer\_backend\main.py", line 159, in <module>
DepthaiViewerBack()
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\site-packages\depthai_viewer\_backend\main.py", line 53, in init
self.run()
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\site-packages\depthai_viewer\_backend\main.py", line 141, in run
self.result_queue.put(self.handle_action(action, \*\*kwargs))
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\site-packages\depthai_viewer\_backend\main.py", line 119, in handle_action
return self.on_select_device(device_id)
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\site-packages\depthai_viewer\_backend\main.py", line 81, in on_select_device
device_properties = self._device.get_device_properties()
File "C:\Users\Lookout\anaconda3\envs\DepthAITests\lib\site-packages\depthai_viewer\_backend\device.py", line 191, in get_device_properties
biggest_width, biggest_height = [
IndexError: list index out of range
- The depthai-viewer works if only the LCM48 is connected.
- cam_test.py works when both cams are connected (when connected to middle and left port, one cam is oversaturated, when connected to middle and right, it looks good). But, I can't switch between them in operation, can I? More importantly, could I stream them simultaneously (showing both together)?
I have set up a small sample minimal code example to test what I'd like to achieve:
from pathlib import Path
import blobconverter
import cv2
import depthai
import numpy as np
pipeline = depthai.Pipeline()
# Uncomment to get better throughput
pipeline.setXLinkChunkSize(0)
control = pipeline.createXLinkIn()
control.setStreamName('control')
xinTofConfig = pipeline.createXLinkIn()
xinTofConfig.setStreamName('tofConfig')
xout_rgb = pipeline.createXLinkOut()
xout_rgb2 = pipeline.createXLinkOut()
cam_rgb = pipeline.createColorCamera()
cam_rgb2 = pipeline.createColorCamera()
cam_rgb.setPreviewSize(1920, 1080)
cam_rgb2.setPreviewSize(1920, 1080)
cam_rgb.setInterleaved(False)
cam_rgb2.setInterleaved(False)
cam_rgb.setBoardSocket(depthai.CameraBoardSocket.CAM_A)
cam_rgb2.setBoardSocket(depthai.CameraBoardSocket.CAM_C)
# For the rgb camera output, we want the XLink stream to be named "rgb"
xout_rgb.setStreamName("cama")
xout_rgb2.setStreamName("camc")
# Linking camera preview to XLink input, so that the frames will be sent to host
cam_rgb.preview.link(xout_rgb.input)
cam_rgb2.preview.link(xout_rgb2.input)
device = depthai.Device.getDeviceByMxId("")
dai_device_args = [pipeline]
if device[0]:
dai_device_args.append(device[1])
with depthai.Device(*dai_device_args) as device:
q_rgb = device.getOutputQueue("cama") q_rgb2 = device.getOutputQueue("camc") frame = None frame2 = None while True: in_rgb = q_rgb.tryGet() in_rgb2 = q_rgb2.tryGet() if in_rgb is not None: frame = in_rgb.getCvFrame() cv2.imshow("preview", frame) if in_rgb2 is not None: frame2 = in_rgb2.getCvFrame() cv2.imshow("preview", frame2) if cv2.waitKey(1) == ord('q'): break
I only ever get frames from one stream. In this configuration above, I only get streams from port C. If I uncomment everything for camera 2, I get the other camera (from port A).