Python API Reference

Classes:

ADatatype

Abstract message

Asset

Asset is identified with string key and can store arbitrary binary data

AssetManager

AssetManager can store assets and serialize

Buffer

Base message - buffer of binary data

CalibrationHandler

CalibrationHandler is an interface to read/load/write structured calibration and device data.

CameraBoardSocket

Which Camera socket to use.

CameraControl

CameraControl message.

CameraImageOrientation

Camera sensor image orientation / pixel readout.

CameraInfo

CameraInfo structure

CameraModel

Which CameraModel to initialize the calibration with.

ChipTemperature

Chip temperature information.

ColorCameraProperties

Specify properties for ColorCamera such as camera ID, …

CpuUsage

CpuUsage structure

DataInputQueue

Access to send messages through XLink stream

DataOutputQueue

Access to receive messages coming from XLink stream

DetectionNetworkProperties

Specify properties for DetectionNetwork

DetectionNetworkType

Members:

Device

Represents the DepthAI device with the methods to interact with it.

DeviceBase

The core of depthai device for RAII, connects to device and maintains watchdog, timesync, …

DeviceBootloader

Represents the DepthAI bootloader with the methods to interact with it.

DeviceDesc

DeviceInfo

Describes a connected device

EdgeDetectorConfig

EdgeDetectorConfig message.

EdgeDetectorConfigData

EdgeDetectorConfigData configuration data structure

EdgeDetectorProperties

Specify properties for EdgeDetector

EepromData

EepromData structure

Extrinsics

Extrinsics structure

FeatureTrackerConfig

FeatureTrackerConfig message.

FeatureTrackerProperties

Specify properties for FeatureTracker

GlobalProperties

Specify properties which apply for whole pipeline

IMUData

IMUData message.

IMUPacket

IMU output

IMUProperties

IMUReport

IMUReportAccelerometer

Accelerometer

IMUReportGyroscope

Gyroscope

IMUReportMagneticField

Magnetic field

IMUReportRotationVectorWAcc

Rotation Vector with Accuracy

IMUSensor

Available IMU sensors.

IMUSensorConfig

ImageManipConfig

ImageManipConfig message.

ImgDetection

ImgDetection structure

ImgDetections

ImgDetections message.

ImgFrame

ImgFrame message.

LogLevel

Members:

MedianFilter

Median filter config for disparity post-processing

MemoryInfo

MemoryInfo structure

MonoCameraProperties

Specify properties for MonoCamera such as camera ID, …

NNData

NNData message.

NeuralNetworkProperties

Specify properties for NeuralNetwork such as blob path, …

Node

Abstract Node

ObjectTrackerProperties

Specify properties for ObjectTracker

OpenVINO

Support for basic OpenVINO related actions like version identification of neural network blobs,…

Pipeline

Point2f

Point2f structure

Point3f

Point3f structure

PrebootConfig

ProcessorType

Members:

RawBuffer

RawBuffer structure

RawCameraControl

RawCameraControl structure

RawEdgeDetectorConfig

RawEdgeDetectorConfig configuration structure

RawFeatureTrackerConfig

RawFeatureTrackerConfig configuration structure

RawIMUData

RawImageManipConfig

RawImageManipConfig structure

RawImgDetections

RawImgDetections structure

RawImgFrame

RawImgFrame structure

RawNNData

RawNNData structure

RawSpatialImgDetections

RawSpatialImgDetections structure

RawStereoDepthConfig

RawStereoDepthConfig configuration structure

RawSystemInformation

System information of device

RawTrackedFeatures

RawTrackedFeatures structure

RawTracklets

RawTracklets structure

Rect

Rect structure

RotatedRect

RotatedRect structure

SPIInProperties

Properties for SPIIn node

SPIOutProperties

Specify properties for SPIOut node

ScriptProperties

Specify ScriptProperties options such as script uri, script name, …

Size2f

Size2f structure

SpatialDetectionNetworkProperties

Specify properties for SpatialDetectionNetwork

SpatialImgDetection

SpatialImgDetection structure

SpatialImgDetections

SpatialImgDetections message.

SpatialLocationCalculatorAlgorithm

Members:

SpatialLocationCalculatorConfig

SpatialLocationCalculatorConfig message.

SpatialLocationCalculatorConfigData

SpatialLocation configuration data structure

SpatialLocationCalculatorConfigThresholds

SpatialLocation configuration thresholds structure

SpatialLocationCalculatorData

SpatialLocationCalculatorData message.

SpatialLocationCalculatorProperties

Specify properties for SpatialLocationCalculator

SpatialLocations

SpatialLocations structure

StereoDepthConfig

StereoDepthConfig message.

StereoDepthProperties

Specify properties for StereoDepth

StereoRectification

StereoRectification structure

SystemInformation

SystemInformation message.

SystemLoggerProperties

SystemLoggerProperties structure

TensorInfo

TensorInfo structure

Timestamp

Timestamp structure

TrackedFeature

TrackedFeature structure

TrackedFeatures

TrackedFeatures message.

TrackerIdAssigmentPolicy

Members:

TrackerType

Members:

Tracklet

Tracklet structure

Tracklets

Tracklets message.

UsbSpeed

Get USB Speed

VideoEncoderProperties

Specify properties for VideoEncoder such as profile, bitrate, …

XLinkConnection

Represents connection between host and device over XLink protocol

XLinkDeviceState

Members:

XLinkPlatform

Members:

XLinkProtocol

Members:

Exceptions:

XLinkError

XLinkReadError

XLinkWriteError

class depthai.ADatatype

Bases: pybind11_builtins.pybind11_object

Abstract message

Methods:

__init__(*args, **kwargs)

Initialize self.

getRaw(self)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

getRaw(self: depthai.ADatatype)depthai.RawBuffer
class depthai.Asset

Bases: pybind11_builtins.pybind11_object

Asset is identified with string key and can store arbitrary binary data

Methods:

__init__(*args, **kwargs)

Overloaded function.

Attributes:

alignment

data

key

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.Asset) -> None

  2. __init__(self: depthai.Asset, arg0: str) -> None

property alignment
property data
property key
class depthai.AssetManager

Bases: pybind11_builtins.pybind11_object

AssetManager can store assets and serialize

Methods:

__init__(self)

addExisting(self, assets)

Adds all assets in an array to the AssetManager

get(*args, **kwargs)

Overloaded function.

getAll(*args, **kwargs)

Overloaded function.

remove(self, key)

Removes asset with key

set(*args, **kwargs)

Overloaded function.

size(self)

returns

Number of asset stored in the AssetManager

__init__(self: depthai.AssetManager)None
addExisting(self: depthai.AssetManager, assets: List[depthai.Asset])None

Adds all assets in an array to the AssetManager

Parameter assets:

Vector of assets to add

get(*args, **kwargs)

Overloaded function.

  1. get(self: depthai.AssetManager, key: str) -> depthai.Asset

Returns

Asset assigned to the specified key or a nullptr otherwise

  1. get(self: depthai.AssetManager, key: str) -> depthai.Asset

Returns

Asset assigned to the specified key or a nullptr otherwise

getAll(*args, **kwargs)

Overloaded function.

  1. getAll(self: depthai.AssetManager) -> List[depthai.Asset]

Returns

All asset stored in the AssetManager

  1. getAll(self: depthai.AssetManager) -> List[depthai.Asset]

Returns

All asset stored in the AssetManager

remove(self: depthai.AssetManager, key: str)None

Removes asset with key

Parameter key:

Key of asset to remove

set(*args, **kwargs)

Overloaded function.

  1. set(self: depthai.AssetManager, asset: depthai.Asset) -> depthai.Asset

Adds or overwrites an asset object to AssetManager.

Parameter asset:

Asset to add

Returns

Shared pointer to asset

  1. set(self: depthai.AssetManager, key: str, asset: depthai.Asset) -> depthai.Asset

Adds or overwrites an asset object to AssetManager with a specificied key. Key value will be assigned to an Asset as well

Parameter key:

Key under which the asset should be stored

Parameter asset:

Asset to store

Returns

Shared pointer to asset

  1. set(self: depthai.AssetManager, key: str, path: str, alignment: int = 64) -> depthai.Asset

Loads file into asset manager under specified key.

Parameter key:

Key under which the asset should be stored

Parameter path:

Path to file which to load as asset

Parameter alignment:

[Optional] alignment of asset data in asset storage. Default is 64B

  1. set(self: depthai.AssetManager, key: str, data: List[int], alignment: int = 64) -> depthai.Asset

Loads file into asset manager under specified key.

Parameter key:

Key under which the asset should be stored

Parameter data:

Asset data

Parameter alignment:

[Optional] alignment of asset data in asset storage. Default is 64B

Returns

Shared pointer to asset

size(self: depthai.AssetManager)int
Returns

Number of asset stored in the AssetManager

class depthai.Buffer

Bases: depthai.ADatatype

Base message - buffer of binary data

Methods:

__init__(self)

Creates Buffer message

getData(self)

returns

Reference to internal buffer

setData(*args, **kwargs)

Overloaded function.

__init__(self: depthai.Buffer)None

Creates Buffer message

getData(self: object) → numpy.ndarray[numpy.uint8]
Returns

Reference to internal buffer

setData(*args, **kwargs)

Overloaded function.

  1. setData(self: depthai.Buffer, arg0: List[int]) -> None

Parameter data:

Copies data to internal buffer

  1. setData(self: depthai.Buffer, arg0: numpy.ndarray[numpy.uint8]) -> None

Parameter data:

Copies data to internal buffer

class depthai.CalibrationHandler

Bases: pybind11_builtins.pybind11_object

CalibrationHandler is an interface to read/load/write structured calibration and device data.

Methods:

__init__(*args, **kwargs)

Overloaded function.

eepromToJsonFile(self, destPath)

Write raw calibration/board data to json file.

getBaselineDistance(self, cam1, cam2, …)

Get the baseline distance between two specified cameras.

getCameraExtrinsics(self, srcCamera, …)

Get the Camera Extrinsics object between two cameras from the calibration data if there is a linked connection between any two cameras then the relative rotation and translation (in centimeters) is returned by this function.

getCameraIntrinsics(*args, **kwargs)

Overloaded function.

getCameraToImuExtrinsics(self, cameraId, …)

Get the Camera To Imu Extrinsics object From the data loaded if there is a linked connection between IMU and the given camera then there relative rotation and translation from the camera to IMU is returned.

getCameraTranslationVector(self, srcCamera, …)

Get the Camera translation vector between two cameras from the calibration data.

getDefaultIntrinsics(self, cameraId)

Get the Default Intrinsics object

getDistortionCoefficients(self, cameraId)

Get the Distortion Coefficients object

getEepromData(self)

Get the Eeprom Data object

getFov(self, cameraId, useSpec)

Get the Fov of the camera

getImuToCameraExtrinsics(self, cameraId, …)

Get the Imu To Camera Extrinsics object from the data loaded if there is a linked connection between IMU and the given camera then there relative rotation and translation from the IMU to Camera is returned.

getLensPosition(self, cameraId)

Get the lens position of the given camera

getStereoLeftCameraId(self)

Get the camera id of the camera which is used as left camera of the stereo setup

getStereoLeftRectificationRotation(self)

Get the Stereo Left Rectification Rotation object

getStereoRightCameraId(self)

Get the camera id of the camera which is used as right camera of the stereo setup

getStereoRightRectificationRotation(self)

Get the Stereo Right Rectification Rotation object

setBoardInfo(self, boardName, boardRev)

Set the Board Info object

setCameraExtrinsics(self, srcCameraId, …)

Set the Camera Extrinsics object

setCameraIntrinsics(*args, **kwargs)

Overloaded function.

setCameraType(self, cameraId, cameraModel)

Set the Camera Type object

setDistortionCoefficients(self, cameraId, …)

Sets the distortion Coefficients obtained from camera calibration

setFov(self, cameraId, hfov)

Set the Fov of the Camera

setImuExtrinsics(self, destCameraId, …)

Set the Imu to Camera Extrinsics object

setLensPosition(self, cameraId, lensPosition)

Sets the distortion Coefficients obtained from camera calibration

setStereoLeft(self, cameraId, rectifiedRotation)

Set the Stereo Left Rectification object

setStereoRight(self, cameraId, rectifiedRotation)

Set the Stereo Right Rectification object

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.CalibrationHandler) -> None

  2. __init__(self: depthai.CalibrationHandler, arg0: str) -> None

Construct a new Calibration Handler object using the eeprom json file created from calibration procedure.

Parameter eepromDataPath:

takes the full path to the json file containing the calibration and device info.

  1. __init__(self: depthai.CalibrationHandler, arg0: str, arg1: str) -> None

Construct a new Calibration Handler object using the board config json file and .calib binary files created using gen1 calibration.

Parameter calibrationDataPath:

Full Path to the .calib binary file from the gen1 calibration. (Supports only Version 5)

Parameter boardConfigPath:

Full Path to the board config json file containing device information.

  1. __init__(self: depthai.CalibrationHandler, arg0: depthai.EepromData) -> None

Construct a new Calibration Handler object from EepromData object.

Parameter eepromData:

EepromData data structure containing the calibration data.

eepromToJsonFile(self: depthai.CalibrationHandler, destPath: str)bool

Write raw calibration/board data to json file.

Parameter destPath:

Full path to the json file in which raw calibration data will be stored

Returns

True on success, false otherwise

getBaselineDistance(self: depthai.CalibrationHandler, cam1: depthai.CameraBoardSocket = <CameraBoardSocket.???: 2>, cam2: depthai.CameraBoardSocket = <CameraBoardSocket.???: 1>, useSpecTranslation: bool = True)float

Get the baseline distance between two specified cameras. By default it will get the baseline between CameraBoardSocket.RIGHT and CameraBoardSocket.LEFT.

Parameter cam1:

First camera

Parameter cam2:

Second camera

Parameter useSpecTranslation:

Enabling this bool uses the translation information from the board design data (not the calibration data)

Returns

baseline distance in centimeters

getCameraExtrinsics(self: depthai.CalibrationHandler, srcCamera: depthai.CameraBoardSocket, dstCamera: depthai.CameraBoardSocket, useSpecTranslation: bool = False) → List[List[float]]

Get the Camera Extrinsics object between two cameras from the calibration data if there is a linked connection between any two cameras then the relative rotation and translation (in centimeters) is returned by this function.

Parameter srcCamera:

Camera Id of the camera which will be considerd as origin.

Parameter dstCamera:

Camera Id of the destination camera to which we are fetching the rotation and translation from the SrcCamera

Parameter useSpecTranslation:

Enabling this bool uses the translation information from the board design data

Returns

a transformationMatrix which is 4x4 in homogenious coordinate system

Matrix representation of transformation matrix f[ text{Transformation Matrix} = left [ begin{matrix} r_{00} & r_{01} & r_{02} & T_x \ r_{10} & r_{11} & r_{12} & T_y \ r_{20} & r_{21} & r_{22} & T_z \ 0 & 0 & 0 & 1 end{matrix} right ] f]

getCameraIntrinsics(*args, **kwargs)

Overloaded function.

  1. getCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, resizeWidth: int = -1, resizeHeight: int = -1, topLeftPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f6ab0b91ab0>, bottomRightPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f6ab0b700b0>) -> List[List[float]]

Get the Camera Intrinsics object

Parameter cameraId:

Uses the cameraId to identify which camera intrinsics to return

Parameter resizewidth:

resized width of the image for which intrinsics is requested. resizewidth = -1 represents width is same as default intrinsics

Parameter resizeHeight:

resized height of the image for which intrinsics is requested. resizeHeight = -1 represents height is same as default intrinsics

Parameter topLeftPixelId:

(x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

Parameter bottomRightPixelId:

(x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

Returns

Repesents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

  1. getCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, destShape: depthai.Size2f, topLeftPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f6ab0b91cb0>, bottomRightPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f6ab0b919b0>) -> List[List[float]]

Get the Camera Intrinsics object

Parameter cameraId:

Uses the cameraId to identify which camera intrinsics to return

Parameter destShape:

resized width and height of the image for which intrinsics is requested.

Parameter topLeftPixelId:

(x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

Parameter bottomRightPixelId:

(x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

Returns

Repesents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

  1. getCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, destShape: Tuple[int, int], topLeftPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f6ab0b91e30>, bottomRightPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f6ab0b91c30>) -> List[List[float]]

Get the Camera Intrinsics object

Parameter cameraId:

Uses the cameraId to identify which camera intrinsics to return

Parameter destShape:

resized width and height of the image for which intrinsics is requested.

Parameter topLeftPixelId:

(x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

Parameter bottomRightPixelId:

(x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

Returns

Repesents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

getCameraToImuExtrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, useSpecTranslation: bool = False) → List[List[float]]

Get the Camera To Imu Extrinsics object From the data loaded if there is a linked connection between IMU and the given camera then there relative rotation and translation from the camera to IMU is returned.

Parameter cameraId:

Camera Id of the camera which will be considerd as origin. from which Transformation matrix to the IMU will be found

Parameter useSpecTranslation:

Enabling this bool uses the translation information from the board design data

Returns

Returns a transformationMatrix which is 4x4 in homogenious coordinate system

Matrix representation of transformation matrix f[ text{Transformation Matrix} = left [ begin{matrix} r_{00} & r_{01} & r_{02} & T_x \ r_{10} & r_{11} & r_{12} & T_y \ r_{20} & r_{21} & r_{22} & T_z \ 0 & 0 & 0 & 1 end{matrix} right ] f]

getCameraTranslationVector(self: depthai.CalibrationHandler, srcCamera: depthai.CameraBoardSocket, dstCamera: depthai.CameraBoardSocket, useSpecTranslation: bool = True) → List[float]

Get the Camera translation vector between two cameras from the calibration data.

Parameter srcCamera:

Camera Id of the camera which will be considerd as origin.

Parameter dstCamera:

Camera Id of the destination camera to which we are fetching the translation vector from the SrcCamera

Parameter useSpecTranslation:

Disabling this bool uses the translation information from the calibration data (not the board design data)

Returns

a translation vector like [x, y, z] in centimeters

getDefaultIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket) → Tuple[List[List[float]], int, int]

Get the Default Intrinsics object

Parameter cameraId:

Uses the cameraId to identify which camera intrinsics to return

Returns

Repesents the 3x3 intrinsics matrix of the respective camera along with width and height at which it was calibrated.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

getDistortionCoefficients(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket) → List[float]

Get the Distortion Coefficients object

Parameter cameraId:

Uses the cameraId to identify which distortion Coefficients to return.

Returns

[k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4,τx,τy]

Return type

the distortion coefficients of the requested camera in this order

getEepromData(self: depthai.CalibrationHandler)depthai.EepromData

Get the Eeprom Data object

Returns

EepromData object which contains the raw calibration data

getFov(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, useSpec: bool = True)float

Get the Fov of the camera

Parameter cameraId:

of the camera of which we are fetching fov.

Parameter useSpec:

Disabling this bool will calculate the fov based on intrinsics (focal length, image width), instead of getting it from the camera specs

Returns

field of view of the camera with given cameraId.

getImuToCameraExtrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, useSpecTranslation: bool = False) → List[List[float]]

Get the Imu To Camera Extrinsics object from the data loaded if there is a linked connection between IMU and the given camera then there relative rotation and translation from the IMU to Camera is returned.

Parameter cameraId:

Camera Id of the camera which will be considerd as destination. To which Transformation matrix from the IMU will be found.

Parameter useSpecTranslation:

Enabling this bool uses the translation information from the board design data

Returns

Returns a transformationMatrix which is 4x4 in homogenious coordinate system

Matrix representation of transformation matrix f[ text{Transformation Matrix} = left [ begin{matrix} r_{00} & r_{01} & r_{02} & T_x \ r_{10} & r_{11} & r_{12} & T_y \ r_{20} & r_{21} & r_{22} & T_z \ 0 & 0 & 0 & 1 end{matrix} right ] f]

getLensPosition(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket)int

Get the lens position of the given camera

Parameter cameraId:

of the camera with lens position is requested.

Returns

lens postion of the camera with given cameraId at which it was calibrated.

getStereoLeftCameraId(self: depthai.CalibrationHandler)depthai.CameraBoardSocket

Get the camera id of the camera which is used as left camera of the stereo setup

Returns

cameraID of the camera used as left camera

getStereoLeftRectificationRotation(self: depthai.CalibrationHandler) → List[List[float]]

Get the Stereo Left Rectification Rotation object

Returns

returns a 3x3 rectification rotation matrix

getStereoRightCameraId(self: depthai.CalibrationHandler)depthai.CameraBoardSocket

Get the camera id of the camera which is used as right camera of the stereo setup

Returns

cameraID of the camera used as right camera

getStereoRightRectificationRotation(self: depthai.CalibrationHandler) → List[List[float]]

Get the Stereo Right Rectification Rotation object

Returns

returns a 3x3 rectification rotation matrix

setBoardInfo(self: depthai.CalibrationHandler, boardName: str, boardRev: str)None

Set the Board Info object

Parameter version:

Sets the version of the Calibration data(Current version is 6)

Parameter boardName:

Sets your board name.

Parameter boardRev:

set your board revision id.

setCameraExtrinsics(self: depthai.CalibrationHandler, srcCameraId: depthai.CameraBoardSocket, destCameraId: depthai.CameraBoardSocket, rotationMatrix: List[List[float]], translation: List[float], specTranslation: List[float] = [0.0, 0.0, 0.0])None

Set the Camera Extrinsics object

Parameter srcCameraId:

Camera Id of the camera which will be considerd as relative origin.

Parameter destCameraId:

Camera Id of the camera which will be considerd as destination from srcCameraId.

Parameter rotationMatrix:

Rotation between srcCameraId and destCameraId origins.

Parameter translation:

Translation between srcCameraId and destCameraId origins.

Parameter specTranslation:

Translation between srcCameraId and destCameraId origins from the design.

setCameraIntrinsics(*args, **kwargs)

Overloaded function.

  1. setCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, intrinsics: List[List[float]], frameSize: depthai.Size2f) -> None

