erik Thanks for taking time to try it. Here's my network setup.
- OAK-D PoE Pro is connected to an Ethernet switch
- Host PC (my laptop) is connected to the Ethernet switch
- the Ethernet switch is connected to main network hub
The issue that camera becomes unrecognizable happened randomly and rarely (2 times for 6 hours). I wasn't able to reproduce it on purpose either.
FYI. This is the script I used.
import cv2
import depthai as dai
from test_utils import *
# Create pipeline
pipeline = dai.Pipeline()
# Define source and output
camRgb = pipeline.create(dai.node.ColorCamera)
camRgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_4_K) # THE_1080_P, THE_4_K, THE_12_MP
xoutRgb = pipeline.create(dai.node.XLinkOut)
xoutRgb.setStreamName("rgb")
# Linking
camRgb.isp.link(xoutRgb.input)
print(camRgb.getResolution())
w, h = camRgb.getResolutionSize()
print(w, h)
# print(camRgb.getIspSize())
print("booting")
# Connect to device and start pipeline
with dai.Device(pipeline) as device:
print("up")
# Output queue will be used to get the rgb frames from the output defined above
qRgb = device.getOutputQueue(name="rgb", maxSize=1, blocking=False) # depthai.DataOutputQueue
while True:
# wait_beam_trigger()
# imRgb = qRgb.get() # blocking call, will wait until a new data has arrived
imRgb = qRgb.tryGet() # non-blocking call # depthai.ImgFrame
if imRgb is not None:
im = imRgb.getCvFrame() # numpy.ndarray
down_size = (w//8, h//8)
im_down = cv2.resize(im, down_size, interpolation=cv2.INTER_LINEAR)
print(im.shape, im_down.shape)
cv2.imshow("rgb", im)
cv2.imshow("rgb_down",im_down)
cv2.waitKey()
cv2.destroyAllWindows() # cv2.destroyWindow("rgb")