This is MRE... there is just rgbCam and SYNC nodes:
`
from datetime import timedelta
import time
import cv2
import depthai as dai
pipeline = dai.Pipeline()
camRgb = pipeline.create(dai.node.ColorCamera)
sync = pipeline.create(dai.node.Sync)
xoutGrp = pipeline.create(dai.node.XLinkOut)
linkOut = pipeline.create(dai.node.XLinkOut)
xoutGrp.setStreamName('xout')
linkOut.setStreamName('sysinfo')
camRgb.setPreviewSize(640, 352)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P) # THE_1080_P / THE_4_K / THE_13_MP
sync.setSyncThreshold(timedelta(milliseconds=20))
sync.setSyncAttempts(0) # all options behave the same
camRgb.preview.link(sync.inputs["preview"])
camRgb.video.link(sync.inputs["full"]) # this line makes it 12 FPS, otherweise it is 31 FPS
sync.out.link(xoutGrp.input)
with dai.Device(pipeline) as device:
xoutQueue = device.getOutputQueue('xout', maxSize=20, blocking=False)
last_check = time.monotonic()
processed_frames = 0
while (True):
msgGroup = xoutQueue.get()
frame = msgGroup["preview"].getCvFrame()
current_time = time.monotonic()
processed_frames += 1
if (current_time - last_check) > 1.0:
last_check = current_time
print(processed_frames)
processed_frames = 0
cv2.imshow("preview", frame)
if cv2.waitKey(1) == ord('q'):
break
`