Set the Camera Intrinsics object

Parameter cameraId:

CameraId of the camera for which Camera intrinsics are being loaded

Parameter intrinsics:

3x3 intrinsics matrix

Parameter frameSize:

repesents the width and height of the image at which intrinsics are calculated.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

  1. setCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, intrinsics: List[List[float]], width: int, height: int) -> None

Set the Camera Intrinsics object

Parameter cameraId:

CameraId of the camera for which Camera intrinsics are being loaded

Parameter intrinsics:

3x3 intrinsics matrix

Parameter width:

repesents the width of the image at which intrinsics are calculated.

Parameter height:

repesents the height of the image at which intrinsics are calculated.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

  1. setCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, intrinsics: List[List[float]], frameSize: Tuple[int, int]) -> None

Set the Camera Intrinsics object

Parameter cameraId:

CameraId of the camera for which Camera intrinsics are being loaded

Parameter intrinsics:

3x3 intrinsics matrix

Parameter frameSize:

repesents the width and height of the image at which intrinsics are calculated.

Matrix representation of intrinsic matrix f[ text{Intrinsic Matrix} = left [ begin{matrix} f_x & 0 & c_x \ 0 & f_y & c_y \ 0 & 0 & 1 end{matrix} right ] f]

setCameraType(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, cameraModel: depthai.CameraModel)None

Set the Camera Type object

Parameter cameraId:

CameraId of the camera for which cameraModel Type is being updated.

Parameter cameraModel:

Type of the model the camera represents

setDistortionCoefficients(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, distortionCoefficients: List[float])None

Sets the distortion Coefficients obtained from camera calibration

Parameter cameraId:

Camera Id of the camera for which distoriton coefficients are computed

Parameter distortionCoefficients:

Distortion Coefficients of the respective Camera.

setFov(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, hfov: float)None

Set the Fov of the Camera

Parameter cameraId:

Camera Id of the camera

Parameter hfov:

Horizontal fov of the camera from Camera Datasheet

setImuExtrinsics(self: depthai.CalibrationHandler, destCameraId: depthai.CameraBoardSocket, rotationMatrix: List[List[float]], translation: List[float], specTranslation: List[float] = [0.0, 0.0, 0.0])None

Set the Imu to Camera Extrinsics object

Parameter destCameraId:

Camera Id of the camera which will be considerd as destination from IMU.

Parameter rotationMatrix:

Rotation between srcCameraId and destCameraId origins.

Parameter translation:

Translation between IMU and destCameraId origins.

Parameter specTranslation:

Translation between IMU and destCameraId origins from the design.

setLensPosition(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, lensPosition: int)None

Sets the distortion Coefficients obtained from camera calibration

Parameter cameraId:

Camera Id of the camera

Parameter lensPosition:

lens posiotion value of the camera at the time of calibration

setStereoLeft(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, rectifiedRotation: List[List[float]])None

Set the Stereo Left Rectification object

Parameter cameraId:

CameraId of the camera which will be used as left Camera of stereo Setup

Parameter rectifiedRotation:

Rectification rotation of the left camera required for feature matching

Homography of the Left Rectification = Intrinsics_right * rectifiedRotation * inv(Intrinsics_left)

setStereoRight(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, rectifiedRotation: List[List[float]])None

Set the Stereo Right Rectification object

Parameter cameraId:

CameraId of the camera which will be used as left Camera of stereo Setup

Parameter rectifiedRotation:

Rectification rotation of the left camera required for feature matching

Homography of the Right Rectification = Intrinsics_right * rectifiedRotation * inv(Intrinsics_right)

class depthai.CameraBoardSocket

Bases: pybind11_builtins.pybind11_object

Which Camera socket to use.

AUTO denotes that the decision will be made by device

Members:

AUTO

RGB

LEFT

RIGHT

Attributes:

AUTO

LEFT

RGB

RIGHT

name

value

Methods:

__init__(self, value)

AUTO = <CameraBoardSocket.AUTO: -1>
LEFT = <CameraBoardSocket.LEFT: 1>
RGB = <CameraBoardSocket.RGB: 0>
RIGHT = <CameraBoardSocket.RIGHT: 2>
__init__(self: depthai.CameraBoardSocket, value: int)None
property name
property value
class depthai.CameraControl

Bases: depthai.Buffer

CameraControl message. Specifies various camera control commands like:

  • Still capture

  • Auto focus

  • Anti banding

  • Auto white balance

  • Scene

  • Effect

Classes:

AntiBandingMode

Members:

AutoFocusMode

Members:

AutoWhiteBalanceMode

Members:

Command

Members:

EffectMode

Members:

SceneMode

Members:

Methods:

__init__(self)

Construct CameraControl message

getCaptureStill(self)

Check whether command to capture a still is set

setAntiBandingMode(self, mode)

Set a command to specify auto banding mode

setAutoExposureCompensation(self, compensation)

Set a command to specify auto exposure compensation

setAutoExposureEnable(self)

Set a command to enable auto exposure

setAutoExposureLock(self, lock)

Set a command to specify lock auto exposure

setAutoExposureRegion(self, startX, startY, …)

Set a command to specify auto exposure region in pixels

setAutoFocusMode(self, mode)

Set a command to specify autofocus mode

setAutoFocusRegion(self, startX, startY, …)

Set a command to specify focus region in pixels

setAutoFocusTrigger(self)

Set a command to trigger autofocus

setAutoWhiteBalanceLock(self, lock)

Set a command to specify auto white balance lock

setAutoWhiteBalanceMode(self, mode)

Set a command to specify auto white balance mode

setBrightness(self, value)

Set a command to adjust image brightness

setCaptureStill(self, capture)

Set a command to capture a still image

setChromaDenoise(self, value)

Set a command to adjust chroma denoise amount

setContrast(self, value)

Set a command to adjust image contrast

setEffectMode(self, mode)

Set a command to specify effect mode

setLumaDenoise(self, value)

Set a command to adjust luma denoise amount

setManualExposure(self, exposureTimeUs, …)

Set a command to manually specify exposure

setManualFocus(self, lensPosition)

Set a command to specify manual focus position

setManualWhiteBalance(self, colorTemperatureK)

Set a command to manually specify white-balance color correction

setSaturation(self, value)

Set a command to adjust image saturation

setSceneMode(self, mode)

Set a command to specify scene mode

setSharpness(self, value)

Set a command to adjust image sharpness

setStartStreaming(self)

Set a command to start streaming

setStopStreaming(self)

Set a command to stop streaming

class AntiBandingMode

Bases: pybind11_builtins.pybind11_object

Members:

OFF

MAINS_50_HZ

MAINS_60_HZ

AUTO

Attributes:

AUTO

MAINS_50_HZ

MAINS_60_HZ

OFF

name

value

Methods:

__init__(self, value)

AUTO = <AntiBandingMode.AUTO: 3>
MAINS_50_HZ = <AntiBandingMode.MAINS_50_HZ: 1>
MAINS_60_HZ = <AntiBandingMode.MAINS_60_HZ: 2>
OFF = <AntiBandingMode.OFF: 0>
__init__(self: depthai.RawCameraControl.AntiBandingMode, value: int)None
property name
property value
class AutoFocusMode

Bases: pybind11_builtins.pybind11_object

Members:

OFF

AUTO

MACRO

CONTINUOUS_VIDEO

CONTINUOUS_PICTURE

EDOF

Attributes:

AUTO

CONTINUOUS_PICTURE

CONTINUOUS_VIDEO

EDOF

MACRO

OFF

name

value

Methods:

__init__(self, value)

AUTO = <AutoFocusMode.AUTO: 1>
CONTINUOUS_PICTURE = <AutoFocusMode.CONTINUOUS_PICTURE: 4>
CONTINUOUS_VIDEO = <AutoFocusMode.CONTINUOUS_VIDEO: 3>
EDOF = <AutoFocusMode.EDOF: 5>
MACRO = <AutoFocusMode.MACRO: 2>
OFF = <AutoFocusMode.OFF: 0>
__init__(self: depthai.RawCameraControl.AutoFocusMode, value: int)None
property name
property value
class AutoWhiteBalanceMode

Bases: pybind11_builtins.pybind11_object

Members:

OFF

AUTO

INCANDESCENT

FLUORESCENT

WARM_FLUORESCENT

DAYLIGHT

CLOUDY_DAYLIGHT

TWILIGHT

SHADE

Attributes:

AUTO

CLOUDY_DAYLIGHT

DAYLIGHT

FLUORESCENT

INCANDESCENT

OFF

SHADE

TWILIGHT

WARM_FLUORESCENT

name

value

Methods:

__init__(self, value)

AUTO = <AutoWhiteBalanceMode.AUTO: 1>
CLOUDY_DAYLIGHT = <AutoWhiteBalanceMode.CLOUDY_DAYLIGHT: 6>
DAYLIGHT = <AutoWhiteBalanceMode.DAYLIGHT: 5>
FLUORESCENT = <AutoWhiteBalanceMode.FLUORESCENT: 3>
INCANDESCENT = <AutoWhiteBalanceMode.INCANDESCENT: 2>
OFF = <AutoWhiteBalanceMode.OFF: 0>
SHADE = <AutoWhiteBalanceMode.SHADE: 8>
TWILIGHT = <AutoWhiteBalanceMode.TWILIGHT: 7>
WARM_FLUORESCENT = <AutoWhiteBalanceMode.WARM_FLUORESCENT: 4>
__init__(self: depthai.RawCameraControl.AutoWhiteBalanceMode, value: int)None
property name
property value
class Command

Bases: pybind11_builtins.pybind11_object

Members:

START_STREAM

STOP_STREAM

STILL_CAPTURE

MOVE_LENS

AF_TRIGGER

AE_MANUAL

AE_AUTO

AWB_MODE

SCENE_MODE

ANTIBANDING_MODE

EXPOSURE_COMPENSATION

AE_LOCK

AE_TARGET_FPS_RANGE

AWB_LOCK

CAPTURE_INTENT

CONTROL_MODE

FRAME_DURATION

SENSITIVITY

EFFECT_MODE

AF_MODE

NOISE_REDUCTION_STRENGTH

SATURATION

BRIGHTNESS

STREAM_FORMAT

RESOLUTION

SHARPNESS

CUSTOM_USECASE

CUSTOM_CAPT_MODE

CUSTOM_EXP_BRACKETS

CUSTOM_CAPTURE

CONTRAST

AE_REGION

AF_REGION

LUMA_DENOISE

CHROMA_DENOISE

WB_COLOR_TEMP

Attributes:

AE_AUTO

AE_LOCK

AE_MANUAL

AE_REGION

AE_TARGET_FPS_RANGE

AF_MODE

AF_REGION

AF_TRIGGER

ANTIBANDING_MODE

AWB_LOCK

AWB_MODE

BRIGHTNESS

CAPTURE_INTENT

CHROMA_DENOISE

CONTRAST

CONTROL_MODE

CUSTOM_CAPTURE

CUSTOM_CAPT_MODE

CUSTOM_EXP_BRACKETS

CUSTOM_USECASE

EFFECT_MODE

EXPOSURE_COMPENSATION

FRAME_DURATION

LUMA_DENOISE

MOVE_LENS

NOISE_REDUCTION_STRENGTH

RESOLUTION

SATURATION

SCENE_MODE

SENSITIVITY

SHARPNESS

START_STREAM

STILL_CAPTURE

STOP_STREAM

STREAM_FORMAT

WB_COLOR_TEMP

name

value

Methods:

__init__(self, value)

AE_AUTO = <Command.AE_AUTO: 7>
AE_LOCK = <Command.AE_LOCK: 13>
AE_MANUAL = <Command.AE_MANUAL: 6>
AE_REGION = <Command.AE_REGION: 45>
AE_TARGET_FPS_RANGE = <Command.AE_TARGET_FPS_RANGE: 14>
AF_MODE = <Command.AF_MODE: 26>
AF_REGION = <Command.AF_REGION: 46>
AF_TRIGGER = <Command.AF_TRIGGER: 5>
ANTIBANDING_MODE = <Command.ANTIBANDING_MODE: 10>
AWB_LOCK = <Command.AWB_LOCK: 16>
AWB_MODE = <Command.AWB_MODE: 8>
BRIGHTNESS = <Command.BRIGHTNESS: 31>
CAPTURE_INTENT = <Command.CAPTURE_INTENT: 17>
CHROMA_DENOISE = <Command.CHROMA_DENOISE: 48>
CONTRAST = <Command.CONTRAST: 44>
CONTROL_MODE = <Command.CONTROL_MODE: 18>
CUSTOM_CAPTURE = <Command.CUSTOM_CAPTURE: 43>
CUSTOM_CAPT_MODE = <Command.CUSTOM_CAPT_MODE: 41>
CUSTOM_EXP_BRACKETS = <Command.CUSTOM_EXP_BRACKETS: 42>
CUSTOM_USECASE = <Command.CUSTOM_USECASE: 40>
EFFECT_MODE = <Command.EFFECT_MODE: 24>
EXPOSURE_COMPENSATION = <Command.EXPOSURE_COMPENSATION: 11>
FRAME_DURATION = <Command.FRAME_DURATION: 21>
LUMA_DENOISE = <Command.LUMA_DENOISE: 47>
MOVE_LENS = <Command.MOVE_LENS: 4>
NOISE_REDUCTION_STRENGTH = <Command.NOISE_REDUCTION_STRENGTH: 27>
RESOLUTION = <Command.RESOLUTION: 34>
SATURATION = <Command.SATURATION: 28>
SCENE_MODE = <Command.SCENE_MODE: 9>
SENSITIVITY = <Command.SENSITIVITY: 23>
SHARPNESS = <Command.SHARPNESS: 35>
START_STREAM = <Command.START_STREAM: 1>
STILL_CAPTURE = <Command.STILL_CAPTURE: 3>
STOP_STREAM = <Command.STOP_STREAM: 2>
STREAM_FORMAT = <Command.STREAM_FORMAT: 33>
WB_COLOR_TEMP = <Command.WB_COLOR_TEMP: 49>
__init__(self: depthai.RawCameraControl.Command, value: int)None
property name
property value
class EffectMode

Bases: pybind11_builtins.pybind11_object

Members:

OFF

MONO

NEGATIVE

SOLARIZE

SEPIA

POSTERIZE

WHITEBOARD

BLACKBOARD

AQUA

Attributes:

AQUA

BLACKBOARD

MONO

NEGATIVE

OFF

POSTERIZE

SEPIA

SOLARIZE

WHITEBOARD

name

value

Methods:

__init__(self, value)

AQUA = <EffectMode.AQUA: 8>
BLACKBOARD = <EffectMode.BLACKBOARD: 7>
MONO = <EffectMode.MONO: 1>
NEGATIVE = <EffectMode.NEGATIVE: 2>
OFF = <EffectMode.OFF: 0>
POSTERIZE = <EffectMode.POSTERIZE: 5>
SEPIA = <EffectMode.SEPIA: 4>
SOLARIZE = <EffectMode.SOLARIZE: 3>
WHITEBOARD = <EffectMode.WHITEBOARD: 6>
__init__(self: depthai.RawCameraControl.EffectMode, value: int)None
property name
property value
class SceneMode

Bases: pybind11_builtins.pybind11_object

Members:

UNSUPPORTED

FACE_PRIORITY

ACTION

PORTRAIT

LANDSCAPE

NIGHT

NIGHT_PORTRAIT

THEATRE

BEACH

SNOW

SUNSET

STEADYPHOTO

FIREWORKS

SPORTS

PARTY

CANDLELIGHT

BARCODE

Attributes:

ACTION

BARCODE

BEACH

CANDLELIGHT

FACE_PRIORITY

FIREWORKS

LANDSCAPE

NIGHT

NIGHT_PORTRAIT

PARTY

PORTRAIT

SNOW

SPORTS

STEADYPHOTO

SUNSET

THEATRE

UNSUPPORTED

name

value

Methods:

__init__(self, value)

ACTION = <SceneMode.ACTION: 2>
BARCODE = <SceneMode.BARCODE: 16>
BEACH = <SceneMode.BEACH: 8>
CANDLELIGHT = <SceneMode.CANDLELIGHT: 15>
FACE_PRIORITY = <SceneMode.FACE_PRIORITY: 1>
FIREWORKS = <SceneMode.FIREWORKS: 12>
LANDSCAPE = <SceneMode.LANDSCAPE: 4>
NIGHT = <SceneMode.NIGHT: 5>
NIGHT_PORTRAIT = <SceneMode.NIGHT_PORTRAIT: 6>
PARTY = <SceneMode.PARTY: 14>
PORTRAIT = <SceneMode.PORTRAIT: 3>
SNOW = <SceneMode.SNOW: 9>
SPORTS = <SceneMode.SPORTS: 13>
STEADYPHOTO = <SceneMode.STEADYPHOTO: 11>
SUNSET = <SceneMode.SUNSET: 10>
THEATRE = <SceneMode.THEATRE: 7>
UNSUPPORTED = <SceneMode.UNSUPPORTED: 0>
__init__(self: depthai.RawCameraControl.SceneMode, value: int)None
property name
property value
__init__(self: depthai.CameraControl)None

