I want to capture color images(1920*1080) at 30 fps without frame drop.
I've try following code, but there seems to be frame drop constantly.
prev_fc = 0
pipeline = dai.Pipeline()
cam_rgb = pipeline.createColorCamera()
cam_rgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
cam_rgb.setFps(30)
cam_rgb.setInterleaved(False)
# If following downscale process is uncommented, frame drops doesn't happen
# cam_rgb.setIspScale(2, 3)
xout_rgb = pipeline.createXLinkOut()
xout_rgb.setStreamName("rgb")
cam_rgb.isp.link(xout_rgb.input)
with dai.Device(pipeline) as device:
q_rgb = device.getOutputQueue("rgb")
frame = None
while True:
in_rgb = q_rgb.get()
frame = in_rgb.getCvFrame()
curr_fc = in_rgb.getSequenceNum()
diff = curr_fc - prev_fc
if diff > 1:
print(f"[Missing {diff-1}] Prev: {prev_fc}, Current: {curr_fc}")
prev_fc = curr_fc
Even if I set "blocking" and "maxSize" for "device.getOutputQueue", frame drop counts seems not to be improve.
But I uncommented "cam_rgb.setIspScale(2, 3)", frame drops doesn't happen in my environment.
I'm using OAK-D Pro PoE and NETGEAR GS108PE. These are connected CAT.6 cable and speed seems to be recognized as 1Gb/s.
Is there better way to access all frames without frame drop at 1080p?