Hi @martin181818
Check if these change:
print(device.getDeviceInfo().state)
print(device.getDeviceInfo().status)
Or wrap the loop in try except RuntimeError:
qRgb = device.getOutputQueue("rgb", 1, False)
while True:
try:
print(device.getDeviceInfo().state)
print(device.getDeviceInfo().status)
inRgb = qRgb.tryGet() # blocking call, will wait until a new data has arrived
# Retrieve 'bgr' (opencv format) frame
if inRgb is not None:
cv2.imshow("rgb", inRgb.getCvFrame())
except RuntimeError as e:
## your logic
break
if cv2.waitKey(1) == ord('q'):
device.close()
break
Thanks,
Jaka