Construct CameraControl message

getCaptureStill(self: depthai.CameraControl)bool

Check whether command to capture a still is set

Returns

True if capture still command is set

setAntiBandingMode(self: depthai.CameraControl, mode: depthai.RawCameraControl.AntiBandingMode)None

Set a command to specify auto banding mode

Parameter mode:

Auto banding mode to use

setAutoExposureCompensation(self: depthai.CameraControl, compensation: int)None

Set a command to specify auto exposure compensation

Parameter compensation:

Compensation value between -9..9

setAutoExposureEnable(self: depthai.CameraControl)None

Set a command to enable auto exposure

setAutoExposureLock(self: depthai.CameraControl, lock: bool)None

Set a command to specify lock auto exposure

Parameter lock:

Auto exposure lock mode enabled or disabled

setAutoExposureRegion(self: depthai.CameraControl, startX: int, startY: int, width: int, height: int)None

Set a command to specify auto exposure region in pixels

Parameter startX:

X coordinate of top left corner of region

Parameter startY:

Y coordinate of top left corner of region

Parameter width:

Region width

Parameter height:

Region height

setAutoFocusMode(self: depthai.CameraControl, mode: depthai.RawCameraControl.AutoFocusMode)None

Set a command to specify autofocus mode

setAutoFocusRegion(self: depthai.CameraControl, startX: int, startY: int, width: int, height: int)None

Set a command to specify focus region in pixels

Parameter startX:

X coordinate of top left corner of region

Parameter startY:

Y coordinate of top left corner of region

Parameter width:

Region width

Parameter height:

Region height

setAutoFocusTrigger(self: depthai.CameraControl)None

Set a command to trigger autofocus

setAutoWhiteBalanceLock(self: depthai.CameraControl, lock: bool)None

Set a command to specify auto white balance lock

Parameter lock:

Auto white balance lock mode enabled or disabled

setAutoWhiteBalanceMode(self: depthai.CameraControl, mode: depthai.RawCameraControl.AutoWhiteBalanceMode)None

Set a command to specify auto white balance mode

Parameter mode:

Auto white balance mode to use

setBrightness(self: depthai.CameraControl, value: int)None

Set a command to adjust image brightness

Parameter value:

Brightness, range -10..10

setCaptureStill(self: depthai.CameraControl, capture: bool)None

Set a command to capture a still image

setChromaDenoise(self: depthai.CameraControl, value: int)None

Set a command to adjust chroma denoise amount

Parameter value:

Chroma denoise amount, range 0..4

setContrast(self: depthai.CameraControl, value: int)None

Set a command to adjust image contrast

Parameter value:

Contrast, range -10..10

setEffectMode(self: depthai.CameraControl, mode: depthai.RawCameraControl.EffectMode)None

Set a command to specify effect mode

Parameter mode:

Effect mode

setLumaDenoise(self: depthai.CameraControl, value: int)None

Set a command to adjust luma denoise amount

Parameter value:

Luma denoise amount, range 0..4

setManualExposure(self: depthai.CameraControl, exposureTimeUs: int, sensitivityIso: int)None

Set a command to manually specify exposure

Parameter exposureTimeUs:

Exposure time in microseconds

Parameter sensitivityIso:

Sensitivity as ISO value, usual range 100..1600

setManualFocus(self: depthai.CameraControl, lensPosition: int)None

Set a command to specify manual focus position

Parameter lensPosition:

specify lens position 0..255

setManualWhiteBalance(self: depthai.CameraControl, colorTemperatureK: int)None

Set a command to manually specify white-balance color correction

Parameter colorTemperatureK:

Light source color temperature in kelvins, range 1000..12000

setSaturation(self: depthai.CameraControl, value: int)None

Set a command to adjust image saturation

Parameter value:

Saturation, range -10..10

setSceneMode(self: depthai.CameraControl, mode: depthai.RawCameraControl.SceneMode)None

Set a command to specify scene mode

Parameter mode:

Scene mode

setSharpness(self: depthai.CameraControl, value: int)None

Set a command to adjust image sharpness

Parameter value:

Sharpness, range 0..4

setStartStreaming(self: depthai.CameraControl)None

Set a command to start streaming

setStopStreaming(self: depthai.CameraControl)None

Set a command to stop streaming

class depthai.CameraImageOrientation

Bases: pybind11_builtins.pybind11_object

Camera sensor image orientation / pixel readout. This exposes direct sensor settings. 90 or 270 degrees rotation is not available.

AUTO denotes that the decision will be made by device (e.g. on OAK-1/megaAI: ROTATE_180_DEG).

Members:

AUTO

NORMAL

HORIZONTAL_MIRROR

VERTICAL_FLIP

ROTATE_180_DEG

Attributes:

AUTO

HORIZONTAL_MIRROR

NORMAL

ROTATE_180_DEG

VERTICAL_FLIP

name

value

Methods:

__init__(self, value)

AUTO = <CameraImageOrientation.AUTO: -1>
HORIZONTAL_MIRROR = <CameraImageOrientation.HORIZONTAL_MIRROR: 1>
NORMAL = <CameraImageOrientation.NORMAL: 0>
ROTATE_180_DEG = <CameraImageOrientation.ROTATE_180_DEG: 3>
VERTICAL_FLIP = <CameraImageOrientation.VERTICAL_FLIP: 2>
__init__(self: depthai.CameraImageOrientation, value: int)None
property name
property value
class depthai.CameraInfo

Bases: pybind11_builtins.pybind11_object

CameraInfo structure

Methods:

__init__(self)

Attributes:

cameraType

distortionCoeff

extrinsics

height

intrinsicMatrix

specHfovDeg

width

__init__(self: depthai.CameraInfo)None
property cameraType
property distortionCoeff
property extrinsics
property height
property intrinsicMatrix
property specHfovDeg
property width
class depthai.CameraModel

Bases: pybind11_builtins.pybind11_object

Which CameraModel to initialize the calibration with.

Members:

Perspective

Fisheye

Equirectangular

RadialDivision

Attributes:

Equirectangular

Fisheye

Perspective

RadialDivision

name

value

Methods:

__init__(self, value)

Equirectangular = <CameraModel.Equirectangular: 2>
Fisheye = <CameraModel.Fisheye: 1>
Perspective = <CameraModel.Perspective: 0>
RadialDivision = <CameraModel.RadialDivision: 3>
__init__(self: depthai.CameraModel, value: int)None
property name
property value
class depthai.ChipTemperature

Bases: pybind11_builtins.pybind11_object

Chip temperature information.

Multiple temperature measurement points and their average

Methods:

__init__(self)

Attributes:

average

css

dss

mss

upa

__init__(self: depthai.ChipTemperature)None
property average
property css
property dss
property mss
property upa
class depthai.ColorCameraProperties

Bases: pybind11_builtins.pybind11_object

Specify properties for ColorCamera such as camera ID, …

Classes:

ColorOrder

For 24 bit color these can be either RGB or BGR

SensorResolution

Select the camera sensor resolution

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

boardSocket

colorOrder

fps

initialControl

interleaved

previewHeight

previewWidth

resolution

sensorCropX

sensorCropY

stillHeight

stillWidth

videoHeight

videoWidth

class ColorOrder

Bases: pybind11_builtins.pybind11_object

For 24 bit color these can be either RGB or BGR

Members:

BGR

RGB

Attributes:

BGR

RGB

name

value

Methods:

__init__(self, value)

BGR = <ColorOrder.BGR: 0>
RGB = <ColorOrder.RGB: 1>
__init__(self: depthai.ColorCameraProperties.ColorOrder, value: int)None
property name
property value
class SensorResolution

Bases: pybind11_builtins.pybind11_object

Select the camera sensor resolution

Members:

THE_1080_P

THE_4_K

THE_12_MP

THE_13_MP

Attributes:

THE_1080_P

THE_12_MP

THE_13_MP

THE_4_K

name

value

Methods:

__init__(self, value)

THE_1080_P = <SensorResolution.THE_1080_P: 0>
THE_12_MP = <SensorResolution.THE_12_MP: 2>
THE_13_MP = <SensorResolution.THE_13_MP: 3>
THE_4_K = <SensorResolution.THE_4_K: 1>
__init__(self: depthai.ColorCameraProperties.SensorResolution, value: int)None
property name
property value
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property boardSocket
property colorOrder
property fps
property initialControl
property interleaved
property previewHeight
property previewWidth
property resolution
property sensorCropX
property sensorCropY
property stillHeight
property stillWidth
property videoHeight
property videoWidth
class depthai.CpuUsage

Bases: pybind11_builtins.pybind11_object

CpuUsage structure

Average usage in percent and time span of the average (since last query)

Methods:

__init__(self)

Attributes:

average

msTime

__init__(self: depthai.CpuUsage)None
property average
property msTime
class depthai.DataInputQueue

Bases: pybind11_builtins.pybind11_object

Access to send messages through XLink stream

Methods:

__init__(*args, **kwargs)

Initialize self.

close(self)

Closes the queue and the underlying thread

getBlocking(self)

Gets current queue behavior when full (maxSize)

getMaxSize(self)

Gets queue maximum size

getName(self)

Gets queues name

isClosed(self)

Check whether queue is closed

send(*args, **kwargs)

Overloaded function.

setBlocking(self, blocking)

Sets queue behavior when full (maxSize)

setMaxSize(self, maxSize)

Sets queue maximum size

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

close(self: depthai.DataInputQueue)None

Closes the queue and the underlying thread

getBlocking(self: depthai.DataInputQueue)bool

Gets current queue behavior when full (maxSize)

Returns

True if blocking, false otherwise

getMaxSize(self: depthai.DataInputQueue)int

Gets queue maximum size

Returns

Maximum queue size

getName(self: depthai.DataInputQueue)str

Gets queues name

Returns

Queue name

isClosed(self: depthai.DataInputQueue)bool

Check whether queue is closed

send(*args, **kwargs)

Overloaded function.

  1. send(self: depthai.DataInputQueue, msg: depthai.ADatatype) -> None

Adds a message to the queue, which will be picked up and sent to the device. Can either block if ‘blocking’ behavior is true or overwrite oldest

Parameter msg:

Message to add to the queue

  1. send(self: depthai.DataInputQueue, rawMsg: depthai.RawBuffer) -> None

Adds a raw message to the queue, which will be picked up and sent to the device. Can either block if ‘blocking’ behavior is true or overwrite oldest

Parameter rawMsg:

Message to add to the queue

setBlocking(self: depthai.DataInputQueue, blocking: bool)None

Sets queue behavior when full (maxSize)

Parameter blocking:

Specifies if block or overwrite the oldest message in the queue

setMaxSize(self: depthai.DataInputQueue, maxSize: int)None

Sets queue maximum size

Parameter maxSize:

Specifies maximum number of messages in the queue

class depthai.DataOutputQueue

Bases: pybind11_builtins.pybind11_object

Access to receive messages coming from XLink stream

Methods:

__init__(*args, **kwargs)

Initialize self.

addCallback(*args, **kwargs)

Overloaded function.

close(self)

Closes the queue and the underlying thread

get(self)

Block until a message is available.

getAll(self)

Block until at least one message in the queue.

getBlocking(self)

Gets current queue behavior when full (maxSize)

getMaxSize(self)

Gets queue maximum size

getName(self)

Gets queues name

has(self)

Check whether front of the queue has a message (isn’t empty)

isClosed(self)

Check whether queue is closed

removeCallback(self, callbackId)

Removes a callback

setBlocking(self, blocking)

Sets queue behavior when full (maxSize)

setMaxSize(self, maxSize)

Sets queue maximum size

tryGet(self)

Try to retrieve message from queue.

tryGetAll(self)

Try to retrieve all messages in the queue.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addCallback(*args, **kwargs)

Overloaded function.

  1. addCallback(self: depthai.DataOutputQueue, callback: function) -> int

Adds a callback on message received

Parameter callback:

Callback function with queue name and message pointer

Returns

Callback id

  1. addCallback(self: depthai.DataOutputQueue, callback: function) -> int

Adds a callback on message received

Parameter callback:

Callback function with message pointer

Returns

Callback id

  1. addCallback(self: depthai.DataOutputQueue, callback: function) -> int

Adds a callback on message received

Parameter callback:

Callback function without any parameters

Returns

Callback id

close(self: depthai.DataOutputQueue)None

Closes the queue and the underlying thread

get(self: depthai.DataOutputQueue)depthai.ADatatype

Block until a message is available.

Returns

Message or nullptr if no message available

getAll(self: depthai.DataOutputQueue) → List[depthai.ADatatype]

Block until at least one message in the queue. Then return all messages from the queue.

Returns

Vector of messages

getBlocking(self: depthai.DataOutputQueue)bool

Gets current queue behavior when full (maxSize)

Returns

True if blocking, false otherwise

getMaxSize(self: depthai.DataOutputQueue)int

Gets queue maximum size

Returns

Maximum queue size

getName(self: depthai.DataOutputQueue)str

Gets queues name

Returns

Queue name

has(self: depthai.DataOutputQueue)bool

Check whether front of the queue has a message (isn’t empty)

Returns

True if queue isn’t empty, false otherwise

isClosed(self: depthai.DataOutputQueue)bool

Check whether queue is closed

removeCallback(self: depthai.DataOutputQueue, callbackId: int)bool

Removes a callback

Parameter callbackId:

Id of callback to be removed

Returns

True if callback was removed, false otherwise

setBlocking(self: depthai.DataOutputQueue, blocking: bool)None

Sets queue behavior when full (maxSize)

Parameter blocking:

Specifies if block or overwrite the oldest message in the queue

setMaxSize(self: depthai.DataOutputQueue, maxSize: int)None

Sets queue maximum size

Parameter maxSize:

Specifies maximum number of messages in the queue

tryGet(self: depthai.DataOutputQueue)depthai.ADatatype

Try to retrieve message from queue. If no message available, return immidiately with nullptr

Returns

Message or nullptr if no message available

tryGetAll(self: depthai.DataOutputQueue) → List[depthai.ADatatype]

Try to retrieve all messages in the queue.

Returns

Vector of messages

class depthai.DetectionNetworkProperties

Bases: depthai.NeuralNetworkProperties

Specify properties for DetectionNetwork

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

anchorMasks

anchors

classes

confidenceThreshold

coordinates

iouThreshold

nnFamily

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property anchorMasks
property anchors
property classes
property confidenceThreshold
property coordinates
property iouThreshold
property nnFamily
class depthai.DetectionNetworkType

Bases: pybind11_builtins.pybind11_object

Members:

YOLO

MOBILENET

Attributes:

MOBILENET

YOLO

name

value

Methods:

__init__(self, value)

MOBILENET = <DetectionNetworkType.MOBILENET: 1>
YOLO = <DetectionNetworkType.YOLO: 0>
__init__(self: depthai.DetectionNetworkType, value: int)None
property name
property value
class depthai.Device

Bases: depthai.DeviceBase

Represents the DepthAI device with the methods to interact with it. Implements the host-side queues to connect with XLinkIn and XLinkOut nodes

Classes:

Config

Device specific configuration

Methods:

__init__(*args, **kwargs)

Overloaded function.

getInputQueue(*args, **kwargs)

Overloaded function.

getInputQueueNames(self)

Get all available input queue names

getOutputQueue(*args, **kwargs)

Overloaded function.

getOutputQueueNames(self)

Get all available output queue names

getQueueEvent(*args, **kwargs)

Overloaded function.

getQueueEvents(*args, **kwargs)

Overloaded function.

class Config

Bases: pybind11_builtins.pybind11_object

Device specific configuration

Methods:

__init__(self)

Attributes:

preboot

version

__init__(self: depthai.Device.Config)None
property preboot
property version
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline, usb2Mode: bool) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline, pathToCmd: str) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline, devInfo: depthai.DeviceInfo, usb2Mode: bool = False) -> None

Connects to device specified by devInfo.

Parameter pipeline:

Pipeline to be executed on the device

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline, deviceInfo: depthai.DeviceInfo, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to device specified by devInfo.

Parameter pipeline:

Pipeline to be executed on the device

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.Device, pipeline: depthai.Pipeline, devInfo: depthai.DeviceInfo, pathToCmd: str) -> None

Connects to device specified by devInfo.

Parameter pipeline:

Pipeline to be executed on the device

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version = <Version.???: 5>) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version Pipeline::DEFAULT_OPENVINO_VERSION

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version, usb2Mode: bool = False) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter version:

OpenVINO version which the device will be booted with

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version, pathToCmd: str) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter version:

OpenVINO version which the device will be booted with

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version, deviceDesc: depthai.DeviceInfo, usb2Mode: bool = False) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version, deviceInfo: depthai.DeviceInfo, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.Device, version: depthai.OpenVINO.Version, deviceDesc: depthai.DeviceInfo, pathToCmd: str) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.Device, config: depthai.Device.Config) -> None

Connects to any available device with custom config.

Parameter config:

Device custom configuration to boot with

  1. __init__(self: depthai.Device, config: depthai.Device.Config, deviceInfo: depthai.DeviceInfo) -> None

Connects to device ‘devInfo’ with custom config.

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter config:

Device custom configuration to boot with

getInputQueue(*args, **kwargs)

Overloaded function.

  1. getInputQueue(self: depthai.Device, name: str) -> depthai.DataInputQueue

Gets an input queue corresponding to stream name. If it doesn’t exist it throws

Parameter name:

Queue/stream name, set in XLinkIn node

Returns

Smart pointer to DataInputQueue

  1. getInputQueue(self: depthai.Device, name: str, maxSize: int, blocking: bool = True) -> depthai.DataInputQueue

Gets an input queue corresponding to stream name. If it doesn’t exist it throws. Also sets queue options

Parameter name:

Queue/stream name, set in XLinkOut node

Parameter maxSize:

Maximum number of messages in queue

Parameter blocking:

Queue behavior once full. True: blocking, false: overwriting of oldest messages. Default: true

Returns

Smart pointer to DataInputQueue

getInputQueueNames(self: depthai.Device) → List[str]

Get all available input queue names

Returns

Vector of input queue names

getOutputQueue(*args, **kwargs)

Overloaded function.

  1. getOutputQueue(self: depthai.Device, name: str) -> depthai.DataOutputQueue

Gets an output queue corresponding to stream name. If it doesn’t exist it throws

Parameter name:

Queue/stream name, created by XLinkOut node

Returns

Smart pointer to DataOutputQueue

  1. getOutputQueue(self: depthai.Device, name: str, maxSize: int, blocking: bool = True) -> depthai.DataOutputQueue

Gets a queue corresponding to stream name, if it exists, otherwise it throws. Also sets queue options

Parameter name:

Queue/stream name, set in XLinkOut node

Parameter maxSize:

Maximum number of messages in queue

Parameter blocking:

Queue behavior once full. True specifies blocking and false overwriting of oldest messages. Default: true

Returns

Smart pointer to DataOutputQueue

getOutputQueueNames(self: depthai.Device) → List[str]

Get all available output queue names

Returns

Vector of output queue names

getQueueEvent(*args, **kwargs)

Overloaded function.

  1. getQueueEvent(self: depthai.Device, queueNames: List[str], timeout: datetime.timedelta = datetime.timedelta(days=-1, seconds=86399, microseconds=999999)) -> str

Gets or waits until any of specified queues has received a message

Parameter queueNames:

Names of queues for which to wait for

Parameter timeout:

Timeout after which return regardless. If negative then wait is indefinite. Default is -1

Returns

Queue name which received a message first

  1. getQueueEvent(self: depthai.Device, queueName: str, timeout: datetime.timedelta = datetime.timedelta(days=-1, seconds=86399, microseconds=999999)) -> str

Gets or waits until specified queue has received a message

Parameter queueNames:

Name of queues for which to wait for

Parameter timeout:

Timeout after which return regardless. If negative then wait is indefinite. Default is -1

Returns

Queue name which received a message

  1. getQueueEvent(self: depthai.Device, timeout: datetime.timedelta = datetime.timedelta(days=-1, seconds=86399, microseconds=999999)) -> str

Gets or waits until any queue has received a message

Parameter timeout:

Timeout after which return regardless. If negative then wait is indefinite. Default is -1

Returns

Queue name which received a message

getQueueEvents(*args, **kwargs)

Overloaded function.

  1. getQueueEvents(self: depthai.Device, queueNames: List[str], maxNumEvents: int = 18446744073709551615, timeout: datetime.timedelta = datetime.timedelta(days=-1, seconds=86399, microseconds=999999)) -> List[str]

Gets or waits until any of specified queues has received a message

Parameter queueNames:

Names of queues for which to block

Parameter maxNumEvents:

Maximum number of events to remove from queue - Default is unlimited

Parameter timeout:

Timeout after which return regardless. If negative then wait is indefinite - Default is -1

Returns

Names of queues which received messages first

  1. getQueueEvents(self: depthai.Device, queueName: str, maxNumEvents: int = 18446744073709551615, timeout: datetime.timedelta = datetime.timedelta(days=-1, seconds=86399, microseconds=999999)) -> List[str]

Gets or waits until specified queue has received a message

Parameter queueName:

Name of queues for which to wait for

Parameter maxNumEvents:

Maximum number of events to remove from queue. Default is unlimited

Parameter timeout:

Timeout after which return regardless. If negative then wait is indefinite. Default is -1

Returns

Names of queues which received messages first

  1. getQueueEvents(self: depthai.Device, maxNumEvents: int = 18446744073709551615, timeout: datetime.timedelta = datetime.timedelta(days=-1, seconds=86399, microseconds=999999)) -> List[str]

Gets or waits until any any queue has received a message

Parameter maxNumEvents:

Maximum number of events to remove from queue. Default is unlimited

Parameter timeout:

Timeout after which return regardless. If negative then wait is indefinite. Default is -1

Returns

Names of queues which received messages first

class depthai.DeviceBase

Bases: pybind11_builtins.pybind11_object

The core of depthai device for RAII, connects to device and maintains watchdog, timesync, …

Methods:

__init__(*args, **kwargs)

Overloaded function.

addLogCallback(self, callback, None])

Add a callback for device logging.

close(self)

Closes the connection to device.

flashCalibration(self, calibrationDataHandler)

Stores the Calibration and Device information to the Device EEPROM

getAllAvailableDevices()

Returns all connected devices

getAnyAvailableDevice(*args, **kwargs)

Overloaded function.

getCameraSensorNames(self)

Get sensor names for cameras that are connected to the device

getChipTemperature(self)

Retrieves current chip temperature as measured by device

getCmxMemoryUsage(self)

Retrieves current CMX memory information from device

getConnectedCameras(self)

Get cameras that are connected to the device

getDdrMemoryUsage(self)

Retrieves current DDR memory information from device

getDeviceByMxId(mxId)

Finds a device by MX ID.

getDeviceInfo(self)

Get the Device Info object o the device which is currently running

getEmbeddedDeviceBinary(*args, **kwargs)

Overloaded function.

getFirstAvailableDevice()

Gets first available device.

getLeonCssCpuUsage(self)

Retrieves average CSS Leon CPU usage

getLeonCssHeapUsage(self)

Retrieves current CSS Leon CPU heap information from device

getLeonMssCpuUsage(self)

Retrieves average MSS Leon CPU usage

getLeonMssHeapUsage(self)

Retrieves current MSS Leon CPU heap information from device

getLogLevel(self)

Gets current logging severity level of the device.

getLogOutputLevel(self)

Gets logging level which decides printing level to standard output.

getMxId(self)

Get MxId of device

getSystemInformationLoggingRate(self)

Gets current rate of system information logging (“info” severity) in Hz.

getUsbSpeed(self)

Retrieves USB connection speed

getXLinkChunkSize(self)

Gets current XLink chunk size.

isClosed(self)

Check if the device is still connected`

isPipelineRunning(self)

Checks if devices pipeline is already running

readCalibration(self)

Fetches the EEPROM data from the device and loads it into CalibrationHandler object

removeLogCallback(self, callbackId)

Removes a callback

setLogLevel(self, level)

Sets the devices logging severity level.

setLogOutputLevel(self, level)

Sets logging level which decides printing level to standard output.

setSystemInformationLoggingRate(self, rateHz)

Sets rate of system information logging (“info” severity).

setXLinkChunkSize(self, sizeBytes)

Sets the chunk size for splitting device-sent XLink packets.

startPipeline(*args, **kwargs)

Overloaded function.

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, usb2Mode: bool) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, pathToCmd: str) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter pipeline:

Pipeline to be executed on the device

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, devInfo: depthai.DeviceInfo, usb2Mode: bool = False) -> None

Connects to device specified by devInfo.

Parameter pipeline:

Pipeline to be executed on the device

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, deviceInfo: depthai.DeviceInfo, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to device specified by devInfo.

Parameter pipeline:

Pipeline to be executed on the device

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, devInfo: depthai.DeviceInfo, pathToCmd: str) -> None

Connects to device specified by devInfo.

Parameter pipeline:

Pipeline to be executed on the device

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version = <Version.???: 5>) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version Pipeline::DEFAULT_OPENVINO_VERSION

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, usb2Mode: bool = False) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter version:

OpenVINO version which the device will be booted with

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, pathToCmd: str) -> None

Connects to any available device with a DEFAULT_SEARCH_TIME timeout.

Parameter version:

OpenVINO version which the device will be booted with

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, deviceDesc: depthai.DeviceInfo, usb2Mode: bool = False) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter usb2Mode:

Boot device using USB2 mode firmware

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, deviceInfo: depthai.DeviceInfo, maxUsbSpeed: depthai.UsbSpeed) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter maxUsbSpeed:

Maximum allowed USB speed

  1. __init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, deviceDesc: depthai.DeviceInfo, pathToCmd: str) -> None

Connects to device specified by devInfo.

Parameter version:

OpenVINO version which the device will be booted with

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter pathToCmd:

Path to custom device firmware

  1. __init__(self: depthai.DeviceBase, config: depthai.Device.Config) -> None

Connects to any available device with custom config.

Parameter config:

Device custom configuration to boot with

  1. __init__(self: depthai.DeviceBase, config: depthai.Device.Config, deviceInfo: depthai.DeviceInfo) -> None

Connects to device ‘devInfo’ with custom config.

Parameter devInfo:

DeviceInfo which specifies which device to connect to

Parameter config:

Device custom configuration to boot with

addLogCallback(self: depthai.DeviceBase, callback: Callable[[dai::LogMessage], None])int

Add a callback for device logging. The callback will be called from a separate thread with the LogMessage being passed.

Parameter callback:

Callback to call whenever a log message arrives

Returns

Id which can be used to later remove the callback

close(self: depthai.DeviceBase)None

Closes the connection to device. Better alternative is the usage of context manager: with depthai.Device(pipeline) as device:

flashCalibration(self: depthai.DeviceBase, calibrationDataHandler: depthai.CalibrationHandler)bool

Stores the Calibration and Device information to the Device EEPROM

Parameter calibrationObj:

CalibrationHandler object which is loaded with calibration information.

Returns

true on successful flash, false on failure

static getAllAvailableDevices() → List[depthai.DeviceInfo]

Returns all connected devices

Returns

Vector of connected devices

static getAnyAvailableDevice(*args, **kwargs)

Overloaded function.

  1. getAnyAvailableDevice(timeout: datetime.timedelta) -> Tuple[bool, depthai.DeviceInfo]

Waits for any available device with a timeout

Parameter timeout:

duration of time to wait for the any device

Returns

Tuple of bool and DeviceInfo. Bool specifies if device was found. DeviceInfo specifies the found device

  1. getAnyAvailableDevice() -> Tuple[bool, depthai.DeviceInfo]

Gets any available device

Returns

Tuple of bool and DeviceInfo. Bool specifies if device was found. DeviceInfo specifies the found device

getCameraSensorNames(self: depthai.DeviceBase) → Dict[depthai.CameraBoardSocket, str]

Get sensor names for cameras that are connected to the device

Returns

Map/dictionary with camera sensor names, indexed by socket

getChipTemperature(self: depthai.DeviceBase)depthai.ChipTemperature

Retrieves current chip temperature as measured by device

Returns

Temperature of various onboard sensors

getCmxMemoryUsage(self: depthai.DeviceBase)depthai.MemoryInfo

Retrieves current CMX memory information from device

Returns

Used, remaining and total cmx memory

getConnectedCameras(self: depthai.DeviceBase) → List[depthai.CameraBoardSocket]

Get cameras that are connected to the device

Returns

Vector of connected cameras

getDdrMemoryUsage(self: depthai.DeviceBase)depthai.MemoryInfo

Retrieves current DDR memory information from device

Returns

Used, remaining and total ddr memory

static getDeviceByMxId(mxId: str) → Tuple[bool, depthai.DeviceInfo]

Finds a device by MX ID. Example: 14442C10D13EABCE00

Parameter mxId:

MyraidX ID which uniquely specifies a device

Returns

Tuple of bool and DeviceInfo. Bool specifies if device was found. DeviceInfo specifies the found device

getDeviceInfo(self: depthai.DeviceBase)depthai.DeviceInfo

Get the Device Info object o the device which is currently running

Returns

DeviceInfo of the current device in execution

static getEmbeddedDeviceBinary(*args, **kwargs)

Overloaded function.

  1. getEmbeddedDeviceBinary(usb2Mode: bool, version: depthai.OpenVINO.Version = <Version.???: 5>) -> List[int]

Gets device firmware binary for a specific OpenVINO version

Parameter usb2Mode:

USB2 mode firmware

Parameter version:

Version of OpenVINO which firmware will support

Returns

Firmware binary

  1. getEmbeddedDeviceBinary(config: depthai.Device.Config) -> List[int]

Gets device firmware binary for a specific configuration

Parameter config:

FW with applied configuration

Returns

Firmware binary

static getFirstAvailableDevice() → Tuple[bool, depthai.DeviceInfo]

Gets first available device. Device can be either in XLINK_UNBOOTED or XLINK_BOOTLOADER state

Returns

Tuple of bool and DeviceInfo. Bool specifies if device was found. DeviceInfo specifies the found device

getLeonCssCpuUsage(self: depthai.DeviceBase)depthai.CpuUsage

Retrieves average CSS Leon CPU usage

Returns

Average CPU usage and sampling duration

getLeonCssHeapUsage(self: depthai.DeviceBase)depthai.MemoryInfo

Retrieves current CSS Leon CPU heap information from device

Returns

Used, remaining and total heap memory

getLeonMssCpuUsage(self: depthai.DeviceBase)depthai.CpuUsage

Retrieves average MSS Leon CPU usage

Returns

Average CPU usage and sampling duration

getLeonMssHeapUsage(self: depthai.DeviceBase)depthai.MemoryInfo

Retrieves current MSS Leon CPU heap information from device

Returns

Used, remaining and total heap memory

getLogLevel(self: depthai.DeviceBase)depthai.LogLevel

Gets current logging severity level of the device.

Returns

Logging severity level

getLogOutputLevel(self: depthai.DeviceBase)depthai.LogLevel

Gets logging level which decides printing level to standard output.

Returns

Standard output printing severity

getMxId(self: depthai.DeviceBase)str

Get MxId of device

Returns

MxId of connected device

getSystemInformationLoggingRate(self: depthai.DeviceBase)float

Gets current rate of system information logging (“info” severity) in Hz.

Returns

Logging rate in Hz

getUsbSpeed(self: depthai.DeviceBase)depthai.UsbSpeed

Retrieves USB connection speed

Returns

USB connection speed of connected device if applicable. Unknown otherwise.

getXLinkChunkSize(self: depthai.DeviceBase)int

Gets current XLink chunk size.

Returns

XLink chunk size in bytes

isClosed(self: depthai.DeviceBase)bool

Check if the device is still connected`

isPipelineRunning(self: depthai.DeviceBase)bool

Checks if devices pipeline is already running

Returns

True if running, false otherwise

readCalibration(self: depthai.DeviceBase)depthai.CalibrationHandler

Fetches the EEPROM data from the device and loads it into CalibrationHandler object

Returns

The CalibrationHandler object containing the calibration currently flashed on device EEPROM

removeLogCallback(self: depthai.DeviceBase, callbackId: int)bool

Removes a callback

Parameter callbackId:

Id of callback to be removed

Returns

True if callback was removed, false otherwise

setLogLevel(self: depthai.DeviceBase, level: depthai.LogLevel)None

Sets the devices logging severity level. This level affects which logs are transfered from device to host.

Parameter level:

Logging severity

setLogOutputLevel(self: depthai.DeviceBase, level: depthai.LogLevel)None

Sets logging level which decides printing level to standard output. If lower than setLogLevel, no messages will be printed

Parameter level:

Standard output printing severity

setSystemInformationLoggingRate(self: depthai.DeviceBase, rateHz: float)None

Sets rate of system information logging (“info” severity). Default 1Hz If parameter is less or equal to zero, then system information logging will be disabled

Parameter rateHz:

Logging rate in Hz

setXLinkChunkSize(self: depthai.DeviceBase, sizeBytes: int)None

Sets the chunk size for splitting device-sent XLink packets. A larger value could increase performance, and 0 disables chunking. A negative value is ignored. Device defaults are configured per protocol, currently 64*1024 for both USB and Ethernet.

Parameter sizeBytes:

XLink chunk size in bytes

startPipeline(*args, **kwargs)

Overloaded function.

  1. startPipeline(self: depthai.DeviceBase) -> None

Starts the execution of the devices pipeline

Returns

True if pipeline started, false otherwise

  1. startPipeline(self: depthai.DeviceBase, arg0: depthai.Pipeline) -> bool

Starts the execution of a given pipeline

Parameter pipeline:

OpenVINO version of the pipeline must match the one which the device was booted with.

Returns

True if pipeline started, false otherwise

class depthai.DeviceBootloader

Bases: pybind11_builtins.pybind11_object

Represents the DepthAI bootloader with the methods to interact with it.

Classes:

Config

Memory

Members:

NetworkConfig

Section

Members:

Type

Members:

UsbConfig

Version

Bootloader version structure

Methods:

__init__(*args, **kwargs)

Overloaded function.

bootMemory(self, fw)

Boots a custom FW in memory

bootUsbRomBootloader(self)

Boots into integrated ROM bootloader in USB mode

close(self)

Closes the connection to device.

createDepthaiApplicationPackage(*args, **kwargs)

Overloaded function.

flash(*args, **kwargs)

Overloaded function.

flashBootloader(*args, **kwargs)

Overloaded function.

flashConfig(self, config, memory, type)

Flashes configuration to bootloader

flashConfigClear(self, memory, type)

Clears configuration data

flashConfigData(self, configData, memory, type)

Flashes configuration data to bootloader

flashConfigFile(self, configData, memory, type)

Flashes configuration data to bootloader

flashDepthaiApplicationPackage(*args, **kwargs)

Overloaded function.

getAllAvailableDevices()

Searches for connected devices in either UNBOOTED or BOOTLOADER states.

getEmbeddedBootloaderBinary(arg0)

returns

Embedded bootloader binary

getEmbeddedBootloaderVersion()

returns

Embedded bootloader version

getFirstAvailableDevice()

Searches for connected devices in either UNBOOTED or BOOTLOADER states and returns first available.

getType(self)

returns

Type of currently connected bootloader

getVersion(self)

returns

Version of current running bootloader

isAllowedFlashingBootloader(self)

returns

True if allowed to flash bootloader

isEmbeddedVersion(self)

returns

True when bootloader was booted using latest bootloader integrated in the

readConfig(self, memory, type)

Reads configuration from bootloader

readConfigData(self, memory, type)

Reads configuration data from bootloader

saveDepthaiApplicationPackage(*args, **kwargs)

Overloaded function.

class Config

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

getDnsAltIPv4(self)

getDnsIPv4(self)

getIPv4(self)

getIPv4Gateway(self)

getIPv4Mask(self)

getMacAddress(self)

getNetworkTimeout(self)

getUsbMaxSpeed(self)

getUsbTimeout(self)

isStaticIPV4(self)

setDnsIPv4(self, arg0, arg1)

setDynamicIPv4(self, arg0, arg1, arg2)

setMacAddress(self, arg0)

setNetworkTimeout(self, arg0)

setStaticIPv4(self, arg0, arg1, arg2)

setUsbMaxSpeed(self, arg0)

setUsbTimeout(self, arg0)

Attributes:

appMem

network

usb

__init__(self: depthai.DeviceBootloader.Config)None
property appMem
getDnsAltIPv4(self: depthai.DeviceBootloader.Config)str
getDnsIPv4(self: depthai.DeviceBootloader.Config)str
getIPv4(self: depthai.DeviceBootloader.Config)str
getIPv4Gateway(self: depthai.DeviceBootloader.Config)str
getIPv4Mask(self: depthai.DeviceBootloader.Config)str
getMacAddress(self: depthai.DeviceBootloader.Config)str
getNetworkTimeout(self: depthai.DeviceBootloader.Config)datetime.timedelta
getUsbMaxSpeed(self: depthai.DeviceBootloader.Config)depthai.UsbSpeed
getUsbTimeout(self: depthai.DeviceBootloader.Config)datetime.timedelta
isStaticIPV4(self: depthai.DeviceBootloader.Config)bool
property network
setDnsIPv4(self: depthai.DeviceBootloader.Config, arg0: str, arg1: str)None
setDynamicIPv4(self: depthai.DeviceBootloader.Config, arg0: str, arg1: str, arg2: str)None
setMacAddress(self: depthai.DeviceBootloader.Config, arg0: str)None
setNetworkTimeout(self: depthai.DeviceBootloader.Config, arg0: datetime.timedelta)None
setStaticIPv4(self: depthai.DeviceBootloader.Config, arg0: str, arg1: str, arg2: str)None
setUsbMaxSpeed(self: depthai.DeviceBootloader.Config, arg0: depthai.UsbSpeed)None
setUsbTimeout(self: depthai.DeviceBootloader.Config, arg0: datetime.timedelta)None
property usb
class Memory

Bases: pybind11_builtins.pybind11_object

Members:

AUTO

FLASH

EMMC

Attributes:

AUTO

EMMC

FLASH

name

value

Methods:

__init__(self, value)

AUTO = <Memory.AUTO: -1>
EMMC = <Memory.EMMC: 1>
FLASH = <Memory.FLASH: 0>
__init__(self: depthai.DeviceBootloader.Memory, value: int)None
property name
property value
class NetworkConfig

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Attributes:

ipv4

ipv4Dns

ipv4DnsAlt

ipv4Gateway

ipv4Mask

ipv6

ipv6Dns

ipv6DnsAlt

ipv6Gateway

ipv6Prefix

mac

staticIpv4

staticIpv6

timeoutMs

__init__(self: depthai.DeviceBootloader.NetworkConfig)None
property ipv4
property ipv4Dns
property ipv4DnsAlt
property ipv4Gateway
property ipv4Mask
property ipv6
property ipv6Dns
property ipv6DnsAlt
property ipv6Gateway
property ipv6Prefix
property mac
property staticIpv4
property staticIpv6
property timeoutMs
class Section

Bases: pybind11_builtins.pybind11_object

Members:

AUTO

HEADER

BOOTLOADER

BOOTLOADER_CONFIG

APPLICATION

Attributes:

APPLICATION

AUTO

BOOTLOADER

BOOTLOADER_CONFIG

HEADER

name

value

Methods:

__init__(self, value)

APPLICATION = <Section.APPLICATION: 3>
AUTO = <Section.AUTO: -1>
BOOTLOADER = <Section.BOOTLOADER: 1>
BOOTLOADER_CONFIG = <Section.BOOTLOADER_CONFIG: 2>
HEADER = <Section.HEADER: 0>
__init__(self: depthai.DeviceBootloader.Section, value: int)None
property name
property value
class Type

Bases: pybind11_builtins.pybind11_object

Members:

AUTO

USB

NETWORK

Attributes:

AUTO

NETWORK

USB

name

value

Methods:

__init__(self, value)

AUTO = <Type.AUTO: -1>
NETWORK = <Type.NETWORK: 1>
USB = <Type.USB: 0>
__init__(self: depthai.DeviceBootloader.Type, value: int)None
property name
property value
class UsbConfig

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Attributes:

maxUsbSpeed

pid

timeoutMs

vid

__init__(self: depthai.DeviceBootloader.UsbConfig)None
property maxUsbSpeed
property pid
property timeoutMs
property vid
class Version

Bases: pybind11_builtins.pybind11_object

Bootloader version structure

Methods:

__init__(*args, **kwargs)

Overloaded function.

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.DeviceBootloader.Version, v: str) -> None

Construct Version from string

  1. __init__(self: depthai.DeviceBootloader.Version, major: int, minor: int, patch: int) -> None

Construct Version major, minor and patch numbers

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.DeviceBootloader, devInfo: depthai.DeviceInfo, allowFlashingBootloader: bool = False) -> None

  2. __init__(self: depthai.DeviceBootloader, devInfo: depthai.DeviceInfo, pathToCmd: str, allowFlashingBootloader: bool = False) -> None

Connects to or boots device in bootloader mode depending on devInfo state.

Parameter devInfo:

DeviceInfo of which to boot or connect to

Parameter allowFlashingBootloader:

Set to true to allow flashing the devices bootloader. Defaults to false

bootMemory(self: depthai.DeviceBootloader, fw: List[int])None

Boots a custom FW in memory

Parameter fw:

$Throws:

A runtime exception if there are any communication issues

bootUsbRomBootloader(self: depthai.DeviceBootloader)None

Boots into integrated ROM bootloader in USB mode

Throws:

A runtime exception if there are any communication issues

close(self: depthai.DeviceBootloader)None

Closes the connection to device. Better alternative is the usage of context manager: with depthai.DeviceBootloader(deviceInfo) as bootloader:

static createDepthaiApplicationPackage(*args, **kwargs)

Overloaded function.

  1. createDepthaiApplicationPackage(pipeline: depthai.Pipeline, pathToCmd: str = ‘’, compress: bool = False) -> List[int]

Creates application package which can be flashed to depthai device.

Parameter pipeline:

Pipeline from which to create the application package

Parameter pathToCmd:

Optional path to custom device firmware

Parameter compress:

Optional boolean which specifies if contents should be compressed

Returns

Depthai application package

  1. createDepthaiApplicationPackage(pipeline: depthai.Pipeline, compress: bool) -> List[int]

Creates application package which can be flashed to depthai device.

Parameter pipeline:

Pipeline from which to create the application package

Parameter compress:

Specifies if contents should be compressed

Returns

Depthai application package

flash(*args, **kwargs)

Overloaded function.

  1. flash(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], pipeline: depthai.Pipeline, compress: bool = False) -> Tuple[bool, str]

Flashes a given pipeline to the device.

Parameter progressCallback:

Callback that sends back a value between 0..1 which signifies current flashing progress

Parameter pipeline:

Pipeline to flash to the board

  1. flash(self: depthai.DeviceBootloader, pipeline: depthai.Pipeline, compress: bool = False) -> Tuple[bool, str]

Flashes a given pipeline to the device.

Parameter pipeline:

Pipeline to flash to the board

flashBootloader(*args, **kwargs)

Overloaded function.

  1. flashBootloader(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], path: str = ‘’) -> Tuple[bool, str]

Flashes bootloader to the current board

Parameter progressCallback:

Callback that sends back a value between 0..1 which signifies current flashing progress

Parameter path:

Optional parameter to custom bootloader to flash

  1. flashBootloader(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, type: depthai.DeviceBootloader.Type, progressCallback: Callable[[float], None], path: str = ‘’) -> Tuple[bool, str]

Flash selected bootloader to the current board

Parameter memory:

Memory to flash

Parameter type:

Bootloader type to flash

Parameter progressCallback:

Callback that sends back a value between 0..1 which signifies current flashing progress

Parameter path:

Optional parameter to custom bootloader to flash

flashConfig(self: depthai.DeviceBootloader, config: depthai.DeviceBootloader.Config, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, type: depthai.DeviceBootloader.Type = <Type.AUTO: -1>) → Tuple[bool, str]

Flashes configuration to bootloader

Parameter configData:

Configuration structure

Parameter memory:

Optional - to which memory flash configuration

Parameter type:

Optional - for which type of bootloader to flash configuration

flashConfigClear(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, type: depthai.DeviceBootloader.Type = <Type.AUTO: -1>) → Tuple[bool, str]

Clears configuration data

Parameter memory:

Optional - on which memory to clear configuration data

Parameter type:

Optional - for which type of bootloader to clear configuration data

flashConfigData(self: depthai.DeviceBootloader, configData: json, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, type: depthai.DeviceBootloader.Type = <Type.AUTO: -1>) → Tuple[bool, str]

Flashes configuration data to bootloader

Parameter configData:

Unstructured configuration data

Parameter memory:

Optional - to which memory flash configuration

Parameter type:

Optional - for which type of bootloader to flash configuration

flashConfigFile(self: depthai.DeviceBootloader, configData: str, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, type: depthai.DeviceBootloader.Type = <Type.AUTO: -1>) → Tuple[bool, str]

Flashes configuration data to bootloader

Parameter configPath:

Unstructured configuration data

Parameter memory:

Optional - to which memory flash configuration

Parameter type:

Optional - for which type of bootloader to flash configuration

flashDepthaiApplicationPackage(*args, **kwargs)

Overloaded function.

  1. flashDepthaiApplicationPackage(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], package: List[int]) -> Tuple[bool, str]

Flashes a specific depthai application package that was generated using createDepthaiApplicationPackage or saveDepthaiApplicationPackage

Parameter progressCallback:

Callback that sends back a value between 0..1 which signifies current flashing progress

Parameter package:

Depthai application package to flash to the board

  1. flashDepthaiApplicationPackage(self: depthai.DeviceBootloader, package: List[int]) -> Tuple[bool, str]

Flashes a specific depthai application package that was generated using createDepthaiApplicationPackage or saveDepthaiApplicationPackage

Parameter package:

Depthai application package to flash to the board

static getAllAvailableDevices() → List[depthai.DeviceInfo]

Searches for connected devices in either UNBOOTED or BOOTLOADER states.

Returns

Vector of all found devices

static getEmbeddedBootloaderBinary(arg0: depthai.DeviceBootloader.Type) → List[int]
Returns

Embedded bootloader binary

static getEmbeddedBootloaderVersion()depthai.DeviceBootloader.Version
Returns

Embedded bootloader version

static getFirstAvailableDevice() → Tuple[bool, depthai.DeviceInfo]

Searches for connected devices in either UNBOOTED or BOOTLOADER states and returns first available.

Returns

Tuple of boolean and DeviceInfo. If found boolean is true and DeviceInfo describes the device. Otherwise false

getType(self: depthai.DeviceBootloader)depthai.DeviceBootloader.Type
Returns

Type of currently connected bootloader

getVersion(self: depthai.DeviceBootloader)depthai.DeviceBootloader.Version
Returns

Version of current running bootloader

isAllowedFlashingBootloader(self: depthai.DeviceBootloader)bool
Returns

True if allowed to flash bootloader

isEmbeddedVersion(self: depthai.DeviceBootloader)bool
Returns

True when bootloader was booted using latest bootloader integrated in the library. False when bootloader is already running on the device and just connected to.

readConfig(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, type: depthai.DeviceBootloader.Type = <Type.AUTO: -1>)depthai.DeviceBootloader.Config

Reads configuration from bootloader

Parameter memory:

Optional - from which memory to read configuration

Parameter type:

Optional - from which type of bootloader to read configuration

Returns

Configuration structure

readConfigData(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, type: depthai.DeviceBootloader.Type = <Type.AUTO: -1>) → json

Reads configuration data from bootloader

Returns

Unstructured configuration data

Parameter memory:

Optional - from which memory to read configuration data

Parameter type:

Optional - from which type of bootloader to read configuration data

static saveDepthaiApplicationPackage(*args, **kwargs)

Overloaded function.

  1. saveDepthaiApplicationPackage(path: str, pipeline: depthai.Pipeline, pathToCmd: str = ‘’, compress: bool = False) -> None

Saves application package to a file which can be flashed to depthai device.

Parameter path:

Path where to save the application package

Parameter pipeline:

Pipeline from which to create the application package

Parameter pathToCmd:

Optional path to custom device firmware

Parameter compress:

Optional boolean which specifies if contents should be compressed

  1. saveDepthaiApplicationPackage(path: str, pipeline: depthai.Pipeline, compress: bool) -> None

Saves application package to a file which can be flashed to depthai device.

Parameter path:

Path where to save the application package

Parameter pipeline:

Pipeline from which to create the application package

Parameter compress:

Specifies if contents should be compressed

class depthai.DeviceDesc

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Attributes:

name

platform

protocol

__init__(self: depthai.DeviceDesc)None
property name
property platform
property protocol
class depthai.DeviceInfo

Bases: pybind11_builtins.pybind11_object

Describes a connected device

Methods:

__init__(self)

getMxId(self)

Attributes:

desc

state

__init__(self: depthai.DeviceInfo)None
property desc
getMxId(self: depthai.DeviceInfo)str
property state
class depthai.EdgeDetectorConfig

Bases: depthai.Buffer

EdgeDetectorConfig message. Carries sobel edge filter config.

Methods:

__init__(self)

getConfigData(self)

Retrieve configuration data for EdgeDetector

setSobelFilterKernels(self, …)

Set sobel filter horizontal and vertical 3x3 kernels

__init__(self: depthai.EdgeDetectorConfig)None
getConfigData(self: depthai.EdgeDetectorConfig)depthai.EdgeDetectorConfigData

Retrieve configuration data for EdgeDetector

Returns

sobel filter horizontal and vertical 3x3 kernels

Return type

EdgeDetectorConfigData

setSobelFilterKernels(self: depthai.EdgeDetectorConfig, horizontalKernel: List[List[int]], verticalKernel: List[List[int]])None

Set sobel filter horizontal and vertical 3x3 kernels

Parameter horizontalKernel:

Used for horizontal gradiant computation in 3x3 Sobel filter

Parameter verticalKernel:

Used for vertical gradiant computation in 3x3 Sobel filter

class depthai.EdgeDetectorConfigData

Bases: pybind11_builtins.pybind11_object

EdgeDetectorConfigData configuration data structure

Methods:

__init__(self)

Attributes:

sobelFilterHorizontalKernel

3x3 matrix, 2nd column must be 0 Default: +1 0 -1; +2 0 -2; +1 0 -1

sobelFilterVerticalKernel

3x3 matrix, 2nd row must be 0 Default: +1 +2 +1; 0 0 0; -1 -2 -1

__init__(self: depthai.EdgeDetectorConfigData)None
property sobelFilterHorizontalKernel

3x3 matrix, 2nd column must be 0 Default: +1 0 -1; +2 0 -2; +1 0 -1

Type

Used for horizontal gradiant computation in 3x3 Sobel filter Format

property sobelFilterVerticalKernel

3x3 matrix, 2nd row must be 0 Default: +1 +2 +1; 0 0 0; -1 -2 -1

Type

Used for vertical gradiant computation in 3x3 Sobel filter Format

class depthai.EdgeDetectorProperties

Bases: pybind11_builtins.pybind11_object

Specify properties for EdgeDetector

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

initialConfig

Initial edge detector config

inputConfigSync

Whether to wait for config at ‘inputConfig’ IO

numFramesPool

Num frames in output pool

outputFrameSize

300x300 BGR image -> 300*300*3 bytes)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property initialConfig

Initial edge detector config

property inputConfigSync

Whether to wait for config at ‘inputConfig’ IO

property numFramesPool

Num frames in output pool

property outputFrameSize

300x300 BGR image -> 300*300*3 bytes)

Type

Maximum output frame size in bytes (eg

class depthai.EepromData

Bases: pybind11_builtins.pybind11_object

EepromData structure

Contains the Calibration and Board data stored on device

Methods:

__init__(self)

Attributes:

boardName

boardRev

cameraData

imuExtrinsics

stereoRectificationData

version

__init__(self: depthai.EepromData)None
property boardName
property boardRev
property cameraData
property imuExtrinsics
property stereoRectificationData
property version
class depthai.Extrinsics

Bases: pybind11_builtins.pybind11_object

Extrinsics structure

Methods:

__init__(self)

Attributes:

rotationMatrix

specTranslation

toCameraSocket

translation

__init__(self: depthai.Extrinsics)None
property rotationMatrix
property specTranslation
property toCameraSocket
property translation
class depthai.FeatureTrackerConfig

Bases: depthai.Buffer

FeatureTrackerConfig message. Carries config for feature tracking algorithm

Classes:

CornerDetector

Corner detector configuration structure.

FeatureMaintainer

FeatureMaintainer configuration structure.

MotionEstimator

Used for feature reidentification between current and previous features.

Methods:

__init__(*args, **kwargs)

Overloaded function.

get(self)

Retrieve configuration data for FeatureTracker.

set(self, config)

Set explicit configuration.

setCornerDetector(*args, **kwargs)

Overloaded function.

setFeatureMaintainer(*args, **kwargs)

Overloaded function.

setHwMotionEstimation(self)

Set hardware accelerated motion estimation using block matching.

setMotionEstimator(*args, **kwargs)

Overloaded function.

setNumTargetFeatures(self, numTargetFeatures)

Set number of target features to detect.

setOpticalFlow(*args, **kwargs)

Overloaded function.

class CornerDetector

Bases: pybind11_builtins.pybind11_object

Corner detector configuration structure.

Classes:

Thresholds

Threshold settings structure for corner detector.

Type

Members:

Methods:

__init__(self)

Attributes:

cellGridDimension

Ensures distributed feature detection across the image.

enableSobel

Enable 3x3 Sobel operator to smoothen the image whose gradient is to be computed.

enableSorting

Enable sorting detected features based on their score or not.

numMaxFeatures

Hard limit for the maximum number of features that can be detected.

numTargetFeatures

Target number of features to detect.

thresholds

Threshold settings.

type

Corner detector algorithm type.

class Thresholds

Bases: pybind11_builtins.pybind11_object

Threshold settings structure for corner detector.

Methods:

__init__(self)

Attributes:

decreaseFactor

When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.

increaseFactor

When detected number of features doesn’t exceed the maximum in a cell, threshold is increased by multiplying its value with this factor.

initialValue

Minimum strength of a feature which will be detected.

max

Maximum limit for threshold.

min

Minimum limit for threshold.

__init__(self: depthai.RawFeatureTrackerConfig.CornerDetector.Thresholds)None
property decreaseFactor

When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.

property increaseFactor

When detected number of features doesn’t exceed the maximum in a cell, threshold is increased by multiplying its value with this factor.

property initialValue

Minimum strength of a feature which will be detected. 0 means automatic threshold update. Recommended so the tracker can adapt to different scenes/textures. Each cell has its own threshold. Empirical value.

property max

Maximum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto. Empirical value.

property min

Minimum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto, 6000000 for HARRIS, 1200 for SHI_THOMASI. Empirical value.

class Type

Bases: pybind11_builtins.pybind11_object

Members:

HARRIS

SHI_THOMASI

Attributes:

HARRIS

SHI_THOMASI

name

value

Methods:

__init__(self, value)

HARRIS = <Type.HARRIS: 0>
SHI_THOMASI = <Type.SHI_THOMASI: 1>
__init__(self: depthai.RawFeatureTrackerConfig.CornerDetector.Type, value: int)None
property name
property value
__init__(self: depthai.RawFeatureTrackerConfig.CornerDetector)None
property cellGridDimension

Ensures distributed feature detection across the image. Image is divided into horizontal and vertical cells, each cell has a target feature count = numTargetFeatures / cellGridDimension. Each cell has its own feature threshold. A value of 4 means that the image is divided into 4x4 cells of equal width/height. Maximum 4, minimum 1.

property enableSobel

Enable 3x3 Sobel operator to smoothen the image whose gradient is to be computed. If disabled, a simple 1D row/column differentiator is used for gradient.

property enableSorting

Enable sorting detected features based on their score or not.

property numMaxFeatures

Hard limit for the maximum number of features that can be detected. 0 means auto, will be set to the maximum value based on memory constraints.

property numTargetFeatures

Target number of features to detect. Maximum number of features is determined at runtime based on algorithm type.

property thresholds

Threshold settings. These are advanced settings, suitable for debugging/special cases.

property type

Corner detector algorithm type.

class FeatureMaintainer

Bases: pybind11_builtins.pybind11_object

FeatureMaintainer configuration structure.

Methods:

__init__(self)

Attributes:

enable

Enable feature maintaining or not.

lostFeatureErrorThreshold

Optical flow measures the tracking error for every feature.

minimumDistanceBetweenFeatures

Used to filter out detected feature points that are too close.

trackedFeatureThreshold

Once a feature was detected and we started tracking it, we need to update its Harris score on each image.

__init__(self: depthai.RawFeatureTrackerConfig.FeatureMaintainer)None
property enable

Enable feature maintaining or not.

property lostFeatureErrorThreshold

Optical flow measures the tracking error for every feature. If the point can’t be tracked or it’s out of the image it will set this error to a maximum value. This threshold defines the level where the tracking accuracy is considered too bad to keep the point.

property minimumDistanceBetweenFeatures

Used to filter out detected feature points that are too close. Requires sorting enabled in detector. Unit of measurement is squared euclidian distance in pixels.

property trackedFeatureThreshold

Once a feature was detected and we started tracking it, we need to update its Harris score on each image. This is needed because a feature point can disappear, or it can become too weak to be tracked. This threshold defines the point where such a feature must be dropped. As the goal of the algorithm is to provide longer tracks, we try to add strong points and track them until they are absolutely untrackable. This is why, this value is usually smaller than the detection threshold.

class MotionEstimator

Bases: pybind11_builtins.pybind11_object

Used for feature reidentification between current and previous features.

Classes:

OpticalFlow

Optical flow configuration structure.

Type

Members:

Methods:

__init__(self)

Attributes:

enable

Enable motion estimation or not.

opticalFlow

Optical flow configuration.

type

Motion estimator algorithm type.

class OpticalFlow

Bases: pybind11_builtins.pybind11_object

Optical flow configuration structure.

Methods:

__init__(self)

Attributes:

epsilon

Feature tracking termination criteria.

maxIterations

Feature tracking termination criteria.

pyramidLevels

Number of pyramid levels, only for optical flow.

searchWindowHeight

Image patch height used to track features.

searchWindowWidth

Image patch width used to track features.

__init__(self: depthai.RawFeatureTrackerConfig.MotionEstimator.OpticalFlow)None
property epsilon

Feature tracking termination criteria. Optical flow will refine the feature position on each pyramid level until the displacement between two refinements is smaller than this value. Decreasing this number increases runtime.

property maxIterations

Feature tracking termination criteria. Optical flow will refine the feature position maximum this many times on each pyramid level. If the Epsilon criteria described in the previous chapter is not met after this number of iterations, the algorithm will continue with the current calculated value. Increasing this number increases runtime.

property pyramidLevels

Number of pyramid levels, only for optical flow. AUTO means it’s decided based on input resolution: 3 if image width <= 640, else 4. Valid values are either 3/4 for VGA, 4 for 720p and above.

property searchWindowHeight

Image patch height used to track features. Must be an odd number, maximum 9. N means the algorithm will be able to track motion at most (N-1)/2 pixels in a direction per pyramid level. Increasing this number increases runtime

property searchWindowWidth

Image patch width used to track features. Must be an odd number, maximum 9. N means the algorithm will be able to track motion at most (N-1)/2 pixels in a direction per pyramid level. Increasing this number increases runtime

class Type

Bases: pybind11_builtins.pybind11_object

Members:

LUCAS_KANADE_OPTICAL_FLOW

HW_MOTION_ESTIMATION

Attributes:

HW_MOTION_ESTIMATION

LUCAS_KANADE_OPTICAL_FLOW

name

value

Methods:

__init__(self, value)

HW_MOTION_ESTIMATION = <Type.HW_MOTION_ESTIMATION: 1>
LUCAS_KANADE_OPTICAL_FLOW = <Type.LUCAS_KANADE_OPTICAL_FLOW: 0>
__init__(self: depthai.RawFeatureTrackerConfig.MotionEstimator.Type, value: int)None
property name
property value
__init__(self: depthai.RawFeatureTrackerConfig.MotionEstimator)None
property enable

Enable motion estimation or not.

property opticalFlow

Optical flow configuration. Takes effect only if MotionEstimator algorithm type set to LUCAS_KANADE_OPTICAL_FLOW.

property type

Motion estimator algorithm type.

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.FeatureTrackerConfig) -> None

  2. __init__(self: depthai.FeatureTrackerConfig, arg0: depthai.RawFeatureTrackerConfig) -> None

get(self: depthai.FeatureTrackerConfig)depthai.RawFeatureTrackerConfig

Retrieve configuration data for FeatureTracker.

Returns

config for feature tracking algorithm

set(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig)None

Set explicit configuration.

Parameter config:

Explicit configuration

setCornerDetector(*args, **kwargs)

Overloaded function.

  1. setCornerDetector(self: depthai.FeatureTrackerConfig, cornerDetector: depthai.RawFeatureTrackerConfig.CornerDetector.Type) -> None

Set corner detector algorithm type.

Parameter cornerDetector:

Corner detector type, HARRIS or SHI_THOMASI

  1. setCornerDetector(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.CornerDetector) -> None

Set corner detector full configuration.

Parameter config:

Corner detector configuration

setFeatureMaintainer(*args, **kwargs)

Overloaded function.

  1. setFeatureMaintainer(self: depthai.FeatureTrackerConfig, enable: bool) -> None

Enable or disable feature maintainer.

Parameter enable:

  1. setFeatureMaintainer(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.FeatureMaintainer) -> None

Set feature maintainer full configuration.

Parameter config:

feature maintainer configuration

setHwMotionEstimation(self: depthai.FeatureTrackerConfig)None

Set hardware accelerated motion estimation using block matching. Faster than optical flow (software implementation) but might not be as accurate.

setMotionEstimator(*args, **kwargs)

Overloaded function.

  1. setMotionEstimator(self: depthai.FeatureTrackerConfig, enable: bool) -> None

Enable or disable motion estimator.

Parameter enable:

  1. setMotionEstimator(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.MotionEstimator) -> None

Set motion estimator full configuration.

Parameter config:

Motion estimator configuration

setNumTargetFeatures(self: depthai.FeatureTrackerConfig, numTargetFeatures: int)None

Set number of target features to detect.

Parameter numTargetFeatures:

Number of features

setOpticalFlow(*args, **kwargs)

Overloaded function.

  1. setOpticalFlow(self: depthai.FeatureTrackerConfig) -> None

Set optical flow as motion estimation algorithm type.

  1. setOpticalFlow(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.MotionEstimator.OpticalFlow) -> None

Set optical flow full configuration.

Parameter config:

Optical flow configuration

class depthai.FeatureTrackerProperties

Bases: pybind11_builtins.pybind11_object

Specify properties for FeatureTracker

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

initialConfig

Initial feature tracker config

inputConfigSync

Whether to wait for config at ‘inputConfig’ IO

numMemorySlices

Number of memory slices reserved for feature tracking.

numShaves

Number of shaves reserved for feature tracking.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property initialConfig

Initial feature tracker config

property inputConfigSync

Whether to wait for config at ‘inputConfig’ IO

property numMemorySlices

Number of memory slices reserved for feature tracking. Optical flow can use 1 or 2 memory slices, while for corner detection only 1 is enough. Maximum number of features depends on the number of allocated memory slices. Hardware motion estimation doesn’t require memory slices. Maximum 2, minimum 1.

property numShaves

Number of shaves reserved for feature tracking. Optical flow can use 1 or 2 shaves, while for corner detection only 1 is enough. Hardware motion estimation doesn’t require shaves. Maximum 2, minimum 1.

class depthai.GlobalProperties

Bases: pybind11_builtins.pybind11_object

Specify properties which apply for whole pipeline

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

cameraTuningBlobSize

Camera tuning blob size in bytes

cameraTuningBlobUri

Uri which points to camera tuning blob

leonOsFrequencyHz

leonRtFrequencyHz

pipelineName

pipelineVersion

xlinkChunkSize

Chunk size for splitting device-sent XLink packets, in bytes.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property cameraTuningBlobSize

Camera tuning blob size in bytes

property cameraTuningBlobUri

Uri which points to camera tuning blob

property leonOsFrequencyHz
property leonRtFrequencyHz
property pipelineName
property pipelineVersion
property xlinkChunkSize

Chunk size for splitting device-sent XLink packets, in bytes. A larger value could increase performance, with 0 disabling chunking. A negative value won’t modify the device defaults - configured per protocol, currently 64*1024 for both USB and Ethernet.

class depthai.IMUData

Bases: depthai.Buffer

IMUData message. Carries normalized detection results

Methods:

__init__(self)

Attributes:

packets

Detections

__init__(self: depthai.IMUData)None
property packets

Detections

class depthai.IMUPacket

Bases: pybind11_builtins.pybind11_object

IMU output

Contains combined output for all possible modes. Only the enabled outputs are populated.

Methods:

__init__(self)

Attributes:

acceleroMeter

gyroscope

magneticField

rotationVector

__init__(self: depthai.IMUPacket)None
property acceleroMeter
property gyroscope
property magneticField
property rotationVector
class depthai.IMUProperties

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

batchReportThreshold

imuSensors

maxBatchReports

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property batchReportThreshold
property imuSensors
property maxBatchReports
class depthai.IMUReport

Bases: pybind11_builtins.pybind11_object

Classes:

Accuracy

Members:

Methods:

__init__(self)

Attributes:

accuracy

sequence

timestamp

class Accuracy

Bases: pybind11_builtins.pybind11_object

Members:

UNRELIABLE

LOW

MEDIUM

HIGH

Attributes:

HIGH

LOW

MEDIUM

UNRELIABLE

name

value

Methods:

__init__(self, value)

HIGH = <Accuracy.HIGH: 3>
LOW = <Accuracy.LOW: 1>
MEDIUM = <Accuracy.MEDIUM: 2>
UNRELIABLE = <Accuracy.UNRELIABLE: 0>
__init__(self: depthai.IMUReport.Accuracy, value: int)None
property name
property value
__init__(self: depthai.IMUReport)None
property accuracy
property sequence
property timestamp
class depthai.IMUReportAccelerometer

Bases: depthai.IMUReport

Accelerometer

Units are [m/s^2]

Methods:

__init__(self)

Attributes:

x

y

z

__init__(self: depthai.IMUReportAccelerometer)None
property x
property y
property z
class depthai.IMUReportGyroscope

Bases: depthai.IMUReport

Gyroscope

Units are [rad/s]

Methods:

__init__(self)

Attributes:

x

y

z

__init__(self: depthai.IMUReportGyroscope)None
property x
property y
property z
class depthai.IMUReportMagneticField

Bases: depthai.IMUReport

Magnetic field

Units are [uTesla]

Methods:

__init__(self)

Attributes:

x

y

z

__init__(self: depthai.IMUReportMagneticField)None
property x
property y
property z
class depthai.IMUReportRotationVectorWAcc

Bases: depthai.IMUReport

Rotation Vector with Accuracy

Contains quaternion components: i,j,k,real

Methods:

__init__(self)

Attributes:

i

j

k

real

rotationVectorAccuracy

__init__(self: depthai.IMUReportRotationVectorWAcc)None
property i
property j
property k
property real
property rotationVectorAccuracy
class depthai.IMUSensor

Bases: pybind11_builtins.pybind11_object

Available IMU sensors. More details about each sensor can be found in the datasheet:

https://www.ceva-dsp.com/wp-content/uploads/2019/10/BNO080_085-Datasheet.pdf

Members:

ACCELEROMETER_RAW : Section 2.1.1

Acceleration of the device without any postprocessing, straight from the sensor. Units are [m/s^2]

ACCELEROMETER : Section 2.1.1

Acceleration of the device including gravity. Units are [m/s^2]

LINEAR_ACCELERATION : Section 2.1.1

Acceleration of the device with gravity removed. Units are [m/s^2]

GRAVITY : Section 2.1.1

Gravity. Units are [m/s^2]

GYROSCOPE_RAW : Section 2.1.2

The angular velocity of the device without any postprocessing, straight from the sensor. Units are [rad/s]

GYROSCOPE_CALIBRATED : Section 2.1.2

The angular velocity of the device. Units are [rad/s]

GYROSCOPE_UNCALIBRATED : Section 2.1.2

Angular velocity without bias compensation. Units are [rad/s]

MAGNETOMETER_RAW : Section 2.1.3

Magnetic field measurement without any postprocessing, straight from the sensor. Units are [uTesla]

MAGNETOMETER_CALIBRATED : Section 2.1.3

The fully calibrated magnetic field measurement. Units are [uTesla]

MAGNETOMETER_UNCALIBRATED : Section 2.1.3

The magnetic field measurement without hard-iron offset applied. Units are [uTesla]

ROTATION_VECTOR : Section 2.2

The rotation vector provides an orientation output that is expressed as a quaternion referenced to magnetic north and gravity. It is produced by fusing the outputs of the accelerometer, gyroscope and magnetometer. The rotation vector is the most accurate orientation estimate available. The magnetometer provides correction in yaw to reduce drift and the gyroscope enables the most responsive performance.

GAME_ROTATION_VECTOR : Section 2.2

The game rotation vector is an orientation output that is expressed as a quaternion with no specific reference for heading, while roll and pitch are referenced against gravity. It is produced by fusing the outputs of the accelerometer and the gyroscope (i.e. no magnetometer). The game rotation vector does not use the magnetometer to correct the gyroscopes drift in yaw. This is a deliberate omission (as specified by Google) to allow gaming applications to use a smoother representation of the orientation without the jumps that an instantaneous correction provided by a magnetic field update could provide. Long term the output will likely drift in yaw due to the characteristics of gyroscopes, but this is seen as preferable for this output versus a corrected output.

GEOMAGNETIC_ROTATION_VECTOR : Section 2.2

The geomagnetic rotation vector is an orientation output that is expressed as a quaternion referenced to magnetic north and gravity. It is produced by fusing the outputs of the accelerometer and magnetometer. The gyroscope is specifically excluded in order to produce a rotation vector output using less power than is required to produce the rotation vector of section 2.2.4. The consequences of removing the gyroscope are: Less responsive output since the highly dynamic outputs of the gyroscope are not used More errors in the presence of varying magnetic fields.

ARVR_STABILIZED_ROTATION_VECTOR : Section 2.2

Estimates of the magnetic field and the roll/pitch of the device can create a potential correction in the rotation vector produced. For applications (typically augmented or virtual reality applications) where a sudden jump can be disturbing, the output is adjusted to prevent these jumps in a manner that takes account of the velocity of the sensor system.

ARVR_STABILIZED_GAME_ROTATION_VECTOR : Section 2.2

While the magnetometer is removed from the calculation of the game rotation vector, the accelerometer itself can create a potential correction in the rotation vector produced (i.e. the estimate of gravity changes). For applications (typically augmented or virtual reality applications) where a sudden jump can be disturbing, the output is adjusted to prevent these jumps in a manner that takes account of the velocity of the sensor system. This process is called AR/VR stabilization.

Attributes:

ACCELEROMETER

ACCELEROMETER_RAW

ARVR_STABILIZED_GAME_ROTATION_VECTOR

ARVR_STABILIZED_ROTATION_VECTOR

GAME_ROTATION_VECTOR

GEOMAGNETIC_ROTATION_VECTOR

GRAVITY

GYROSCOPE_CALIBRATED

GYROSCOPE_RAW

GYROSCOPE_UNCALIBRATED

LINEAR_ACCELERATION

MAGNETOMETER_CALIBRATED

MAGNETOMETER_RAW

MAGNETOMETER_UNCALIBRATED

ROTATION_VECTOR

name

value

Methods:

__init__(self, value)

ACCELEROMETER = <IMUSensor.ACCELEROMETER: 1>
ACCELEROMETER_RAW = <IMUSensor.ACCELEROMETER_RAW: 20>
ARVR_STABILIZED_GAME_ROTATION_VECTOR = <IMUSensor.ARVR_STABILIZED_GAME_ROTATION_VECTOR: 41>
ARVR_STABILIZED_ROTATION_VECTOR = <IMUSensor.ARVR_STABILIZED_ROTATION_VECTOR: 40>
GAME_ROTATION_VECTOR = <IMUSensor.GAME_ROTATION_VECTOR: 8>
GEOMAGNETIC_ROTATION_VECTOR = <IMUSensor.GEOMAGNETIC_ROTATION_VECTOR: 9>
GRAVITY = <IMUSensor.GRAVITY: 6>
GYROSCOPE_CALIBRATED = <IMUSensor.GYROSCOPE_CALIBRATED: 2>
GYROSCOPE_RAW = <IMUSensor.GYROSCOPE_RAW: 21>
GYROSCOPE_UNCALIBRATED = <IMUSensor.GYROSCOPE_UNCALIBRATED: 7>
LINEAR_ACCELERATION = <IMUSensor.LINEAR_ACCELERATION: 4>
MAGNETOMETER_CALIBRATED = <IMUSensor.MAGNETOMETER_CALIBRATED: 3>
MAGNETOMETER_RAW = <IMUSensor.MAGNETOMETER_RAW: 22>
MAGNETOMETER_UNCALIBRATED = <IMUSensor.MAGNETOMETER_UNCALIBRATED: 15>
ROTATION_VECTOR = <IMUSensor.ROTATION_VECTOR: 5>
__init__(self: depthai.IMUSensor, value: int)None
property name
property value
class depthai.IMUSensorConfig

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Attributes:

changeSensitivity

reportRate

sensitivityEnabled

sensitivityRelative

sensorId

__init__(self: depthai.IMUSensorConfig)None
property changeSensitivity
property reportRate
property sensitivityEnabled
property sensitivityRelative
property sensorId
class depthai.ImageManipConfig

Bases: depthai.Buffer

ImageManipConfig message. Specifies image manipulation options like:

  • Crop

  • Resize

  • Warp

Methods:

__init__(self)

getCropConfig(self)

returns

Crop configuration

getCropXMax(self)

returns

Bottom right X coordinate of crop region

getCropXMin(self)

returns

Top left X coordinate of crop region

getCropYMax(self)

returns

Bottom right Y coordinate of crop region

getCropYMin(self)

returns

Top left Y coordinate of crop region

getFormatConfig(self)

returns

Format configuration

getResizeConfig(self)

returns

Resize configuration

getResizeHeight(self)

returns

Output image height

getResizeWidth(self)

returns

Output image width

isResizeThumbnail(self)

returns

True if resize thumbnail mode is set, false otherwise

setCenterCrop(self, ratio, whRatio)

Specifies a centered crop.

setCropRect(*args, **kwargs)

Overloaded function.

setCropRotatedRect(self, rr, normalizedCoords)

Specifies crop with rotated rectangle.

setFrameType(self, name)

Specify output frame type.

setHorizontalFlip(self, flip)

Specify horizontal flip

setKeepAspectRatio(self, keep)

Specifies to whether to keep aspect ratio or not

setResize(*args, **kwargs)

Overloaded function.

setResizeThumbnail(*args, **kwargs)

Overloaded function.

setReusePreviousImage(self, reuse)

Instruct ImageManip to not remove current image from its queue and use the same for next message.

setRotationDegrees(self, deg)

Specifies clockwise rotation in degrees

setRotationRadians(self, rad)

Specifies clockwise rotation in radians

setSkipCurrentImage(self, skip)

Instructs ImageManip to skip current image and wait for next in queue.

setWarpBorderFillColor(self, red, green, blue)

Specifies fill color for border pixels.

setWarpBorderReplicatePixels(self)

Specifies that warp replicates border pixels

setWarpTransformFourPoints(self, pt, …)

Specifies warp by suppling 4 points in either absolute or normalized coordinates

setWarpTransformMatrix3x3(self, mat)

Specifies warp with a 3x3 matrix

__init__(self: depthai.ImageManipConfig)None
getCropConfig(self: depthai.ImageManipConfig)depthai.RawImageManipConfig.CropConfig
Returns

Crop configuration

getCropXMax(self: depthai.ImageManipConfig)float
Returns

Bottom right X coordinate of crop region

getCropXMin(self: depthai.ImageManipConfig)float
Returns

Top left X coordinate of crop region

getCropYMax(self: depthai.ImageManipConfig)float
Returns

Bottom right Y coordinate of crop region

getCropYMin(self: depthai.ImageManipConfig)float
Returns

Top left Y coordinate of crop region

getFormatConfig(self: depthai.ImageManipConfig)depthai.RawImageManipConfig.FormatConfig
Returns

Format configuration

getResizeConfig(self: depthai.ImageManipConfig)depthai.RawImageManipConfig.ResizeConfig
Returns

Resize configuration

getResizeHeight(self: depthai.ImageManipConfig)int
Returns

Output image height

getResizeWidth(self: depthai.ImageManipConfig)int
Returns

Output image width

isResizeThumbnail(self: depthai.ImageManipConfig)bool
Returns

True if resize thumbnail mode is set, false otherwise

setCenterCrop(self: depthai.ImageManipConfig, ratio: float, whRatio: float = 1.0)None

Specifies a centered crop.

Parameter ratio:

Ratio between input image and crop region (0..1)

Parameter whRatio:

Crop region aspect ratio - 1 equals to square, 1.7 equals to 16:9, …

setCropRect(*args, **kwargs)

Overloaded function.

  1. setCropRect(self: depthai.ImageManipConfig, xmin: float, ymin: float, xmax: float, xmax: float) -> None

Specifies crop with rectangle with normalized values (0..1)

Parameter xmin:

Top left X coordinate of rectangle

Parameter ymin:

Top left Y coordinate of rectangle

Parameter xmax:

Bottom right X coordinate of rectangle

Parameter ymax:

Bottom right Y coordinate of rectangle

  1. setCropRect(self: depthai.ImageManipConfig, coordinates: Tuple[float, float, float, float]) -> None

Specifies crop with rectangle with normalized values (0..1)

Parameter coordinates:

Coordinate of rectangle

setCropRotatedRect(self: depthai.ImageManipConfig, rr: depthai.RotatedRect, normalizedCoords: bool = True)None

Specifies crop with rotated rectangle. Optionally as non normalized coordinates

Parameter rr:

Rotated rectangle which specifies crop

Parameter normalizedCoords:

If true coordinates are in normalized range (0..1) otherwise absolute

setFrameType(self: depthai.ImageManipConfig, name: depthai.RawImgFrame.Type)None

Specify output frame type.

Parameter name:

Frame type

setHorizontalFlip(self: depthai.ImageManipConfig, flip: bool)None

Specify horizontal flip

Parameter flip:

True to enable flip, false otherwise

setKeepAspectRatio(self: depthai.ImageManipConfig, keep: bool)None

Specifies to whether to keep aspect ratio or not

setResize(*args, **kwargs)

Overloaded function.

  1. setResize(self: depthai.ImageManipConfig, w: int, h: int) -> None

Specifies output image size. After crop stage the image will be streched to fit.

Parameter w:

Width in pixels

Parameter h:

Height in pixels

  1. setResize(self: depthai.ImageManipConfig, size: Tuple[int, int]) -> None

Specifies output image size. After crop stage the image will be streched to fit.

Parameter size:

Size in pixels

setResizeThumbnail(*args, **kwargs)

Overloaded function.

  1. setResizeThumbnail(self: depthai.ImageManipConfig, w: int, h: int, bgRed: int = 0, bgGreen: int = 0, bgBlue: int = 0) -> None

Specifies output image size. After crop stage the image will be resized by preserving aspect ration. Optionally background can be specified.

Parameter w:

Width in pixels

Parameter h:

Height in pixels

Parameter bgRed:

Red component

Parameter bgGreen:

Green component

Parameter bgBlue:

Blue component

  1. setResizeThumbnail(self: depthai.ImageManipConfig, size: Tuple[int, int], bgRed: int = 0, bgGreen: int = 0, bgBlue: int = 0) -> None

Specifies output image size. After crop stage the image will be resized by preserving aspect ration. Optionally background can be specified.

Parameter size:

Size in pixels

Parameter bgRed:

Red component

Parameter bgGreen:

Green component

Parameter bgBlue:

Blue component

setReusePreviousImage(self: depthai.ImageManipConfig, reuse: bool)None

Instruct ImageManip to not remove current image from its queue and use the same for next message.

Parameter reuse:

True to enable reuse, false otherwise

setRotationDegrees(self: depthai.ImageManipConfig, deg: float)None

Specifies clockwise rotation in degrees

Parameter deg:

Rotation in degrees

setRotationRadians(self: depthai.ImageManipConfig, rad: float)None

Specifies clockwise rotation in radians

Parameter rad:

Rotation in radians

setSkipCurrentImage(self: depthai.ImageManipConfig, skip: bool)None

Instructs ImageManip to skip current image and wait for next in queue.

Parameter skip:

True to skip current image, false otherwise

setWarpBorderFillColor(self: depthai.ImageManipConfig, red: int, green: int, blue: int)None

Specifies fill color for border pixels. Example:

  • setWarpBorderFillColor(255,255,255) -> white

  • setWarpBorderFillColor(0,0,255) -> blue

Parameter red:

Red component

Parameter green:

Green component

Parameter blue:

Blue component

setWarpBorderReplicatePixels(self: depthai.ImageManipConfig)None

Specifies that warp replicates border pixels

setWarpTransformFourPoints(self: depthai.ImageManipConfig, pt: List[depthai.Point2f], normalizedCoords: bool)None

Specifies warp by suppling 4 points in either absolute or normalized coordinates

Parameter pt:

4 points specifying warp

Parameter normalizedCoords:

If true pt is interpreted as normalized, absolute otherwise

setWarpTransformMatrix3x3(self: depthai.ImageManipConfig, mat: List[float])None

Specifies warp with a 3x3 matrix

Parameter mat:

3x3 matrix

class depthai.ImgDetection

Bases: pybind11_builtins.pybind11_object

ImgDetection structure

Methods:

__init__(self)

Attributes:

confidence

label

xmax

xmin

ymax

ymin

__init__(self: depthai.ImgDetection)None
property confidence
property label
property xmax
property xmin
property ymax
property ymin
class depthai.ImgDetections

Bases: depthai.Buffer

ImgDetections message. Carries normalized detection results

Methods:

__init__(self)

Construct ImgDetections message

Attributes:

detections

Detections

__init__(self: depthai.ImgDetections)None

Construct ImgDetections message

property detections

Detections

class depthai.ImgFrame

Bases: depthai.Buffer

ImgFrame message. Carries image data and metadata.

Classes:

Specs

Type

Members:

Methods:

__init__(self)

getCategory(self)

Retrieves image category

getCvFrame(self)

Returns BGR or grayscale frame compatible with use in other opencv functions

getFrame(self, copy)

Returns numpy array with shape as specified by width, height and type

getHeight(self)

Retrieves image height in pixels

getInstanceNum(self)

Retrieves instance number

getSequenceNum(self)

Retrieves image sequence number

getTimestamp(self)

Retrieves image timestamp related to steady_clock / time.monotonic

getTimestampDevice(self)

Retrieves image timestamp directly captured from device’s monotonic clock, not synchronized to host time.

getType(self)

Retrieves image type

getWidth(self)

Retrieves image width in pixels

setCategory(self, category)

Parameter category:

setFrame(self, array)

Copies array bytes to ImgFrame buffer

setHeight(self, height)

Specifies frame height

setInstanceNum(self, instance)

Instance number relates to the origin of the frame (which camera)

setSequenceNum(self, seq)

Specifies sequence number

setSize(*args, **kwargs)

Overloaded function.

setTimestamp(self, timestamp)

Specifies current timestamp, related to steady_clock / time.monotonic

setType(self, type)

Specifies frame type, RGB, BGR, …

setWidth(self, width)

Specifies frame width

class Specs

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Attributes:

bytesPP

height

p1Offset

p2Offset

p3Offset

stride

type

width

__init__(self: depthai.RawImgFrame.Specs)None
property bytesPP
property height
property p1Offset
property p2Offset
property p3Offset
property stride
property type
property width
class Type

Bases: pybind11_builtins.pybind11_object

Members:

YUV422i

YUV444p

YUV420p

YUV422p

YUV400p

RGBA8888

RGB161616

RGB888p

BGR888p

RGB888i

BGR888i

RGBF16F16F16p

BGRF16F16F16p

RGBF16F16F16i

BGRF16F16F16i

GRAY8

GRAYF16

LUT2

LUT4

LUT16

RAW16

RAW14

RAW12

RAW10

RAW8

PACK10

PACK12

YUV444i

NV12

NV21

BITSTREAM

HDR

NONE

Attributes:

BGR888i

BGR888p

BGRF16F16F16i

BGRF16F16F16p

BITSTREAM

GRAY8

GRAYF16

HDR

LUT16

LUT2

LUT4

NONE

NV12

NV21

PACK10

PACK12

RAW10

RAW12

RAW14

RAW16

RAW8

RGB161616

RGB888i

RGB888p

RGBA8888

RGBF16F16F16i

RGBF16F16F16p

YUV400p

YUV420p

YUV422i

YUV422p

YUV444i

YUV444p

name

value

Methods:

__init__(self, value)

BGR888i = <Type.BGR888i: 10>
BGR888p = <Type.BGR888p: 8>
BGRF16F16F16i = <Type.BGRF16F16F16i: 29>
BGRF16F16F16p = <Type.BGRF16F16F16p: 27>
BITSTREAM = <Type.BITSTREAM: 24>
GRAY8 = <Type.GRAY8: 30>
GRAYF16 = <Type.GRAYF16: 31>
HDR = <Type.HDR: 25>
LUT16 = <Type.LUT16: 13>
LUT2 = <Type.LUT2: 11>
LUT4 = <Type.LUT4: 12>
NONE = <Type.NONE: 32>
NV12 = <Type.NV12: 22>
NV21 = <Type.NV21: 23>
PACK10 = <Type.PACK10: 19>
PACK12 = <Type.PACK12: 20>
RAW10 = <Type.RAW10: 17>
RAW12 = <Type.RAW12: 16>
RAW14 = <Type.RAW14: 15>
RAW16 = <Type.RAW16: 14>
RAW8 = <Type.RAW8: 18>
RGB161616 = <Type.RGB161616: 6>
RGB888i = <Type.RGB888i: 9>
RGB888p = <Type.RGB888p: 7>
RGBA8888 = <Type.RGBA8888: 5>
RGBF16F16F16i = <Type.RGBF16F16F16i: 28>
RGBF16F16F16p = <Type.RGBF16F16F16p: 26>
YUV400p = <Type.YUV400p: 4>
YUV420p = <Type.YUV420p: 2>
YUV422i = <Type.YUV422i: 0>
YUV422p = <Type.YUV422p: 3>
YUV444i = <Type.YUV444i: 21>
YUV444p = <Type.YUV444p: 1>
__init__(self: depthai.RawImgFrame.Type, value: int)None
property name
property value
__init__(self: depthai.ImgFrame)None
getCategory(self: depthai.ImgFrame)int

Retrieves image category

getCvFrame(self: object)object

Returns BGR or grayscale frame compatible with use in other opencv functions

getFrame(self: object, copy: bool = False) → numpy.ndarray

Returns numpy array with shape as specified by width, height and type

getHeight(self: depthai.ImgFrame)int

Retrieves image height in pixels

getInstanceNum(self: depthai.ImgFrame)int

Retrieves instance number

getSequenceNum(self: depthai.ImgFrame)int

Retrieves image sequence number

getTimestamp(self: depthai.ImgFrame)datetime.timedelta

Retrieves image timestamp related to steady_clock / time.monotonic

getTimestampDevice(self: depthai.ImgFrame)datetime.timedelta

Retrieves image timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging

getType(self: depthai.ImgFrame)depthai.RawImgFrame.Type

Retrieves image type

getWidth(self: depthai.ImgFrame)int

Retrieves image width in pixels

setCategory(self: depthai.ImgFrame, category: int)None
Parameter category:

Image category

setFrame(self: depthai.ImgFrame, array: numpy.ndarray)None

Copies array bytes to ImgFrame buffer

setHeight(self: depthai.ImgFrame, height: int)None

Specifies frame height

Parameter height:

frame height

setInstanceNum(self: depthai.ImgFrame, instance: int)None

Instance number relates to the origin of the frame (which camera)

Parameter instance:

Instance number

setSequenceNum(self: depthai.ImgFrame, seq: int)None

Specifies sequence number

Parameter seq:

Sequence number

setSize(*args, **kwargs)

Overloaded function.

  1. setSize(self: depthai.ImgFrame, width: int, height: int) -> None

Specifies frame size

Parameter height:

frame height

Parameter width:

frame width

  1. setSize(self: depthai.ImgFrame, sizer: Tuple[int, int]) -> None

Specifies frame size

Parameter size:

frame size

setTimestamp(self: depthai.ImgFrame, timestamp: datetime.timedelta)None

Specifies current timestamp, related to steady_clock / time.monotonic

setType(self: depthai.ImgFrame, type: depthai.RawImgFrame.Type)None

Specifies frame type, RGB, BGR, …

Parameter type:

Type of image

setWidth(self: depthai.ImgFrame, width: int)None

Specifies frame width

Parameter width:

frame width

class depthai.LogLevel

Bases: pybind11_builtins.pybind11_object

Members:

TRACE

DEBUG

INFO

WARN

ERR

CRITICAL

OFF

Attributes:

CRITICAL

DEBUG

ERR

INFO

OFF

TRACE

WARN

name

value

Methods:

__init__(self, value)

CRITICAL = <LogLevel.CRITICAL: 5>
DEBUG = <LogLevel.DEBUG: 1>
ERR = <LogLevel.ERR: 4>
INFO = <LogLevel.INFO: 2>
OFF = <LogLevel.OFF: 6>
TRACE = <LogLevel.TRACE: 0>
WARN = <LogLevel.WARN: 3>
__init__(self: depthai.LogLevel, value: int)None
property name
property value
class depthai.MedianFilter

Bases: pybind11_builtins.pybind11_object

Median filter config for disparity post-processing

Members:

MEDIAN_OFF

KERNEL_3x3

KERNEL_5x5

KERNEL_7x7

Attributes:

KERNEL_3x3

KERNEL_5x5

KERNEL_7x7

MEDIAN_OFF

name

value

Methods:

__init__(self, value)

KERNEL_3x3 = <MedianFilter.KERNEL_3x3: 3>
KERNEL_5x5 = <MedianFilter.KERNEL_5x5: 5>
KERNEL_7x7 = <MedianFilter.KERNEL_7x7: 7>
MEDIAN_OFF = <MedianFilter.MEDIAN_OFF: 0>
__init__(self: depthai.MedianFilter, value: int)None
property name
property value
class depthai.MemoryInfo

Bases: pybind11_builtins.pybind11_object

MemoryInfo structure

Free, remaining and total memory stats

Methods:

__init__(self)

Attributes:

remaining

total

used

__init__(self: depthai.MemoryInfo)None
property remaining
property total
property used
class depthai.MonoCameraProperties

Bases: pybind11_builtins.pybind11_object

Specify properties for MonoCamera such as camera ID, …

Classes:

SensorResolution

Select the camera sensor resolution: 1280×720, 1280×800, 640×400, 640×480

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

boardSocket

fps

initialControl

resolution

class SensorResolution

Bases: pybind11_builtins.pybind11_object

Select the camera sensor resolution: 1280×720, 1280×800, 640×400, 640×480

Members:

THE_720_P

THE_800_P

THE_400_P

THE_480_P

Attributes:

THE_400_P

THE_480_P

THE_720_P

THE_800_P

name

value

Methods:

__init__(self, value)

THE_400_P = <SensorResolution.THE_400_P: 2>
THE_480_P = <SensorResolution.THE_480_P: 3>
THE_720_P = <SensorResolution.THE_720_P: 0>
THE_800_P = <SensorResolution.THE_800_P: 1>
__init__(self: depthai.MonoCameraProperties.SensorResolution, value: int)None
property name
property value
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property boardSocket
property fps
property initialControl
property resolution
class depthai.NNData

Bases: depthai.Buffer

NNData message. Carries tensors and their metadata

Methods:

__init__(self)

Construct NNData message.

getAllLayerNames(self)

returns

Names of all layers added

getAllLayers(self)

returns

All layers and their information

getFirstLayerFp16(self)

Convinience function to retrieve float values from first layers FP16 tensor

getFirstLayerInt32(self)

Convinience function to retrieve INT32 values from first layers tensor

getFirstLayerUInt8(self)

Convinience function to retrieve U8 data from first layer

getLayer(self, name, tensor)

Retrieve layers tensor information

getLayerDatatype(self, name, datatype)

Retrieve datatype of a layers tensor

getLayerFp16(self, name)

Convinience function to retrieve float values from layers FP16 tensor

getLayerInt32(self, name)

Convinience function to retrieve INT32 values from layers tensor

getLayerUInt8(self, name)

Convinience function to retrieve U8 data from layer

hasLayer(self, name)

Checks if given layer exists

setLayer(*args, **kwargs)

Overloaded function.

__init__(self: depthai.NNData)None

Construct NNData message.

getAllLayerNames(self: depthai.NNData) → List[str]
Returns

Names of all layers added

getAllLayers(self: depthai.NNData) → List[depthai.TensorInfo]
Returns

All layers and their information

getFirstLayerFp16(self: depthai.NNData) → List[float]

Convinience function to retrieve float values from first layers FP16 tensor

Returns

Float data

getFirstLayerInt32(self: depthai.NNData) → List[int]

Convinience function to retrieve INT32 values from first layers tensor

Returns

INT32 data

getFirstLayerUInt8(self: depthai.NNData) → List[int]

Convinience function to retrieve U8 data from first layer

Returns

U8 binary data

getLayer(self: depthai.NNData, name: str, tensor: depthai.TensorInfo)bool

Retrieve layers tensor information

Parameter name:

Name of the layer

Parameter tensor:

Outputs tensor infromation of that layer

Returns

True if layer exists, false otherwise

getLayerDatatype(self: depthai.NNData, name: str, datatype: depthai.TensorInfo.DataType)bool

Retrieve datatype of a layers tensor

Parameter name:

Name of the layer

Parameter datatype:

Datatype of layers tensor

Returns

True if layer exists, false otherwise

getLayerFp16(self: depthai.NNData, name: str) → List[float]

Convinience function to retrieve float values from layers FP16 tensor

Parameter name:

Name of the layer

Returns

Float data

getLayerInt32(self: depthai.NNData, name: str) → List[int]

Convinience function to retrieve INT32 values from layers tensor

Parameter name:

Name of the layer

Returns

INT32 data

getLayerUInt8(self: depthai.NNData, name: str) → List[int]

Convinience function to retrieve U8 data from layer

Parameter name:

Name of the layer

Returns

U8 binary data

hasLayer(self: depthai.NNData, name: str)bool

Checks if given layer exists

Parameter name:

Name of the layer

Returns

True if layer exists, false otherwise

setLayer(*args, **kwargs)

Overloaded function.

  1. setLayer(self: depthai.NNData, name: str, data: numpy.ndarray[numpy.uint8]) -> None

Set a layer with datatype U8.

Parameter name:

Name of the layer

Parameter data:

Data to store

  1. setLayer(self: depthai.NNData, name: str, data: List[int]) -> None

Set a layer with datatype U8. Integers are casted to bytes.

Parameter name:

Name of the layer

Parameter data:

Data to store

  1. setLayer(self: depthai.NNData, name: str, data: List[float]) -> None

Set a layer with datatype FP16. Float values are converted to FP16.

Parameter name:

Name of the layer

Parameter data:

Data to store

  1. setLayer(self: depthai.NNData, name: str, data: List[float]) -> None

Set a layer with datatype FP16. Double values are converted to FP16.

Parameter name:

Name of the layer

Parameter data:

Data to store

class depthai.NeuralNetworkProperties

Bases: pybind11_builtins.pybind11_object

Specify properties for NeuralNetwork such as blob path, …

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

blobSize

blobUri

numFrames

numNCEPerThread

numThreads

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property blobSize
property blobUri
property numFrames
property numNCEPerThread
property numThreads
class depthai.Node

Bases: pybind11_builtins.pybind11_object

Abstract Node

Classes:

Connection

Connection between an Input and Output

Id

Node identificator.

Input

InputMap

Output

OutputMap

Methods:

__init__(*args, **kwargs)

Initialize self.

getAssetManager(*args, **kwargs)

Overloaded function.

getInputRefs(*args, **kwargs)

Overloaded function.

getInputs(self)

Retrieves all nodes inputs

getName(self)

Retrieves nodes name

getOutputRefs(*args, **kwargs)

Overloaded function.

getOutputs(self)

Retrieves all nodes outputs

getParentPipeline(*args, **kwargs)

Overloaded function.

Attributes:

id

Id of node

class Connection

Bases: pybind11_builtins.pybind11_object

Connection between an Input and Output

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

inputId

inputName

outputId

outputName

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property inputId
property inputName
property outputId
property outputName
class Id

Bases: pybind11_builtins.pybind11_object

Node identificator. Unique for every node on a single Pipeline

Methods:

__init__(*args, **kwargs)

Initialize self.

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

class Input

Bases: pybind11_builtins.pybind11_object

Classes:

Type

Members:

Methods:

__init__(*args, **kwargs)

Initialize self.

getBlocking(self)

Get input queue behavior

getQueueSize(self)

Get input queue size.

setBlocking(self, blocking)

Overrides default input queue behavior.

setQueueSize(self, size)

Overrides default input queue size.

Attributes:

name

type

class Type

Bases: pybind11_builtins.pybind11_object

Members:

SReceiver

MReceiver

Attributes:

MReceiver

SReceiver

name

value

Methods:

__init__(self, value)

MReceiver = <Type.MReceiver: 1>
SReceiver = <Type.SReceiver: 0>
__init__(self: depthai.Node.Input.Type, value: int)None
property name
property value
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

getBlocking(self: depthai.Node.Input)bool

Get input queue behavior

Returns

True blocking, false overwriting

getQueueSize(self: depthai.Node.Input)int

Get input queue size.

Returns

Maximum input queue size

property name
setBlocking(self: depthai.Node.Input, blocking: bool)None

Overrides default input queue behavior.

Parameter blocking:

True blocking, false overwriting

setQueueSize(self: depthai.Node.Input, size: int)None

Overrides default input queue size. If queue size fills up, behavior depends on blocking attribute

Parameter size:

Maximum input queue size

property type
class InputMap

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(*args, **kwargs)

Initialize self.

items(self)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

items(self: depthai.Node.InputMap) → Iterator
class Output

Bases: pybind11_builtins.pybind11_object

Classes:

Type

Members:

Methods:

__init__(*args, **kwargs)

Initialize self.

canConnect(self, input)

Check if connection is possible

getConnections(self)

Retrieve all connections from this output

link(self, input)

Link current output to input.

unlink(self, input)

Unlink a previously linked connection

class Type

Bases: pybind11_builtins.pybind11_object

Members:

MSender

SSender

Attributes:

MSender

SSender

name

value

Methods:

__init__(self, value)

MSender = <Type.MSender: 0>
SSender = <Type.SSender: 1>
__init__(self: depthai.Node.Output.Type, value: int)None
property name
property value
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

canConnect(self: depthai.Node.Output, input: depthai.Node.Input)bool

Check if connection is possible

Parameter in:

Input to connect to

Returns

True if connection is possible, false otherwise

getConnections(self: depthai.Node.Output) → List[depthai.Node.Connection]

Retrieve all connections from this output

Returns

Vector of connections

Link current output to input.

Throws an error if this output cannot be linked to given input, or if they are already linked

Parameter in:

Input to link to

Unlink a previously linked connection

Throws an error if not linked.

Parameter in:

Input from which to unlink from

class OutputMap

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(*args, **kwargs)

Initialize self.

items(self)

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

items(self: depthai.Node.OutputMap) → Iterator
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

getAssetManager(*args, **kwargs)

Overloaded function.

  1. getAssetManager(self: depthai.Node) -> depthai.AssetManager

Get node AssetManager as a const reference

  1. getAssetManager(self: depthai.Node) -> depthai.AssetManager

Get node AssetManager as a const reference

getInputRefs(*args, **kwargs)

Overloaded function.

  1. getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]

Retrieves reference to node inputs

  1. getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]

Retrieves reference to node inputs

getInputs(self: depthai.Node) → List[depthai.Node.Input]

Retrieves all nodes inputs

getName(self: depthai.Node)str

Retrieves nodes name

getOutputRefs(*args, **kwargs)

Overloaded function.

  1. getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]

Retrieves reference to node outputs

  1. getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]

Retrieves reference to node outputs

getOutputs(self: depthai.Node) → List[depthai.Node.Output]

Retrieves all nodes outputs

getParentPipeline(*args, **kwargs)

Overloaded function.

  1. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

  2. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

property id

Id of node

class depthai.ObjectTrackerProperties

Bases: pybind11_builtins.pybind11_object

Specify properties for ObjectTracker

Methods:

__init__(*args, **kwargs)

Initialize self.

Attributes:

detectionLabelsToTrack

maxObjectsToTrack

trackerIdAssigmentPolicy

trackerThreshold

trackerType

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

property detectionLabelsToTrack
property maxObjectsToTrack
property trackerIdAssigmentPolicy
property trackerThreshold
property trackerType
class depthai.OpenVINO

Bases: pybind11_builtins.pybind11_object

Support for basic OpenVINO related actions like version identification of neural network blobs,…

Attributes:

VERSION_2020_3

VERSION_2020_4

VERSION_2021_1

VERSION_2021_2

VERSION_2021_3

VERSION_2021_4

Classes:

Version

OpenVINO Version supported version information

Methods:

__init__(*args, **kwargs)

Initialize self.

areVersionsBlobCompatible(v1, v2)

Checks whether two blob versions are compatible

getBlobLatestSupportedVersion(majorVersion, …)

Returns latest potentionally supported version by a given blob version.

getBlobSupportedVersions(majorVersion, …)

Returns a list of potentionally supported versions for a specified blob major and minor versions.

getVersionName(version)

Returns string representation of a given version

getVersions()

returns

Supported versions

parseVersionName(versionString)

Creates Version from string representation.

VERSION_2020_3 = <Version.VERSION_2020_3: 0>
VERSION_2020_4 = <Version.VERSION_2020_4: 1>
VERSION_2021_1 = <Version.VERSION_2021_1: 2>
VERSION_2021_2 = <Version.VERSION_2021_2: 3>
VERSION_2021_3 = <Version.VERSION_2021_3: 4>
VERSION_2021_4 = <Version.VERSION_2021_4: 5>
class Version

Bases: pybind11_builtins.pybind11_object

OpenVINO Version supported version information

Members:

VERSION_2020_3

VERSION_2020_4

VERSION_2021_1

VERSION_2021_2

VERSION_2021_3

VERSION_2021_4

Attributes:

VERSION_2020_3

VERSION_2020_4

VERSION_2021_1

VERSION_2021_2

VERSION_2021_3

VERSION_2021_4

name

value

Methods:

__init__(self, value)

VERSION_2020_3 = <Version.VERSION_2020_3: 0>
VERSION_2020_4 = <Version.VERSION_2020_4: 1>
VERSION_2021_1 = <Version.VERSION_2021_1: 2>
VERSION_2021_2 = <Version.VERSION_2021_2: 3>
VERSION_2021_3 = <Version.VERSION_2021_3: 4>
VERSION_2021_4 = <Version.VERSION_2021_4: 5>
__init__(self: depthai.OpenVINO.Version, value: int)None
property name
property value
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

static areVersionsBlobCompatible(v1: depthai.OpenVINO.Version, v2: depthai.OpenVINO.Version)bool

Checks whether two blob versions are compatible

OpenVINO.getBlobLatestSupportedVersion(majorVersion: int, majorVersion: int) -> depthai.OpenVINO.Version

Returns latest potentionally supported version by a given blob version.

Parameter majorVersion:

Major version from OpenVINO blob

Parameter minorVersion:

Minor version from OpenVINO blob

Returns

Latest potentionally supported version

OpenVINO.getBlobSupportedVersions(majorVersion: int, majorVersion: int) -> List[depthai.OpenVINO.Version]

Returns a list of potentionally supported versions for a specified blob major and minor versions.

Parameter majorVersion:

Major version from OpenVINO blob

Parameter minorVersion:

Minor version from OpenVINO blob

Returns

Vector of potentionally supported versions

static getVersionName(version: depthai.OpenVINO.Version)str

Returns string representation of a given version

Parameter version:

OpenVINO version

Returns

Name of a given version

static getVersions() → List[depthai.OpenVINO.Version]
Returns

Supported versions

static parseVersionName(versionString: str)depthai.OpenVINO.Version

Creates Version from string representation. Throws if not possible.

Parameter versionString:

Version as string

Returns

Version object if successful

class depthai.Pipeline

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Constructs a new pipeline

create(self, arg0)

createColorCamera(self)

createEdgeDetector(self)

createFeatureTracker(self)

createIMU(self)

createImageManip(self)

createMobileNetDetectionNetwork(self)

createMobileNetSpatialDetectionNetwork(self)

createMonoCamera(self)

createNeuralNetwork(self)

createObjectTracker(self)

createSPIIn(self)

createSPIOut(self)

createSpatialLocationCalculator(self)

createStereoDepth(self)

createSystemLogger(self)

createVideoEncoder(self)

createXLinkIn(self)

createXLinkOut(self)

createYoloDetectionNetwork(self)

createYoloSpatialDetectionNetwork(self)

getAllNodes(*args, **kwargs)

Overloaded function.

getAssetManager(*args, **kwargs)

Overloaded function.

getCalibrationData(self)

gets the calibration data which is set through pipeline

getConnectionMap(self)

Get a reference to internal connection representation

getConnections(self)

Get all connections

getDeviceConfig(self)

Get device configuration needed for this pipeline

getGlobalProperties(self)

returns

Global properties of current pipeline

getNode(*args, **kwargs)

Overloaded function.

getNodeMap(self)

Get a reference to internal node map

getOpenVINOVersion(self)

Get possible OpenVINO version to run this pipeline

getRequiredOpenVINOVersion(self)

Get required OpenVINO version to run this pipeline.

link(self, arg0, arg1)

Link output to an input.

remove(self, node)

Removes a node from pipeline

setCalibrationData(self, calibrationDataHandler)

Sets the calibration in pipeline which overrides the calibration data in eeprom

setCameraTuningBlobPath(self, path)

Set a camera IQ (Image Quality) tuning blob, used for all cameras

setOpenVINOVersion(self, version)

Set a specific OpenVINO version to use with this pipeline

setXLinkChunkSize(self, sizeBytes)

Set chunk size for splitting device-sent XLink packets, in bytes.

unlink(self, arg0, arg1)

Unlink output from an input.

__init__(self: depthai.Pipeline)None

Constructs a new pipeline

create(self: depthai.Pipeline, arg0: object)depthai.Node
createColorCamera(self: depthai.Pipeline)depthai.node.ColorCamera
createEdgeDetector(self: depthai.Pipeline)depthai.node.EdgeDetector
createFeatureTracker(self: depthai.Pipeline)depthai.node.FeatureTracker
createIMU(self: depthai.Pipeline)depthai.node.IMU
createImageManip(self: depthai.Pipeline)depthai.node.ImageManip
createMobileNetDetectionNetwork(self: depthai.Pipeline)depthai.node.MobileNetDetectionNetwork
createMobileNetSpatialDetectionNetwork(self: depthai.Pipeline)depthai.node.MobileNetSpatialDetectionNetwork
createMonoCamera(self: depthai.Pipeline)depthai.node.MonoCamera
createNeuralNetwork(self: depthai.Pipeline)depthai.node.NeuralNetwork
createObjectTracker(self: depthai.Pipeline)depthai.node.ObjectTracker
createSPIIn(self: depthai.Pipeline)depthai.node.SPIIn
createSPIOut(self: depthai.Pipeline)depthai.node.SPIOut
createSpatialLocationCalculator(self: depthai.Pipeline)depthai.node.SpatialLocationCalculator
createStereoDepth(self: depthai.Pipeline)depthai.node.StereoDepth
createSystemLogger(self: depthai.Pipeline)depthai.node.SystemLogger
createVideoEncoder(self: depthai.Pipeline)depthai.node.VideoEncoder
createXLinkIn(self: depthai.Pipeline)depthai.node.XLinkIn
createXLinkOut(self: depthai.Pipeline)depthai.node.XLinkOut
createYoloDetectionNetwork(self: depthai.Pipeline)depthai.node.YoloDetectionNetwork
createYoloSpatialDetectionNetwork(self: depthai.Pipeline)depthai.node.YoloSpatialDetectionNetwork
getAllNodes(*args, **kwargs)

Overloaded function.

  1. getAllNodes(self: depthai.Pipeline) -> List[depthai.Node]

Get a vector of all nodes

  1. getAllNodes(self: depthai.Pipeline) -> List[depthai.Node]

Get a vector of all nodes

getAssetManager(*args, **kwargs)

Overloaded function.

  1. getAssetManager(self: depthai.Pipeline) -> depthai.AssetManager

Get pipelines AssetManager as reference

  1. getAssetManager(self: depthai.Pipeline) -> depthai.AssetManager

Get pipelines AssetManager as reference

getCalibrationData(self: depthai.Pipeline)depthai.CalibrationHandler

gets the calibration data which is set through pipeline

Returns

the calibrationHandler with calib data in the pipeline

getConnectionMap(self: depthai.Pipeline) → Dict[int, Set[depthai.Node.Connection]]

Get a reference to internal connection representation

getConnections(self: depthai.Pipeline) → List[depthai.Node.Connection]

Get all connections

getDeviceConfig(self: depthai.Pipeline)depthai.Device.Config

Get device configuration needed for this pipeline

getGlobalProperties(self: depthai.Pipeline)depthai.GlobalProperties
Returns

Global properties of current pipeline

getNode(*args, **kwargs)

Overloaded function.

  1. getNode(self: depthai.Pipeline, arg0: int) -> depthai.Node

Get node with id if it exists, nullptr otherwise

  1. getNode(self: depthai.Pipeline, arg0: int) -> depthai.Node

Get node with id if it exists, nullptr otherwise

getNodeMap(self: depthai.Pipeline) → Dict[int, depthai.Node]

Get a reference to internal node map

getOpenVINOVersion(self: depthai.Pipeline)depthai.OpenVINO.Version

Get possible OpenVINO version to run this pipeline

getRequiredOpenVINOVersion(self: depthai.Pipeline) → Optional[depthai.OpenVINO.Version]

Get required OpenVINO version to run this pipeline. Can be none

Link output to an input. Both nodes must be on the same pipeline

Throws an error if they aren’t or cannot be connected

Parameter out:

Nodes output to connect from

Parameter in:

Nodes input to connect to

remove(self: depthai.Pipeline, node: depthai.Node)None

Removes a node from pipeline

setCalibrationData(self: depthai.Pipeline, calibrationDataHandler: depthai.CalibrationHandler)None

Sets the calibration in pipeline which overrides the calibration data in eeprom

Parameter calibrationDataHandler:

CalibrationHandler object which is loaded with calibration information.

setCameraTuningBlobPath(self: depthai.Pipeline, path: str)None

Set a camera IQ (Image Quality) tuning blob, used for all cameras

setOpenVINOVersion(self: depthai.Pipeline, version: depthai.OpenVINO.Version = <Version.???: 5>)None

Set a specific OpenVINO version to use with this pipeline

setXLinkChunkSize(self: depthai.Pipeline, sizeBytes: int)None

Set chunk size for splitting device-sent XLink packets, in bytes. A larger value could increase performance, with 0 disabling chunking. A negative value won’t modify the device defaults - configured per protocol, currently 64*1024 for both USB and Ethernet.

Unlink output from an input.

Throws an error if link doesn’t exists

Parameter out:

Nodes output to unlink from

Parameter in:

Nodes input to unlink to

class depthai.Point2f

Bases: pybind11_builtins.pybind11_object

Point2f structure

x and y coordinates that define a 2D point.

Methods:

__init__(*args, **kwargs)

Overloaded function.

Attributes:

x

y

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.Point2f) -> None

  2. __init__(self: depthai.Point2f, arg0: float, arg1: float) -> None

property x
property y
class depthai.Point3f

Bases: pybind11_builtins.pybind11_object

Point3f structure

x,y,z coordinates that define a 3D point.

Methods:

__init__(*args, **kwargs)

Overloaded function.

Attributes:

x

y

z

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: depthai.Point3f) -> None

  2. __init__(self: depthai.Point3f, arg0: float, arg1: float, arg2: float) -> None

property x
property y
property z
class depthai.PrebootConfig

Bases: pybind11_builtins.pybind11_object

Classes:

USB

Methods:

__init__(self)

Attributes:

usb

watchdogTimeoutMs

class USB

Bases: pybind11_builtins.pybind11_object

Methods:

__init__(self)

Attributes:

flashBootedPid

flashBootedVid

maxSpeed

pid

vid

__init__(self: depthai.PrebootConfig.USB)None
property flashBootedPid
property flashBootedVid
property maxSpeed
property pid
property vid
__init__(self: depthai.PrebootConfig)None
property usb
property watchdogTimeoutMs
class depthai.ProcessorType

Bases: pybind11_builtins.pybind11_object

Members:

LEON_CSS

LEON_MSS

Attributes:

LEON_CSS

LEON_MSS

name

value

Methods:

__init__(self, value)

LEON_CSS = <ProcessorType.LEON_CSS: 0>
LEON_MSS = <ProcessorType.LEON_MSS: 1>
__init__(self: depthai.ProcessorType, value: int)None
property name
property value
class depthai.RawBuffer

Bases: pybind11_builtins.pybind11_object

RawBuffer structure

Methods:

__init__(self)

Attributes:

data

__init__(self: depthai.RawBuffer)None
property data
class depthai.RawCameraControl

Bases: depthai.RawBuffer

RawCameraControl structure

Classes:

AntiBandingMode

Members:

AutoFocusMode

Members:

AutoWhiteBalanceMode

Members:

Command

Members:

EffectMode

Members:

SceneMode

Members:

Methods:

__init__(self)

clearCommand(self, arg0)

getCommand(self, arg0)

setCommand(self, arg0, arg1)

Attributes:

aeLockMode

afRegion

antiBandingMode

autoFocusMode

awbLockMode

awbMode

brightness

chromaDenoise

cmdMask

contrast

effectMode

expCompensation

expManual

lensPosition

lumaDenoise

saturation

sceneMode

sharpness

wbColorTemp

class AntiBandingMode

Bases: pybind11_builtins.pybind11_object

Members:

OFF

MAINS_50_HZ

MAINS_60_HZ

AUTO

Attributes:

AUTO

MAINS_50_HZ

MAINS_60_HZ

OFF

name

value

Methods:

__init__(self, value)

AUTO = <AntiBandingMode.AUTO: 3>
MAINS_50_HZ = <AntiBandingMode.MAINS_50_HZ: 1>
MAINS_60_HZ = <AntiBandingMode.MAINS_60_HZ: 2>