Lluxd
- 19 Mar
- Joined Jun 20, 2023
- 0 best answers
@luxd I see, perhaps that was lost when i converted it to python via chatgpt. Yes, setting (all) queues blocking to false should eliminate this. As long as you're reading fast enough it doesn't matter. Since you have only 1 queue you could also use blocking
.get()
to preserve CPU cycles (you're hotlooping otherwise).
You can try to also increase maxSize, it would help if some queue gets filled up, yes.Hi @luxd , this works as expected for me:
#!/usr/bin/env python3 import cv2 import depthai as dai pipeline = dai.Pipeline() camRgb = pipeline.create(dai.node.ColorCamera) xoutVideo = pipeline.create(dai.node.XLinkOut) xoutVideo.setStreamName("video") camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A) camRgb.video.link(xoutVideo.input) with dai.Device(pipeline) as device: video = device.getOutputQueue(name="video", maxSize=1, blocking=False) while True: imgFrame: dai.ImgFrame = video.get() print(imgFrame.getColorTemperature(), imgFrame.getSensitivity()) cv2.imshow("video", imgFrame.getCvFrame()) if cv2.waitKey(1) == ord('q'): break