Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Created January 15, 2022 02:30
Show Gist options
  • Save youngsoul/32e0984ac0a489154fa3b2d623adc8d1 to your computer and use it in GitHub Desktop.
Save youngsoul/32e0984ac0a489154fa3b2d623adc8d1 to your computer and use it in GitHub Desktop.
DepthAI-video-stream-loop-snippet.py
with depthai.Device(pipeline) as device:
q_rgb = device.getOutputQueue("rgb")
frame = None
while True:
in_rgb = q_rgb.tryGet()
if in_rgb is not None:
frame = in_rgb.getCvFrame()
if frame is not None:
cv2.imshow("OAK-1", frame)
if cv2.waitKey(1) == ord('q'):
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment