Skip to content

Instantly share code, notes, and snippets.

@youngsoul
Created January 15, 2022 02:27
Show Gist options
  • Save youngsoul/88fa6c03e54c983704457d86efcc37b7 to your computer and use it in GitHub Desktop.
Save youngsoul/88fa6c03e54c983704457d86efcc37b7 to your computer and use it in GitHub Desktop.
sample_depthai_pipeline_snippet.py
# Create empty processing pipeline
pipeline = depthai.Pipeline()
# cam_rgb is a ColorCamera node.
# https://docs.luxonis.com/projects/api/en/latest/components/nodes/color_camera/
cam_rgb = pipeline.create(depthai.node.ColorCamera)
cam_rgb.setPreviewSize(400, 400)
# Set planar or interleaved data of preview output frames
cam_rgb.setInterleaved(False)
xout_rgb = pipeline.create(depthai.node.XLinkOut)
xout_rgb.setStreamName('rgb')
cam_rgb.preview.link(xout_rgb.input)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment