/Oak

Code developed for using OAK-D camera

Primary LanguagePythonMIT LicenseMIT

Oak

Code developed for using OAK-D camera

Setup

Make sure to have DepthAI API installed, or install it like this

git clone https://github.com/luxonis/depthai.git
cd depthai
python3 install_requirements.py
python3 depthai_demo.py

Documentation

Luxonis DepthAI Documentation

Projects

Example pipeline

Create a pipeline

import depthai as dai
pipeline = dai.Pipeline()
mono = pipeline.createMonoCamera()  # create camera node
mono.setBoardSocket(dai.CameraBoardSocket.LEFT) # select a camera

Create out node and acquire frames

xout = pipeline.createXLinkOut()
xout.setStreamName("left")
mono.out.link(xout.input)

Get frame in numpy format

with dai.Device(pipeline) as device:
  queue = device.getOutputQueue(name="left")
  frame = queue.get()
  imOut = frame.getCvFrame()