Python API Reference¶
Classes:
Abstract message |
|
AprilTag structure. |
|
AprilTagConfig message. |
|
Specify properties for AprilTag |
|
AprilTags message. |
|
Asset is identified with string key and can store arbitrary binary data |
|
AssetManager can store assets and serialize |
|
Base message - buffer of binary data |
|
CalibrationHandler is an interface to read/load/write structured calibration and device data. |
|
Which Camera socket to use. |
|
CameraControl message. |
|
Members: |
|
CameraFeatures structure |
|
Camera sensor image orientation / pixel readout. |
|
CameraInfo structure |
|
Which CameraModel to initialize the calibration with. |
|
Specify properties for ColorCamera such as camera ID, … |
|
Sensor config |
|
Camera sensor type |
|
Chip temperature information. |
|
Specify properties for ColorCamera such as camera ID, … |
|
Camera sensor type |
|
CpuUsage structure |
|
Access to send messages through XLink stream |
|
Access to receive messages coming from XLink stream |
|
Members: |
|
Specify properties for DetectionNetwork |
|
Members: |
|
Specifies how to parse output of detection networks |
|
Specify properties for DetectionParser |
|
Represents the DepthAI device with the methods to interact with it. |
|
The core of depthai device for RAII, connects to device and maintains watchdog, timesync, … |
|
Represents the DepthAI bootloader with the methods to interact with it. |
|
Describes a connected device |
|
EdgeDetectorConfig message. |
|
EdgeDetectorConfigData configuration data structure |
|
Specify properties for EdgeDetector |
|
EepromData structure |
|
Extrinsics structure |
|
FeatureTrackerConfig message. |
|
Specify properties for FeatureTracker |
|
Members: |
|
Specify properties which apply for whole pipeline |
|
IMUData message. |
|
IMU output |
|
Accelerometer |
|
Gyroscope |
|
Magnetic field |
|
Rotation Vector with Accuracy |
|
Available IMU sensors. |
|
ImageManipConfig message. |
|
ImgDetection structure |
|
ImgDetections message. |
|
ImgFrame message. |
|
Interpolation type |
|
Members: |
|
Median filter config |
|
MemoryInfo structure |
|
MessageDemux does not have any properties to set |
|
MessageGroup message. |
|
Specify properties for MonoCamera such as camera ID, … |
|
NNData message. |
|
Specify properties for NeuralNetwork such as blob path, … |
|
Abstract Node |
|
Specify properties for ObjectTracker |
|
Support for basic OpenVINO related actions like version identification of neural network blobs,… |
|
Point2f structure |
|
Point3f structure |
|
PointCloudConfig message. |
|
PointCloudData message. |
|
Specify properties for PointCloud |
|
Members: |
|
Base Properties structure |
|
RawAprilTags configuration structure |
|
RawBuffer structure |
|
RawCameraControl structure |
|
RawEdgeDetectorConfig configuration structure |
|
RawFeatureTrackerConfig configuration structure |
|
RawImageManipConfig structure |
|
RawImgDetections structure |
|
RawImgFrame structure |
|
RawNNData structure |
|
RawPointCloudConfig configuration structure |
|
RawSpatialImgDetections structure |
|
RawStereoDepthConfig configuration structure |
|
System information of device |
|
RawToFConfig configuration structure |
|
RawTrackedFeatures structure |
|
RawTracklets structure |
|
Rect structure |
|
RotatedRect structure |
|
Properties for SPIIn node |
|
Specify properties for SPIOut node |
|
Specify ScriptProperties options such as script uri, script name, … |
|
Members: |
|
Size2f structure |
|
Specify properties for SpatialDetectionNetwork |
|
SpatialImgDetection structure |
|
SpatialImgDetections message. |
|
SpatialLocationCalculatorAlgorithm configuration modes |
|
SpatialLocationCalculatorConfig message. |
|
SpatialLocation configuration data structure |
|
SpatialLocation configuration thresholds structure |
|
SpatialLocationCalculatorData message. |
|
Specify properties for SpatialLocationCalculator |
|
SpatialLocations structure |
|
StereoDepthConfig message. |
|
Specify properties for StereoDepth |
|
Describes which camera sockets can be used for stereo and their baseline. |
|
StereoRectification structure |
|
Specify properties for Sync. |
|
SystemInformation message. |
|
SystemLoggerProperties structure |
|
TensorInfo structure |
|
Timestamp structure |
|
ToFConfig message. |
|
Specify properties for ToF |
|
TrackedFeature structure |
|
TrackedFeatures message. |
|
Members: |
|
Members: |
|
Tracklet structure |
|
Tracklets message. |
|
Properties for UVC node |
|
Get USB Speed |
|
Version structure |
|
Specify properties for VideoEncoder such as profile, bitrate, … |
|
Specify properties for Warp |
|
Represents connection between host and device over XLink protocol |
|
Members: |
|
Members: |
|
Specify properties for XLinkIn such as stream name, … |
|
Specify properties for XLinkOut such as stream name, … |
|
Members: |
|
Members: |
|
Members: |
Exceptions:
Functions:
|
-
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.
AprilTag
¶ Bases:
pybind11_builtins.pybind11_object
AprilTag structure.
Methods:
__init__
(self)Attributes:
The detected bottom left coordinates.
The detected bottom right coordinates.
A measure of the quality of the binary decoding process; the average difference between the intensity of a data bit versus the decision threshold.
accepting large numbers of corrected errors leads to greatly increased false positive rates.
The decoded ID of the tag
The detected top left coordinates.
The detected top right coordinates.
-
__init__
(self: depthai.AprilTag) → None¶
-
property
bottomLeft
¶ The detected bottom left coordinates.
-
property
bottomRight
¶ The detected bottom right coordinates.
-
property
decisionMargin
¶ A measure of the quality of the binary decoding process; the average difference between the intensity of a data bit versus the decision threshold. Higher numbers roughly indicate better decodes. This is a reasonable measure of detection accuracy only for very small tags– not effective for larger tags (where we could have sampled anywhere within a bit cell and still gotten a good detection.
-
property
hamming
¶ accepting large numbers of corrected errors leads to greatly increased false positive rates. As of this implementation, the detector cannot detect tags with a hamming distance greater than 2.
- Type
How many error bits were corrected? Note
-
property
id
¶ The decoded ID of the tag
-
property
topLeft
¶ The detected top left coordinates.
-
property
topRight
¶ The detected top right coordinates.
-
-
class
depthai.
AprilTagConfig
¶ Bases:
depthai.Buffer
AprilTagConfig message.
Classes:
Supported AprilTag families.
AprilTag quad threshold parameters.
Methods:
__init__
(self)get
(self)Retrieve configuration data for AprilTag.
set
(self, arg0)Set explicit configuration.
setFamily
(self, family)Parameter
family
:-
class
Family
¶ Bases:
pybind11_builtins.pybind11_object
Supported AprilTag families.
Members:
TAG_36H11
TAG_36H10
TAG_25H9
TAG_16H5
TAG_CIR21H7
TAG_STAND41H12
Attributes:
Methods:
__init__
(self, value)-
TAG_16H5
= <Family.TAG_16H5: 3>¶
-
TAG_25H9
= <Family.TAG_25H9: 2>¶
-
TAG_36H10
= <Family.TAG_36H10: 1>¶
-
TAG_36H11
= <Family.TAG_36H11: 0>¶
-
TAG_CIR21H7
= <Family.TAG_CIR21H7: 4>¶
-
TAG_STAND41H12
= <Family.TAG_STAND41H12: 5>¶
-
__init__
(self: depthai.RawAprilTagConfig.Family, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
QuadThresholds
¶ Bases:
pybind11_builtins.pybind11_object
AprilTag quad threshold parameters.
Methods:
__init__
(self)Attributes:
Reject quads where pairs of edges have angles that are close to straight or close to 180 degrees.
Should the thresholded image be deglitched? Only useful for very noisy images
When fitting lines to the contours, what is the maximum mean squared error allowed? This is useful in rejecting contours that are far from being quad shaped; rejecting these quads “early” saves expensive decoding processing.
How many corner candidates to consider when segmenting a group of pixels into a quad.
Reject quads containing too few pixels.
When we build our model of black & white pixels, we add an extra check that the white model must be (overall) brighter than the black model.
-
__init__
(self: depthai.RawAprilTagConfig.QuadThresholds) → None¶
-
property
criticalDegree
¶ Reject quads where pairs of edges have angles that are close to straight or close to 180 degrees. Zero means that no quads are rejected. (In degrees).
-
property
deglitch
¶ Should the thresholded image be deglitched? Only useful for very noisy images
-
property
maxLineFitMse
¶ When fitting lines to the contours, what is the maximum mean squared error allowed? This is useful in rejecting contours that are far from being quad shaped; rejecting these quads “early” saves expensive decoding processing.
-
property
maxNmaxima
¶ How many corner candidates to consider when segmenting a group of pixels into a quad.
-
property
minClusterPixels
¶ Reject quads containing too few pixels.
-
property
minWhiteBlackDiff
¶ When we build our model of black & white pixels, we add an extra check that the white model must be (overall) brighter than the black model. How much brighter? (in pixel values: [0,255]).
-
-
__init__
(self: depthai.AprilTagConfig) → None¶
-
get
(self: depthai.AprilTagConfig) → depthai.RawAprilTagConfig¶ Retrieve configuration data for AprilTag.
- Returns
config for stereo depth algorithm
-
set
(self: depthai.AprilTagConfig, arg0: depthai.RawAprilTagConfig) → depthai.AprilTagConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setFamily
(self: depthai.AprilTagConfig, family: depthai.RawAprilTagConfig.Family) → depthai.AprilTagConfig¶ - Parameter
family
: AprilTag family
- Parameter
-
class
-
class
depthai.
AprilTagProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for AprilTag
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Whether to wait for config at ‘inputConfig’ IO
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
initialConfig
¶
-
property
inputConfigSync
¶ Whether to wait for config at ‘inputConfig’ IO
-
-
class
depthai.
AprilTags
¶ Bases:
depthai.Buffer
AprilTags message.
Methods:
__init__
(self)getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
Attributes:
-
__init__
(self: depthai.AprilTags) → None¶
-
property
aprilTags
¶
-
getSequenceNum
(self: depthai.AprilTags) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.AprilTags) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.AprilTags) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setSequenceNum
(self: depthai.AprilTags, arg0: int) → depthai.AprilTags¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.AprilTags, arg0: datetime.timedelta) → depthai.AprilTags¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.AprilTags, arg0: datetime.timedelta) → depthai.AprilTags¶ Sets image timestamp related to dai::Clock::now()
-
-
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:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.Asset) -> None
__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
- Parameter
-
get
(*args, **kwargs)¶ Overloaded function.
get(self: depthai.AssetManager, key: str) -> depthai.Asset
- Returns
Asset assigned to the specified key or a nullptr otherwise
get(self: depthai.AssetManager, key: str) -> depthai.Asset
- Returns
Asset assigned to the specified key or a nullptr otherwise
-
getAll
(*args, **kwargs)¶ Overloaded function.
getAll(self: depthai.AssetManager) -> List[depthai.Asset]
- Returns
All asset stored in the AssetManager
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
- Parameter
-
set
(*args, **kwargs)¶ Overloaded function.
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
set(self: depthai.AssetManager, key: str, asset: depthai.Asset) -> depthai.Asset
Adds or overwrites an asset object to AssetManager with a specified 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
set(self: depthai.AssetManager, key: str, path: Path, 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
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.
BoardConfig
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
GPIO config
Network configuration
UART instance config
USB related config
UVC configuration for USB descriptor
Methods:
__init__
(self)Attributes:
eMMC config
log device prints
log path
Max log size
log verbosity
MIPI 4Lane RGB config
PCIe config
Optional list of FreeBSD sysctl parameters to be set (system, network, etc.).
UART instance map
USB3 phy config
Watchdog config
-
class
GPIO
¶ Bases:
pybind11_builtins.pybind11_object
GPIO config
Attributes:
Classes:
Members:
Drive strength in mA (2, 4, 8 and 12mA)
Members:
Members:
Members:
Methods:
__init__
(*args, **kwargs)Overloaded function.
-
ALT_MODE_0
= <Mode.ALT_MODE_0: 0>¶
-
ALT_MODE_1
= <Mode.ALT_MODE_1: 1>¶
-
ALT_MODE_2
= <Mode.ALT_MODE_2: 2>¶
-
ALT_MODE_3
= <Mode.ALT_MODE_3: 3>¶
-
ALT_MODE_4
= <Mode.ALT_MODE_4: 4>¶
-
ALT_MODE_5
= <Mode.ALT_MODE_5: 5>¶
-
ALT_MODE_6
= <Mode.ALT_MODE_6: 6>¶
-
BUS_KEEPER
= <Pull.BUS_KEEPER: 3>¶
-
DIRECT
= <Mode.DIRECT: 7>¶
-
class
Direction
¶ Bases:
pybind11_builtins.pybind11_object
Members:
INPUT :
OUTPUT :
Attributes:
Methods:
__init__
(self, value)-
INPUT
= <Direction.INPUT: 0>¶
-
OUTPUT
= <Direction.OUTPUT: 1>¶
-
__init__
(self: depthai.BoardConfig.GPIO.Direction, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
Drive
¶ Bases:
pybind11_builtins.pybind11_object
Drive strength in mA (2, 4, 8 and 12mA)
Members:
MA_2 :
MA_4 :
MA_8 :
MA_12 :
Attributes:
Methods:
__init__
(self, value)-
MA_12
= <Drive.MA_12: 12>¶
-
MA_2
= <Drive.MA_2: 2>¶
-
MA_4
= <Drive.MA_4: 4>¶
-
MA_8
= <Drive.MA_8: 8>¶
-
__init__
(self: depthai.BoardConfig.GPIO.Drive, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
HIGH
= <Level.HIGH: 1>¶
-
INPUT
= <Direction.INPUT: 0>¶
-
LOW
= <Level.LOW: 0>¶
-
class
Level
¶ Bases:
pybind11_builtins.pybind11_object
Members:
LOW :
HIGH :
Attributes:
Methods:
__init__
(self, value)-
HIGH
= <Level.HIGH: 1>¶
-
LOW
= <Level.LOW: 0>¶
-
__init__
(self: depthai.BoardConfig.GPIO.Level, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
MA_12
= <Drive.MA_12: 12>¶
-
MA_2
= <Drive.MA_2: 2>¶
-
MA_4
= <Drive.MA_4: 4>¶
-
MA_8
= <Drive.MA_8: 8>¶
-
class
Mode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
ALT_MODE_0 :
ALT_MODE_1 :
ALT_MODE_2 :
ALT_MODE_3 :
ALT_MODE_4 :
ALT_MODE_5 :
ALT_MODE_6 :
DIRECT :
Attributes:
Methods:
__init__
(self, value)-
ALT_MODE_0
= <Mode.ALT_MODE_0: 0>¶
-
ALT_MODE_1
= <Mode.ALT_MODE_1: 1>¶
-
ALT_MODE_2
= <Mode.ALT_MODE_2: 2>¶
-
ALT_MODE_3
= <Mode.ALT_MODE_3: 3>¶
-
ALT_MODE_4
= <Mode.ALT_MODE_4: 4>¶
-
ALT_MODE_5
= <Mode.ALT_MODE_5: 5>¶
-
ALT_MODE_6
= <Mode.ALT_MODE_6: 6>¶
-
DIRECT
= <Mode.DIRECT: 7>¶
-
__init__
(self: depthai.BoardConfig.GPIO.Mode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
NO_PULL
= <Pull.NO_PULL: 0>¶
-
OUTPUT
= <Direction.OUTPUT: 1>¶
-
PULL_DOWN
= <Pull.PULL_DOWN: 2>¶
-
PULL_UP
= <Pull.PULL_UP: 1>¶
-
class
Pull
¶ Bases:
pybind11_builtins.pybind11_object
Members:
NO_PULL :
PULL_UP :
PULL_DOWN :
BUS_KEEPER :
Attributes:
Methods:
__init__
(self, value)-
BUS_KEEPER
= <Pull.BUS_KEEPER: 3>¶
-
NO_PULL
= <Pull.NO_PULL: 0>¶
-
PULL_DOWN
= <Pull.PULL_DOWN: 2>¶
-
PULL_UP
= <Pull.PULL_UP: 1>¶
-
__init__
(self: depthai.BoardConfig.GPIO.Pull, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.BoardConfig.GPIO) -> None
__init__(self: depthai.BoardConfig.GPIO, arg0: depthai.BoardConfig.GPIO.Direction) -> None
__init__(self: depthai.BoardConfig.GPIO, arg0: depthai.BoardConfig.GPIO.Direction, arg1: depthai.BoardConfig.GPIO.Level) -> None
__init__(self: depthai.BoardConfig.GPIO, arg0: depthai.BoardConfig.GPIO.Direction, arg1: depthai.BoardConfig.GPIO.Level, arg2: depthai.BoardConfig.GPIO.Pull) -> None
__init__(self: depthai.BoardConfig.GPIO, arg0: depthai.BoardConfig.GPIO.Direction, arg1: depthai.BoardConfig.GPIO.Mode) -> None
__init__(self: depthai.BoardConfig.GPIO, arg0: depthai.BoardConfig.GPIO.Direction, arg1: depthai.BoardConfig.GPIO.Mode, arg2: depthai.BoardConfig.GPIO.Pull) -> None
-
property
direction
¶
-
property
drive
¶
-
property
level
¶
-
property
mode
¶
-
property
pull
¶
-
property
schmitt
¶
-
property
slewFast
¶
-
-
class
GPIOMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)items
(self)keys
(self)values
(self)-
__init__
(self: depthai.BoardConfig.GPIOMap) → None¶
-
values
(self: depthai.BoardConfig.GPIOMap) → depthai.BoardConfig.ValuesView_GPIOMap¶
-
-
class
ItemsView_GPIOMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
ItemsView_UARTMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
KeysView_GPIOMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
KeysView_UARTMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
Network
¶ Bases:
pybind11_builtins.pybind11_object
Network configuration
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.BoardConfig.Network) → None¶
-
property
mtu
¶
-
property
xlinkTcpNoDelay
¶
-
-
class
UART
¶ Bases:
pybind11_builtins.pybind11_object
UART instance config
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.BoardConfig.UART) → None¶
-
property
tmp
¶
-
-
class
UARTMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)items
(self)keys
(self)values
(self)-
__init__
(self: depthai.BoardConfig.UARTMap) → None¶
-
values
(self: depthai.BoardConfig.UARTMap) → depthai.BoardConfig.ValuesView_UARTMap¶
-
-
class
USB
¶ Bases:
pybind11_builtins.pybind11_object
USB related config
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.BoardConfig.USB) → None¶
-
property
flashBootedPid
¶
-
property
flashBootedVid
¶
-
property
manufacturer
¶
-
property
maxSpeed
¶
-
property
pid
¶
-
property
productName
¶
-
property
vid
¶
-
-
class
UVC
¶ Bases:
pybind11_builtins.pybind11_object
UVC configuration for USB descriptor
Methods:
__init__
(*args, **kwargs)Overloaded function.
Attributes:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.BoardConfig.UVC) -> None
__init__(self: depthai.BoardConfig.UVC, arg0: int, arg1: int) -> None
-
property
cameraName
¶
-
property
enable
¶
-
property
frameType
¶
-
property
height
¶
-
property
width
¶
-
-
class
ValuesView_GPIOMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
ValuesView_UARTMap
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
__init__
(self: depthai.BoardConfig) → None¶
-
property
emmc
¶ eMMC config
-
property
gpio
¶
-
property
logDevicePrints
¶ log device prints
-
property
logPath
¶ log path
-
property
logSizeMax
¶ Max log size
-
property
logVerbosity
¶ log verbosity
-
property
mipi4LaneRgb
¶ MIPI 4Lane RGB config
-
property
network
¶
-
property
pcieInternalClock
¶ PCIe config
-
property
sysctl
¶ Optional list of FreeBSD sysctl parameters to be set (system, network, etc.). For example: “net.inet.tcp.delayed_ack=0” (this one is also set by default)
-
property
uart
¶ UART instance map
-
property
usb
¶
-
property
usb3PhyInternalClock
¶ USB3 phy config
-
property
uvc
¶
-
property
watchdogInitialDelayMs
¶
-
property
watchdogTimeoutMs
¶ Watchdog config
-
class
-
class
depthai.
Buffer
¶ Bases:
depthai.ADatatype
Base message - buffer of binary data
Methods:
__init__
(self)Creates Buffer message
getData
(self)Get non-owning reference to internal buffer
getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setData
(*args, **kwargs)Overloaded function.
setSequenceNum
(self, arg0)Retrieves sequence number
setTimestamp
(self, arg0)Sets timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets timestamp related to dai::Clock::now()
-
__init__
(self: depthai.Buffer) → None¶ Creates Buffer message
-
getData
(self: object) → numpy.ndarray[numpy.uint8]¶ Get non-owning reference to internal buffer
- Returns
Reference to internal buffer
-
getSequenceNum
(self: depthai.Buffer) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.Buffer) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.Buffer) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setData
(*args, **kwargs)¶ Overloaded function.
setData(self: depthai.Buffer, arg0: List[int]) -> None
- Parameter
data
: Copies data to internal buffer
setData(self: depthai.Buffer, arg0: numpy.ndarray[numpy.uint8]) -> None
- Parameter
data
: Copies data to internal buffer
-
setSequenceNum
(self: depthai.Buffer, arg0: int) → depthai.Buffer¶ Retrieves sequence number
-
setTimestamp
(self: depthai.Buffer, arg0: datetime.timedelta) → depthai.Buffer¶ Sets timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.Buffer, arg0: datetime.timedelta) → depthai.Buffer¶ Sets timestamp related to dai::Clock::now()
-
-
class
depthai.
CalibrationHandler
¶ Bases:
pybind11_builtins.pybind11_object
CalibrationHandler is an interface to read/load/write structured calibration and device data. The following fields are protected and aren’t allowed to be overridden by default: - boardName - boardRev - boardConf - hardwareConf - batchName - batchTime - boardOptions - productName
Methods:
__init__
(*args, **kwargs)Overloaded function.
eepromToJson
(self)Get JSON representation of calibration data
eepromToJsonFile
(self, destPath)Write raw calibration/board data to json file.
fromJson
(arg0)Construct a new Calibration Handler object from JSON EepromData.
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
getDistortionModel
(self, cameraId)Get the distortion model of the given camera
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
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
Get the Stereo Right Rectification Rotation object
setBoardInfo
(*args, **kwargs)Overloaded function.
setCameraExtrinsics
(self, srcCameraId, …)Set the Camera Extrinsics object
setCameraIntrinsics
(*args, **kwargs)Overloaded function.
setCameraType
(self, cameraId, cameraModel)Set the Camera Type object
setDeviceName
(self, deviceName)Set the deviceName which responses to getDeviceName of Device
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
setProductName
(self, productName)Set the productName which acts as alisas for users to identify the device
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.
__init__(self: depthai.CalibrationHandler) -> None
__init__(self: depthai.CalibrationHandler, arg0: Path) -> 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.
__init__(self: depthai.CalibrationHandler, arg0: Path, arg1: Path) -> 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.
__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.
-
eepromToJson
(self: depthai.CalibrationHandler) → json¶ Get JSON representation of calibration data
- Returns
JSON structure
-
eepromToJsonFile
(self: depthai.CalibrationHandler, destPath: Path) → 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
- Parameter
-
static
fromJson
(arg0: json) → depthai.CalibrationHandler¶ Construct a new Calibration Handler object from JSON EepromData.
- Parameter
eepromDataJson
: EepromData as JSON
- Parameter
-
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.CAM_C and CameraBoardSocket.CAM_B.
- 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
- Parameter
-
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 considered 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 homogeneous 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]
- Parameter
-
getCameraIntrinsics
(*args, **kwargs)¶ Overloaded function.
getCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, resizeWidth: int = -1, resizeHeight: int = -1, topLeftPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f89b858b9b0>, bottomRightPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f89b858b8f0>, keepAspectRatio: bool = True) -> 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
- Parameter
keepAspectRatio
: Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side
- Returns
Represents 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]
getCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, destShape: depthai.Size2f, topLeftPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f89b858bc70>, bottomRightPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f89b858b970>, keepAspectRatio: bool = True) -> 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
- Parameter
keepAspectRatio
: Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side
- Returns
Represents 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]
getCameraIntrinsics(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket, destShape: Tuple[int, int], topLeftPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f89b858bdf0>, bottomRightPixelId: depthai.Point2f = <depthai.Point2f object at 0x7f89b858bbf0>, keepAspectRatio: bool = True) -> 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
- Parameter
keepAspectRatio
: Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side
- Returns
Represents 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 considered 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 homogeneous 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]
- Parameter
-
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 considered 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
- Parameter
-
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
Represents 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]
- Parameter
-
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] for CameraModel::Perspective or [k1, k2, k3, k4] for CameraModel::Fisheye see https://docs.opencv.org/4.5.4/d9/d0c/group__calib3d.html for Perspective model (Rational Polynomial Model) see https://docs.opencv.org/4.5.4/db/d58/group__calib3d__fisheye.html for Fisheye model
- Return type
the distortion coefficients of the requested camera in this order
- Parameter
-
getDistortionModel
(self: depthai.CalibrationHandler, cameraId: depthai.CameraBoardSocket) → depthai.CameraModel¶ Get the distortion model of the given camera
- Parameter
cameraId
: of the camera with lens position is requested.
- Returns
lens position of the camera with given cameraId at which it was calibrated.
- Parameter
-
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.
- Parameter
-
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 considered 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 homogeneous 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]
- Parameter
-
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 position of the camera with given cameraId at which it was calibrated.
- Parameter
-
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
(*args, **kwargs)¶ Overloaded function.
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.
setBoardInfo(self: depthai.CalibrationHandler, productName: str, boardName: str, boardRev: str, boardConf: str, hardwareConf: str, batchName: str, batchTime: int, boardOptions: int, boardCustom: str = ‘’) -> None
Set the Board Info object. Creates version 7 EEPROM data
- Parameter
productName
: Sets product name (alias).
- Parameter
boardName
: Sets board name.
- Parameter
boardRev
: Sets board revision id.
- Parameter
boardConf
: Sets board configuration id.
- Parameter
hardwareConf
: Sets hardware configuration id.
- Parameter
batchName
: Sets batch name.
- Parameter
batchTime
: Sets batch time (unix timestamp).
- Parameter
boardCustom
: Sets a custom board (Default empty string).
setBoardInfo(self: depthai.CalibrationHandler, deviceName: str, productName: str, boardName: str, boardRev: str, boardConf: str, hardwareConf: str, batchName: str, batchTime: int, boardOptions: int, boardCustom: str = ‘’) -> None
Set the Board Info object. Creates version 7 EEPROM data
- Parameter
deviceName
: Sets device name.
- Parameter
productName
: Sets product name (alias).
- Parameter
boardName
: Sets board name.
- Parameter
boardRev
: Sets board revision id.
- Parameter
boardConf
: Sets board configuration id.
- Parameter
hardwareConf
: Sets hardware configuration id.
- Parameter
batchName
: Sets batch name. Not supported anymore
- Parameter
batchTime
: Sets batch time (unix timestamp).
- Parameter
boardCustom
: Sets a custom board (Default empty string).
-
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 considered as relative origin.
- Parameter
destCameraId
: Camera Id of the camera which will be considered 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.
- Parameter
-
setCameraIntrinsics
(*args, **kwargs)¶ Overloaded function.
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
: Represents 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]
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
: Represents the width of the image at which intrinsics are calculated.
- Parameter
height
: Represents 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]
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
: Represents 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
- Parameter
-
setDeviceName
(self: depthai.CalibrationHandler, deviceName: str) → None¶ Set the deviceName which responses to getDeviceName of Device
- Parameter
deviceName
: Sets device name.
- Parameter
-
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 distortion coefficients are computed
- Parameter
distortionCoefficients
: Distortion Coefficients of the respective Camera.
- Parameter
-
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
- Parameter
-
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 considered 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.
- Parameter
-
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
- Parameter
-
setProductName
(self: depthai.CalibrationHandler, productName: str) → None¶ Set the productName which acts as alisas for users to identify the device
- Parameter
productName
: Sets product name (alias).
- Parameter
-
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)
- Parameter
-
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)
- Parameter
-
-
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
CAM_A
CAM_B
CAM_C
CAM_D
CAM_E
CAM_F
CAM_G
CAM_H
RGB : Deprecated: Use CAM_A or address camera by name instead
LEFT : Deprecated: Use CAM_B or address camera by name instead
RIGHT : Deprecated: Use CAM_C or address camera by name instead
CENTER : Deprecated: Use CAM_A or address camera by name instead
Attributes:
Methods:
__init__
(self, value)-
AUTO
= <CameraBoardSocket.AUTO: -1>¶
-
CAM_A
= <CameraBoardSocket.CAM_A: 0>¶
-
CAM_B
= <CameraBoardSocket.CAM_B: 1>¶
-
CAM_C
= <CameraBoardSocket.CAM_C: 2>¶
-
CAM_D
= <CameraBoardSocket.CAM_D: 3>¶
-
CAM_E
= <CameraBoardSocket.CAM_E: 4>¶
-
CAM_F
= <CameraBoardSocket.CAM_F: 5>¶
-
CAM_G
= <CameraBoardSocket.CAM_G: 6>¶
-
CAM_H
= <CameraBoardSocket.CAM_H: 7>¶
-
CENTER
= <CameraBoardSocket.CAM_A: 0>¶
-
LEFT
= <CameraBoardSocket.CAM_B: 1>¶
-
RGB
= <CameraBoardSocket.CAM_A: 0>¶
-
RIGHT
= <CameraBoardSocket.CAM_C: 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/manual focus
Auto/manual white balance
Auto/manual exposure
Anti banding
…
By default the camera enables 3A, with auto-focus in CONTINUOUS_VIDEO mode, auto-white-balance in AUTO mode, and auto-exposure with anti-banding for 50Hz mains frequency.
Classes:
Members:
Members:
Members:
Members:
Members:
Members:
Members:
Members:
Members:
Methods:
__init__
(self)Construct CameraControl message
get
(self)Retrieve configuration data for CameraControl.
getCaptureStill
(self)Check whether command to capture a still is set
getExposureTime
(self)Retrieves exposure time
getLensPosition
(self)Retrieves lens position, range 0..255.
getLensPositionRaw
(self)Retrieves lens position, range 0.0f..1.0f.
getSensitivity
(self)Retrieves sensitivity, as an ISO value
set
(self, config)Set explicit configuration.
setAntiBandingMode
(self, mode)Set a command to specify anti-banding mode.
setAutoExposureCompensation
(self, compensation)Set a command to specify auto exposure compensation
setAutoExposureEnable
(self)Set a command to enable auto exposure
setAutoExposureLimit
(*args, **kwargs)Overloaded function.
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.
setAutoFocusLensRange
(self, …)Set autofocus lens range, infinityPosition < macroPosition, valid values 0..255.
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
setCaptureIntent
(self, mode)Set a command to specify capture intent mode
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
setControlMode
(self, mode)Set a command to specify control mode
setEffectMode
(self, mode)Set a command to specify effect mode
setExternalTrigger
(self, numFramesBurst, …)Set a command to enable external trigger snapshot mode
setFrameSyncMode
(self, mode)Set the frame sync mode for continuous streaming operation mode, translating to how the camera pin FSIN/FSYNC is used: input/output/disabled
setLumaDenoise
(self, value)Set a command to adjust luma denoise amount
setManualExposure
(*args, **kwargs)Overloaded function.
setManualFocus
(self, lensPosition)Set a command to specify manual focus position
setManualFocusRaw
(self, lensPositionRaw)Set a command to specify manual focus position (more precise control).
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
setStrobeDisable
(self)Disable STROBE output
setStrobeExternal
(self, gpioNumber, activeLevel)Enable STROBE output driven by a MyriadX GPIO, optionally configuring the polarity This normally requires a FSIN/FSYNC/trigger input for MyriadX (usually GPIO 41), to generate timings
setStrobeSensor
(self, activeLevel)Enable STROBE output on sensor pin, optionally configuring the polarity.
-
class
AntiBandingMode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
OFF
MAINS_50_HZ
MAINS_60_HZ
AUTO
Attributes:
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:
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:
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
CaptureIntent
¶ Bases:
pybind11_builtins.pybind11_object
Members:
CUSTOM
PREVIEW
STILL_CAPTURE
VIDEO_RECORD
VIDEO_SNAPSHOT
ZERO_SHUTTER_LAG
Attributes:
Methods:
__init__
(self, value)-
CUSTOM
= <CaptureIntent.CUSTOM: 0>¶
-
PREVIEW
= <CaptureIntent.PREVIEW: 1>¶
-
STILL_CAPTURE
= <CaptureIntent.STILL_CAPTURE: 2>¶
-
VIDEO_RECORD
= <CaptureIntent.VIDEO_RECORD: 3>¶
-
VIDEO_SNAPSHOT
= <CaptureIntent.VIDEO_SNAPSHOT: 4>¶
-
ZERO_SHUTTER_LAG
= <CaptureIntent.ZERO_SHUTTER_LAG: 5>¶
-
__init__
(self: depthai.RawCameraControl.CaptureIntent, 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:
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
ControlMode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
OFF
AUTO
USE_SCENE_MODE
Attributes:
Methods:
__init__
(self, value)-
AUTO
= <ControlMode.AUTO: 1>¶
-
OFF
= <ControlMode.OFF: 0>¶
-
USE_SCENE_MODE
= <ControlMode.USE_SCENE_MODE: 2>¶
-
__init__
(self: depthai.RawCameraControl.ControlMode, 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:
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
FrameSyncMode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
OFF
OUTPUT
INPUT
Attributes:
Methods:
__init__
(self, value)-
INPUT
= <FrameSyncMode.INPUT: 2>¶
-
OFF
= <FrameSyncMode.OFF: 0>¶
-
OUTPUT
= <FrameSyncMode.OUTPUT: 1>¶
-
__init__
(self: depthai.RawCameraControl.FrameSyncMode, 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:
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
-
get
(self: depthai.CameraControl) → depthai.RawCameraControl¶ Retrieve configuration data for CameraControl.
- Returns
config for CameraControl
-
getCaptureStill
(self: depthai.CameraControl) → bool¶ Check whether command to capture a still is set
- Returns
True if capture still command is set
-
getExposureTime
(self: depthai.CameraControl) → datetime.timedelta¶ Retrieves exposure time
-
getLensPosition
(self: depthai.CameraControl) → int¶ Retrieves lens position, range 0..255. Returns -1 if not available
-
getLensPositionRaw
(self: depthai.CameraControl) → float¶ Retrieves lens position, range 0.0f..1.0f.
-
getSensitivity
(self: depthai.CameraControl) → int¶ Retrieves sensitivity, as an ISO value
-
set
(self: depthai.CameraControl, config: depthai.RawCameraControl) → depthai.CameraControl¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setAntiBandingMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.AntiBandingMode) → depthai.CameraControl¶ Set a command to specify anti-banding mode. Anti-banding / anti-flicker works in auto-exposure mode, by controlling the exposure time to be applied in multiples of half the mains period, for example in multiple of 10ms for 50Hz (period 20ms) AC-powered illumination sources.
If the scene would be too bright for the smallest exposure step (10ms in the example, with ISO at a minimum of 100), anti-banding is not effective.
- Parameter
mode
: Anti-banding mode to use. Default: MAINS_50_HZ
- Parameter
-
setAutoExposureCompensation
(self: depthai.CameraControl, compensation: int) → depthai.CameraControl¶ Set a command to specify auto exposure compensation
- Parameter
compensation
: Compensation value between -9..9, default 0
- Parameter
-
setAutoExposureEnable
(self: depthai.CameraControl) → depthai.CameraControl¶ Set a command to enable auto exposure
-
setAutoExposureLimit
(*args, **kwargs)¶ Overloaded function.
setAutoExposureLimit(self: depthai.CameraControl, maxExposureTimeUs: int) -> depthai.CameraControl
Set a command to specify the maximum exposure time limit for auto-exposure. By default the AE algorithm prioritizes increasing exposure over ISO, up to around frame-time (subject to further limits imposed by anti-banding)
- Parameter
maxExposureTimeUs
: Maximum exposure time in microseconds
setAutoExposureLimit(self: depthai.CameraControl, maxExposureTime: datetime.timedelta) -> depthai.CameraControl
Set a command to specify the maximum exposure time limit for auto-exposure. By default the AE algorithm prioritizes increasing exposure over ISO, up to around frame-time (subject to further limits imposed by anti-banding)
- Parameter
maxExposureTime
: Maximum exposure time
-
setAutoExposureLock
(self: depthai.CameraControl, lock: bool) → depthai.CameraControl¶ Set a command to specify lock auto exposure
- Parameter
lock
: Auto exposure lock mode enabled or disabled
- Parameter
-
setAutoExposureRegion
(self: depthai.CameraControl, startX: int, startY: int, width: int, height: int) → depthai.CameraControl¶ Set a command to specify auto exposure region in pixels. Note: the region should be mapped to the configured sensor resolution, before ISP scaling
- 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
- Parameter
-
setAutoFocusLensRange
(self: depthai.CameraControl, infinityPosition: int, macroPosition: int) → depthai.CameraControl¶ Set autofocus lens range, infinityPosition < macroPosition, valid values 0..255. May help to improve autofocus in case the lens adjustment is not typical/tuned
-
setAutoFocusMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.AutoFocusMode) → depthai.CameraControl¶ Set a command to specify autofocus mode. Default CONTINUOUS_VIDEO
-
setAutoFocusRegion
(self: depthai.CameraControl, startX: int, startY: int, width: int, height: int) → depthai.CameraControl¶ Set a command to specify focus region in pixels. Note: the region should be mapped to the configured sensor resolution, before ISP scaling
- 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
- Parameter
-
setAutoFocusTrigger
(self: depthai.CameraControl) → depthai.CameraControl¶ Set a command to trigger autofocus
-
setAutoWhiteBalanceLock
(self: depthai.CameraControl, lock: bool) → depthai.CameraControl¶ Set a command to specify auto white balance lock
- Parameter
lock
: Auto white balance lock mode enabled or disabled
- Parameter
-
setAutoWhiteBalanceMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.AutoWhiteBalanceMode) → depthai.CameraControl¶ Set a command to specify auto white balance mode
- Parameter
mode
: Auto white balance mode to use. Default AUTO
- Parameter
-
setBrightness
(self: depthai.CameraControl, value: int) → depthai.CameraControl¶ Set a command to adjust image brightness
- Parameter
value
: Brightness, range -10..10, default 0
- Parameter
-
setCaptureIntent
(self: depthai.CameraControl, mode: depthai.RawCameraControl.CaptureIntent) → depthai.CameraControl¶ Set a command to specify capture intent mode
- Parameter
mode
: Capture intent mode
- Parameter
-
setCaptureStill
(self: depthai.CameraControl, capture: bool) → depthai.CameraControl¶ Set a command to capture a still image
-
setChromaDenoise
(self: depthai.CameraControl, value: int) → depthai.CameraControl¶ Set a command to adjust chroma denoise amount
- Parameter
value
: Chroma denoise amount, range 0..4, default 1
- Parameter
-
setContrast
(self: depthai.CameraControl, value: int) → depthai.CameraControl¶ Set a command to adjust image contrast
- Parameter
value
: Contrast, range -10..10, default 0
- Parameter
-
setControlMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.ControlMode) → depthai.CameraControl¶ Set a command to specify control mode
- Parameter
mode
: Control mode
- Parameter
-
setEffectMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.EffectMode) → depthai.CameraControl¶ Set a command to specify effect mode
- Parameter
mode
: Effect mode
- Parameter
-
setExternalTrigger
(self: depthai.CameraControl, numFramesBurst: int, numFramesDiscard: int) → depthai.CameraControl¶ Set a command to enable external trigger snapshot mode
A rising edge on the sensor FSIN pin will make it capture a sequence of numFramesBurst frames. First numFramesDiscard will be skipped as configured (can be set to 0 as well), as they may have degraded quality
-
setFrameSyncMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.FrameSyncMode) → depthai.CameraControl¶ Set the frame sync mode for continuous streaming operation mode, translating to how the camera pin FSIN/FSYNC is used: input/output/disabled
-
setLumaDenoise
(self: depthai.CameraControl, value: int) → depthai.CameraControl¶ Set a command to adjust luma denoise amount
- Parameter
value
: Luma denoise amount, range 0..4, default 1
- Parameter
-
setManualExposure
(*args, **kwargs)¶ Overloaded function.
setManualExposure(self: depthai.CameraControl, exposureTimeUs: int, sensitivityIso: int) -> depthai.CameraControl
Set a command to manually specify exposure
- Parameter
exposureTimeUs
: Exposure time in microseconds
- Parameter
sensitivityIso
: Sensitivity as ISO value, usual range 100..1600
setManualExposure(self: depthai.CameraControl, exposureTime: datetime.timedelta, sensitivityIso: int) -> depthai.CameraControl
Set a command to manually specify exposure
- Parameter
exposureTime
: Exposure time
- Parameter
sensitivityIso
: Sensitivity as ISO value, usual range 100..1600
-
setManualFocus
(self: depthai.CameraControl, lensPosition: int) → depthai.CameraControl¶ Set a command to specify manual focus position
- Parameter
lensPosition
: specify lens position 0..255
- Parameter
-
setManualFocusRaw
(self: depthai.CameraControl, lensPositionRaw: float) → depthai.CameraControl¶ Set a command to specify manual focus position (more precise control).
- Parameter
lensPositionRaw
: specify lens position 0.0f .. 1.0f
- Returns
CameraControl&
- Parameter
-
setManualWhiteBalance
(self: depthai.CameraControl, colorTemperatureK: int) → depthai.CameraControl¶ Set a command to manually specify white-balance color correction
- Parameter
colorTemperatureK
: Light source color temperature in kelvins, range 1000..12000
- Parameter
-
setSaturation
(self: depthai.CameraControl, value: int) → depthai.CameraControl¶ Set a command to adjust image saturation
- Parameter
value
: Saturation, range -10..10, default 0
- Parameter
-
setSceneMode
(self: depthai.CameraControl, mode: depthai.RawCameraControl.SceneMode) → depthai.CameraControl¶ Set a command to specify scene mode
- Parameter
mode
: Scene mode
- Parameter
-
setSharpness
(self: depthai.CameraControl, value: int) → depthai.CameraControl¶ Set a command to adjust image sharpness
- Parameter
value
: Sharpness, range 0..4, default 1
- Parameter
-
setStartStreaming
(self: depthai.CameraControl) → depthai.CameraControl¶ Set a command to start streaming
-
setStopStreaming
(self: depthai.CameraControl) → depthai.CameraControl¶ Set a command to stop streaming
-
setStrobeDisable
(self: depthai.CameraControl) → depthai.CameraControl¶ Disable STROBE output
-
setStrobeExternal
(self: depthai.CameraControl, gpioNumber: int, activeLevel: int) → depthai.CameraControl¶ Enable STROBE output driven by a MyriadX GPIO, optionally configuring the polarity This normally requires a FSIN/FSYNC/trigger input for MyriadX (usually GPIO 41), to generate timings
-
setStrobeSensor
(self: depthai.CameraControl, activeLevel: int) → depthai.CameraControl¶ Enable STROBE output on sensor pin, optionally configuring the polarity. Note: for many sensors the polarity is high-active and not configurable
-
class
depthai.
CameraExposureOffset
¶ Bases:
pybind11_builtins.pybind11_object
Members:
START
MIDDLE
END
Attributes:
Methods:
__init__
(self, value)-
END
= <CameraExposureOffset.END: 2>¶
-
MIDDLE
= <CameraExposureOffset.MIDDLE: 1>¶
-
START
= <CameraExposureOffset.START: 0>¶
-
__init__
(self: depthai.CameraExposureOffset, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
CameraFeatures
¶ Bases:
pybind11_builtins.pybind11_object
CameraFeatures structure
Characterizes detected cameras on board
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.CameraFeatures) → None¶
-
property
calibrationResolution
¶
-
property
configs
¶
-
property
hasAutofocus
¶
-
property
hasAutofocusIC
¶
-
property
height
¶
-
property
name
¶
-
property
orientation
¶
-
property
sensorName
¶
-
property
socket
¶
-
property
supportedTypes
¶
-
property
width
¶
-
-
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:
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:
-
__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:
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.
CameraProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for ColorCamera such as camera ID, …
Classes:
For 24 bit color these can be either RGB or BGR
Warp mesh source
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
class
ColorOrder
¶ Bases:
pybind11_builtins.pybind11_object
For 24 bit color these can be either RGB or BGR
Members:
BGR
RGB
Attributes:
Methods:
__init__
(self, value)-
BGR
= <ColorOrder.BGR: 0>¶
-
RGB
= <ColorOrder.RGB: 1>¶
-
__init__
(self: depthai.CameraProperties.ColorOrder, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
WarpMeshSource
¶ Bases:
pybind11_builtins.pybind11_object
Warp mesh source
Members:
AUTO
NONE
CALIBRATION
URI
Attributes:
Methods:
__init__
(self, value)-
AUTO
= <WarpMeshSource.AUTO: -1>¶
-
CALIBRATION
= <WarpMeshSource.CALIBRATION: 1>¶
-
NONE
= <WarpMeshSource.NONE: 0>¶
-
URI
= <WarpMeshSource.URI: 2>¶
-
__init__
(self: depthai.CameraProperties.WarpMeshSource, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
boardSocket
¶
-
property
calibAlpha
¶
-
property
cameraName
¶
-
property
colorOrder
¶
-
property
fp16
¶
-
property
fps
¶
-
property
imageOrientation
¶
-
property
initialControl
¶
-
property
interleaved
¶
-
property
isp3aFps
¶
-
property
ispScale
¶
-
property
numFramesPoolIsp
¶
-
property
numFramesPoolPreview
¶
-
property
numFramesPoolRaw
¶
-
property
numFramesPoolStill
¶
-
property
numFramesPoolVideo
¶
-
property
previewHeight
¶
-
property
previewKeepAspectRatio
¶
-
property
previewWidth
¶
-
property
rawPacked
¶
-
property
resolutionHeight
¶
-
property
resolutionWidth
¶
-
property
sensorCropX
¶
-
property
sensorCropY
¶
-
property
sensorType
¶
-
property
stillHeight
¶
-
property
stillWidth
¶
-
property
videoHeight
¶
-
property
videoWidth
¶
-
property
warpMeshHeight
¶
-
property
warpMeshSource
¶
-
property
warpMeshStepHeight
¶
-
property
warpMeshStepWidth
¶
-
property
warpMeshUri
¶
-
property
warpMeshWidth
¶
-
class
-
class
depthai.
CameraSensorConfig
¶ Bases:
pybind11_builtins.pybind11_object
Sensor config
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.CameraSensorConfig) → None¶
-
property
fov
¶
-
property
height
¶
-
property
maxFps
¶
-
property
minFps
¶
-
property
type
¶
-
property
width
¶
-
-
class
depthai.
CameraSensorType
¶ Bases:
pybind11_builtins.pybind11_object
Camera sensor type
Members:
COLOR
MONO
TOF
THERMAL
Attributes:
Methods:
__init__
(self, value)-
COLOR
= <CameraSensorType.COLOR: 0>¶
-
MONO
= <CameraSensorType.MONO: 1>¶
-
THERMAL
= <CameraSensorType.THERMAL: 3>¶
-
TOF
= <CameraSensorType.TOF: 2>¶
-
__init__
(self: depthai.CameraSensorType, 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:
-
__init__
(self: depthai.ChipTemperature) → None¶
-
property
average
¶
-
property
css
¶
-
property
dss
¶
-
property
mss
¶
-
property
upa
¶
-
-
class
depthai.
Clock
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
now
()-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
now
() → datetime.timedelta¶
-
-
class
depthai.
ColorCameraProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for ColorCamera such as camera ID, …
Classes:
For 24 bit color these can be either RGB or BGR
Select the camera sensor resolution
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
class
ColorOrder
¶ Bases:
pybind11_builtins.pybind11_object
For 24 bit color these can be either RGB or BGR
Members:
BGR
RGB
Attributes:
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_1200_P
THE_4_K
THE_5_MP
THE_12_MP
THE_4000X3000
THE_13_MP
THE_5312X6000
THE_48_MP
THE_720_P
THE_800_P
THE_1440X1080
THE_1352X1012
THE_2024X1520
Attributes:
Methods:
__init__
(self, value)-
THE_1080_P
= <SensorResolution.THE_1080_P: 0>¶
-
THE_1200_P
= <SensorResolution.THE_1200_P: 6>¶
-
THE_12_MP
= <SensorResolution.THE_12_MP: 2>¶
-
THE_1352X1012
= <SensorResolution.THE_1352X1012: 12>¶
-
THE_13_MP
= <SensorResolution.THE_13_MP: 3>¶
-
THE_1440X1080
= <SensorResolution.THE_1440X1080: 11>¶
-
THE_2024X1520
= <SensorResolution.THE_2024X1520: 13>¶
-
THE_4000X3000
= <SensorResolution.THE_4000X3000: 8>¶
-
THE_48_MP
= <SensorResolution.THE_48_MP: 10>¶
-
THE_4_K
= <SensorResolution.THE_4_K: 1>¶
-
THE_5312X6000
= <SensorResolution.THE_5312X6000: 9>¶
-
THE_5_MP
= <SensorResolution.THE_5_MP: 7>¶
-
THE_720_P
= <SensorResolution.THE_720_P: 4>¶
-
THE_800_P
= <SensorResolution.THE_800_P: 5>¶
-
__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
eventFilter
¶
-
property
fp16
¶
-
property
fps
¶
-
property
imageOrientation
¶
-
property
initialControl
¶
-
property
interleaved
¶
-
property
isp3aFps
¶
-
property
ispScale
¶
-
property
numFramesPoolIsp
¶
-
property
numFramesPoolPreview
¶
-
property
numFramesPoolRaw
¶
-
property
numFramesPoolStill
¶
-
property
numFramesPoolVideo
¶
-
property
previewHeight
¶
-
property
previewKeepAspectRatio
¶
-
property
previewWidth
¶
-
property
resolution
¶
-
property
sensorCropX
¶
-
property
sensorCropY
¶
-
property
stillHeight
¶
-
property
stillWidth
¶
-
property
videoHeight
¶
-
property
videoWidth
¶
-
class
-
class
depthai.
Colormap
¶ Bases:
pybind11_builtins.pybind11_object
Camera sensor type
Members:
NONE
JET
TURBO
STEREO_JET
STEREO_TURBO
Attributes:
Methods:
__init__
(self, value)-
JET
= <Colormap.JET: 2>¶
-
NONE
= <Colormap.NONE: 0>¶
-
STEREO_JET
= <Colormap.STEREO_JET: 4>¶
-
STEREO_TURBO
= <Colormap.STEREO_TURBO: 3>¶
-
TURBO
= <Colormap.TURBO: 1>¶
-
__init__
(self: depthai.Colormap, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
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:
-
__init__
(self: depthai.CpuUsage) → None¶
-
property
average
¶
-
property
msTime
¶
-
-
class
depthai.
CrashDump
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Methods:
__init__
(self)serializeToJson
(self)Attributes:
-
class
CrashReport
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Methods:
__init__
(self)Attributes:
-
class
ErrorSourceInfo
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Methods:
__init__
(self)Attributes:
-
class
AssertContext
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.CrashDump.CrashReport.ErrorSourceInfo.AssertContext) → None¶
-
property
fileName
¶
-
property
functionName
¶
-
property
line
¶
-
-
class
TrapContext
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.CrashDump.CrashReport.ErrorSourceInfo.TrapContext) → None¶
-
property
trapAddress
¶
-
property
trapName
¶
-
property
trapNumber
¶
-
-
__init__
(self: depthai.CrashDump.CrashReport.ErrorSourceInfo) → None¶
-
property
assertContext
¶
-
property
errorId
¶
-
property
trapContext
¶
-
class
-
class
ThreadCallstack
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Methods:
__init__
(self)Attributes:
-
class
CallstackContext
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.CrashDump.CrashReport.ThreadCallstack.CallstackContext) → None¶
-
property
callSite
¶
-
property
calledTarget
¶
-
property
context
¶
-
property
framePointer
¶
-
-
__init__
(self: depthai.CrashDump.CrashReport.ThreadCallstack) → None¶
-
property
callStack
¶
-
property
instructionPointer
¶
-
property
stackBottom
¶
-
property
stackPointer
¶
-
property
stackTop
¶
-
property
threadId
¶
-
property
threadName
¶
-
property
threadStatus
¶
-
class
-
__init__
(self: depthai.CrashDump.CrashReport) → None¶
-
property
crashedThreadId
¶
-
property
errorSource
¶
-
property
processor
¶
-
property
threadCallstack
¶
-
class
-
__init__
(self: depthai.CrashDump) → None¶
-
property
crashReports
¶
-
property
depthaiCommitHash
¶
-
property
deviceId
¶
-
serializeToJson
(self: depthai.CrashDump) → json¶
-
class
-
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
Warning
This function is thread-unsafe and may return outdated incorrect values. It is only meant for use in simple single-threaded code. Well written code should handle exceptions when calling any DepthAI apis to handle hardware events and multithreaded use.
-
send
(*args, **kwargs)¶ Overloaded function.
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
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
- Parameter
-
setMaxSize
(self: depthai.DataInputQueue, maxSize: int) → None¶ Sets queue maximum size
- Parameter
maxSize
: Specifies maximum number of messages in the queue
- Parameter
-
-
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.
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
addCallback(self: depthai.DataOutputQueue, callback: function) -> int
Adds a callback on message received
- Parameter
callback
: Callback function with message pointer
- Returns
Callback id
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
Warning
This function is thread-unsafe and may return outdated incorrect values. It is only meant for use in simple single-threaded code. Well written code should handle exceptions when calling any DepthAI apis to handle hardware events and multithreaded use.
-
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
- Parameter
-
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
- Parameter
-
setMaxSize
(self: depthai.DataOutputQueue, maxSize: int) → None¶ Sets queue maximum size
- Parameter
maxSize
: Specifies maximum number of messages in the queue
- Parameter
-
tryGet
(self: depthai.DataOutputQueue) → depthai.ADatatype¶ Try to retrieve message from queue. If no message available, return immediately 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.
DatatypeEnum
¶ Bases:
pybind11_builtins.pybind11_object
Members:
Buffer
ImgFrame
EncodedFrame
NNData
ImageManipConfig
CameraControl
ImgDetections
SpatialImgDetections
SystemInformation
SpatialLocationCalculatorConfig
SpatialLocationCalculatorData
EdgeDetectorConfig
AprilTagConfig
AprilTags
Tracklets
IMUData
StereoDepthConfig
FeatureTrackerConfig
TrackedFeatures
PointCloudConfig
PointCloudData
Attributes:
Methods:
__init__
(self, value)-
AprilTagConfig
= <DatatypeEnum.AprilTagConfig: 12>¶
-
AprilTags
= <DatatypeEnum.AprilTags: 13>¶
-
Buffer
= <DatatypeEnum.Buffer: 0>¶
-
CameraControl
= <DatatypeEnum.CameraControl: 5>¶
-
EdgeDetectorConfig
= <DatatypeEnum.EdgeDetectorConfig: 11>¶
-
EncodedFrame
= <DatatypeEnum.EncodedFrame: 2>¶
-
FeatureTrackerConfig
= <DatatypeEnum.FeatureTrackerConfig: 17>¶
-
IMUData
= <DatatypeEnum.IMUData: 15>¶
-
ImageManipConfig
= <DatatypeEnum.ImageManipConfig: 4>¶
-
ImgDetections
= <DatatypeEnum.ImgDetections: 6>¶
-
ImgFrame
= <DatatypeEnum.ImgFrame: 1>¶
-
NNData
= <DatatypeEnum.NNData: 3>¶
-
PointCloudConfig
= <DatatypeEnum.PointCloudConfig: 19>¶
-
PointCloudData
= <DatatypeEnum.PointCloudData: 20>¶
-
SpatialImgDetections
= <DatatypeEnum.SpatialImgDetections: 7>¶
-
SpatialLocationCalculatorConfig
= <DatatypeEnum.SpatialLocationCalculatorConfig: 9>¶
-
SpatialLocationCalculatorData
= <DatatypeEnum.SpatialLocationCalculatorData: 10>¶
-
StereoDepthConfig
= <DatatypeEnum.StereoDepthConfig: 16>¶
-
SystemInformation
= <DatatypeEnum.SystemInformation: 8>¶
-
TrackedFeatures
= <DatatypeEnum.TrackedFeatures: 21>¶
-
Tracklets
= <DatatypeEnum.Tracklets: 14>¶
-
__init__
(self: depthai.DatatypeEnum, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
DetectionNetworkProperties
¶ Bases:
depthai.NeuralNetworkProperties
Specify properties for DetectionNetwork
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
parser
¶
-
-
class
depthai.
DetectionNetworkType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
YOLO
MOBILENET
Attributes:
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.
DetectionParserOptions
¶ Bases:
pybind11_builtins.pybind11_object
Specifies how to parse output of detection networks
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__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.
DetectionParserProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for DetectionParser
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Options for parser
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
parser
¶ Options for parser
-
-
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:
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:
-
__init__
(self: depthai.Device.Config) → None¶
-
property
board
¶
-
property
logLevel
¶
-
property
nonExclusiveMode
¶
-
property
outputLogLevel
¶
-
property
version
¶
-
-
__init__
(*args, **kwargs)¶ Overloaded function.
__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
__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
__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
__init__(self: depthai.Device, pipeline: depthai.Pipeline, pathToCmd: Path) -> 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
__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
__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
__init__(self: depthai.Device, pipeline: depthai.Pipeline, devInfo: depthai.DeviceInfo, pathToCmd: Path) -> 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
__init__(self: depthai.Device, version: depthai.OpenVINO.Version = <Version.???: 7>) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
- Parameter
version
: OpenVINO version which the device will be booted with.
__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
__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
maxUsbSpeed
: Maximum allowed USB speed
__init__(self: depthai.Device, version: depthai.OpenVINO.Version, pathToCmd: Path) -> 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
__init__(self: depthai.Device, version: depthai.OpenVINO.Version, deviceInfo: 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
__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
__init__(self: depthai.Device, version: depthai.OpenVINO.Version, deviceDesc: depthai.DeviceInfo, pathToCmd: Path) -> 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
__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
__init__(self: depthai.Device, config: depthai.Device.Config, deviceInfo: depthai.DeviceInfo) -> None
Connects to device ‘devInfo’ with custom config.
- Parameter
config
: Device custom configuration to boot with
- Parameter
devInfo
: DeviceInfo which specifies which device to connect to
__init__(self: depthai.Device, deviceInfo: depthai.DeviceInfo) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
devInfo
: DeviceInfo which specifies which device to connect to
__init__(self: depthai.Device, deviceInfo: depthai.DeviceInfo, maxUsbSpeed: depthai.UsbSpeed) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
devInfo
: DeviceInfo which specifies which device to connect to
- Parameter
maxUsbSpeed
: Maximum allowed USB speed
__init__(self: depthai.Device, nameOrDeviceId: str) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
nameOrDeviceId
: Creates DeviceInfo with nameOrDeviceId to connect to
__init__(self: depthai.Device, nameOrDeviceId: str, maxUsbSpeed: depthai.UsbSpeed) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
nameOrDeviceId
: Creates DeviceInfo with nameOrDeviceId to connect to
- Parameter
maxUsbSpeed
: Maximum allowed USB speed
-
getInputQueue
(*args, **kwargs)¶ Overloaded function.
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
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.
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
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.
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
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
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.
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
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
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 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
-
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.
factoryResetCalibration
(self)Factory reset EEPROM data if factory backup is available.
flashCalibration
(self, calibrationDataHandler)Stores the Calibration and Device information to the Device EEPROM
flashCalibration2
(self, arg0)Stores the Calibration and Device information to the Device EEPROM
flashEepromClear
(self)Destructive action, deletes User area EEPROM contents Requires PROTECTED permissions
flashFactoryCalibration
(self, arg0)Stores the Calibration and Device information to the Device EEPROM in Factory area To perform this action, correct env variable must be set
flashFactoryEepromClear
(self)Destructive action, deletes Factory area EEPROM contents Requires FACTORY PROTECTED permissions
Returns all available devices
Returns information of all connected devices.
getAnyAvailableDevice
(*args, **kwargs)Overloaded function.
getAvailableStereoPairs
(self)Get stereo pairs taking into account the calibration and connected cameras.
getBootloaderVersion
(self)Gets Bootloader version if it was booted through Bootloader
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
Get cameras that are connected to the device with their features/properties
getConnectedCameras
(self)Get cameras that are connected to the device
getConnectedIMU
(self)Get connected IMU type
getConnectionInterfaces
(self)Get connection interfaces for device
getCrashDump
(self, clearCrashDump)Retrieves crash dump for debugging.
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
getDeviceName
(self)Get device name if available
getEmbeddedDeviceBinary
(*args, **kwargs)Overloaded function.
Get embedded IMU firmware version to which IMU can be upgraded
getFirstAvailableDevice
(skipInvalidDevices)Gets first available device.
Get current global accumulated profiling data
Get IMU firmware update status
getIMUFirmwareVersion
(self)Get connected IMU firmware version
getIrDrivers
(self)Retrieves detected IR laser/LED drivers.
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
getProductName
(self)Get product name if available
getProfilingData
(self)Get current accumulated profiling data
getStereoPairs
(self)Get stereo pairs based on the device type.
Gets current rate of system information logging (“info” severity) in Hz.
getUsbSpeed
(self)Retrieves USB connection speed
getXLinkChunkSize
(self)Gets current XLink chunk size.
hasCrashDump
(self)Retrieves whether the is crash dump stored on device or not.
isClosed
(self)Is the device already closed (or disconnected)
isEepromAvailable
(self)Check if EEPROM is available
isPipelineRunning
(self)Checks if devices pipeline is already running
readCalibration
(self)Fetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default
readCalibration2
(self)Fetches the EEPROM data from the device and loads it into CalibrationHandler object
readCalibrationOrDefault
(self)Fetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default
readCalibrationRaw
(self)Fetches the raw EEPROM data from User area
readFactoryCalibration
(self)Fetches the EEPROM data from Factory area and loads it into CalibrationHandler object
Fetches the EEPROM data from Factory area and loads it into CalibrationHandler object If no calibration is flashed, it returns default
Fetches the raw EEPROM data from Factory area
removeLogCallback
(self, callbackId)Removes a callback
setIrFloodLightBrightness
(self, mA, mask)Sets the brightness of the IR Flood Light.
setIrFloodLightIntensity
(self, intensity, mask)Sets the intensity of the IR Flood Light.
setIrLaserDotProjectorBrightness
(self, mA, mask)Sets the brightness of the IR Laser Dot Projector.
setIrLaserDotProjectorIntensity
(self, …)Sets the intensity of the IR Laser Dot Projector.
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).
setTimesync
(*args, **kwargs)Overloaded function.
setXLinkChunkSize
(self, sizeBytes)Sets the chunk size for splitting device-sent XLink packets.
startIMUFirmwareUpdate
(self, forceUpdate)Starts IMU firmware update asynchronously only if IMU node is not running.
startPipeline
(*args, **kwargs)Overloaded function.
-
__init__
(*args, **kwargs)¶ Overloaded function.
__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
__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
__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
__init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, pathToCmd: Path) -> 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
__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
__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
__init__(self: depthai.DeviceBase, pipeline: depthai.Pipeline, devInfo: depthai.DeviceInfo, pathToCmd: Path) -> 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
__init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version = <Version.???: 7>) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
- Parameter
version
: OpenVINO version which the device will be booted with.
__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
__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
maxUsbSpeed
: Maximum allowed USB speed
__init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, pathToCmd: Path) -> 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
__init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, deviceInfo: 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
__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
__init__(self: depthai.DeviceBase, version: depthai.OpenVINO.Version, deviceDesc: depthai.DeviceInfo, pathToCmd: Path) -> 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
__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
__init__(self: depthai.DeviceBase, config: depthai.Device.Config, deviceInfo: depthai.DeviceInfo) -> None
Connects to device ‘devInfo’ with custom config.
- Parameter
config
: Device custom configuration to boot with
- Parameter
devInfo
: DeviceInfo which specifies which device to connect to
__init__(self: depthai.DeviceBase, deviceInfo: depthai.DeviceInfo) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
devInfo
: DeviceInfo which specifies which device to connect to
__init__(self: depthai.DeviceBase, deviceInfo: depthai.DeviceInfo, maxUsbSpeed: depthai.UsbSpeed) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
devInfo
: DeviceInfo which specifies which device to connect to
- Parameter
maxUsbSpeed
: Maximum allowed USB speed
__init__(self: depthai.DeviceBase, nameOrDeviceId: str) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
nameOrDeviceId
: Creates DeviceInfo with nameOrDeviceId to connect to
__init__(self: depthai.DeviceBase, nameOrDeviceId: str, maxUsbSpeed: depthai.UsbSpeed) -> None
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
- Parameter
nameOrDeviceId
: Creates DeviceInfo with nameOrDeviceId to connect to
- Parameter
maxUsbSpeed
: Maximum allowed USB speed
-
addLogCallback
(self: depthai.DeviceBase, callback: Callable[[depthai.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
- Parameter
-
close
(self: depthai.DeviceBase) → None¶ Closes the connection to device. Better alternative is the usage of context manager: with depthai.Device(pipeline) as device:
-
factoryResetCalibration
(self: depthai.DeviceBase) → None¶ Factory reset EEPROM data if factory backup is available.
- Throws:
std::runtime_exception If factory reset was unsuccessful
-
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
- Parameter
-
flashCalibration2
(self: depthai.DeviceBase, arg0: depthai.CalibrationHandler) → None¶ Stores the Calibration and Device information to the Device EEPROM
- Throws:
std::runtime_exception if failed to flash the calibration
- Parameter
calibrationObj
: CalibrationHandler object which is loaded with calibration information.
-
flashEepromClear
(self: depthai.DeviceBase) → None¶ Destructive action, deletes User area EEPROM contents Requires PROTECTED permissions
- Throws:
std::runtime_exception if failed to flash the calibration
- Returns
True on successful flash, false on failure
-
flashFactoryCalibration
(self: depthai.DeviceBase, arg0: depthai.CalibrationHandler) → None¶ Stores the Calibration and Device information to the Device EEPROM in Factory area To perform this action, correct env variable must be set
- Throws:
std::runtime_exception if failed to flash the calibration
- Returns
True on successful flash, false on failure
-
flashFactoryEepromClear
(self: depthai.DeviceBase) → None¶ Destructive action, deletes Factory area EEPROM contents Requires FACTORY PROTECTED permissions
- Throws:
std::runtime_exception if failed to flash the calibration
- Returns
True on successful flash, false on failure
-
static
getAllAvailableDevices
() → List[depthai.DeviceInfo]¶ Returns all available devices
- Returns
Vector of available devices
-
static
getAllConnectedDevices
() → List[depthai.DeviceInfo]¶ Returns information of all connected devices. The devices could be both connectable as well as already connected to devices.
- Returns
Vector of connected device information
-
static
getAnyAvailableDevice
(*args, **kwargs)¶ Overloaded function.
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
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
-
getAvailableStereoPairs
(self: depthai.DeviceBase) → List[depthai.StereoPair]¶ Get stereo pairs taking into account the calibration and connected cameras.
@note This method will always return a subset of getStereoPairs.
- Returns
Vector of stereo pairs
-
getBootloaderVersion
(self: depthai.DeviceBase) → Optional[depthai.Version]¶ Gets Bootloader version if it was booted through Bootloader
- Returns
DeviceBootloader::Version if booted through Bootloader or none otherwise
-
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
-
getConnectedCameraFeatures
(self: depthai.DeviceBase) → List[depthai.CameraFeatures]¶ Get cameras that are connected to the device with their features/properties
- Returns
Vector of connected camera features
-
getConnectedCameras
(self: depthai.DeviceBase) → List[depthai.CameraBoardSocket]¶ Get cameras that are connected to the device
- Returns
Vector of connected cameras
-
getConnectedIMU
(self: depthai.DeviceBase) → str¶ Get connected IMU type
- Returns
IMU type
-
getConnectionInterfaces
(self: depthai.DeviceBase) → List[depthai.connectionInterface]¶ Get connection interfaces for device
- Returns
Vector of connection type
-
getCrashDump
(self: depthai.DeviceBase, clearCrashDump: bool = True) → depthai.CrashDump¶ Retrieves crash dump for debugging.
-
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
- Parameter
-
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
-
getDeviceName
(self: depthai.DeviceBase) → object¶ Get device name if available
- Returns
device name or empty string if not available
-
static
getEmbeddedDeviceBinary
(*args, **kwargs)¶ Overloaded function.
getEmbeddedDeviceBinary(usb2Mode: bool, version: depthai.OpenVINO.Version = <Version.???: 7>) -> 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
getEmbeddedDeviceBinary(config: depthai.Device.Config) -> List[int]
Gets device firmware binary for a specific configuration
- Parameter
config
: FW with applied configuration
- Returns
Firmware binary
-
getEmbeddedIMUFirmwareVersion
(self: depthai.DeviceBase) → depthai.Version¶ Get embedded IMU firmware version to which IMU can be upgraded
- Returns
Get embedded IMU firmware version to which IMU can be upgraded.
-
static
getFirstAvailableDevice
(skipInvalidDevices: bool = True) → 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
-
static
getGlobalProfilingData
() → depthai.ProfilingData¶ Get current global accumulated profiling data
- Returns
ProfilingData from all devices
-
getIMUFirmwareUpdateStatus
(self: depthai.DeviceBase) → Tuple[bool, float]¶ Get IMU firmware update status
- Returns
Whether IMU firmware update is done and last firmware update progress as percentage. return value true and 100 means that the update was successful return value true and other than 100 means that the update failed
-
getIMUFirmwareVersion
(self: depthai.DeviceBase) → depthai.Version¶ Get connected IMU firmware version
- Returns
IMU firmware version
-
getIrDrivers
(self: depthai.DeviceBase) → List[Tuple[str, int, int]]¶ Retrieves detected IR laser/LED drivers.
- Returns
driver name, I2C bus, I2C address. For OAK-D- Pro it should be [{“LM3644”, 2, 0x63}]
- Return type
Vector of tuples containing
-
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
-
getProductName
(self: depthai.DeviceBase) → object¶ Get product name if available
- Returns
product name or empty string if not available
-
getProfilingData
(self: depthai.DeviceBase) → depthai.ProfilingData¶ Get current accumulated profiling data
- Returns
ProfilingData from the specific device
-
getStereoPairs
(self: depthai.DeviceBase) → List[depthai.StereoPair]¶ Get stereo pairs based on the device type.
- Returns
Vector of stereo pairs
-
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
-
hasCrashDump
(self: depthai.DeviceBase) → bool¶ Retrieves whether the is crash dump stored on device or not.
-
isClosed
(self: depthai.DeviceBase) → bool¶ Is the device already closed (or disconnected)
Warning
This function is thread-unsafe and may return outdated incorrect values. It is only meant for use in simple single-threaded code. Well written code should handle exceptions when calling any DepthAI apis to handle hardware events and multithreaded use.
-
isEepromAvailable
(self: depthai.DeviceBase) → bool¶ Check if EEPROM is available
- Returns
True if EEPROM is present on board, false otherwise
-
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 If no calibration is flashed, it returns default
- Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM
-
readCalibration2
(self: depthai.DeviceBase) → depthai.CalibrationHandler¶ Fetches the EEPROM data from the device and loads it into CalibrationHandler object
- Throws:
std::runtime_exception if no calibration is flashed
- Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM
-
readCalibrationOrDefault
(self: depthai.DeviceBase) → depthai.CalibrationHandler¶ Fetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default
- Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM
-
readCalibrationRaw
(self: depthai.DeviceBase) → List[int]¶ Fetches the raw EEPROM data from User area
- Throws:
std::runtime_exception if any error occurred
- Returns
Binary dump of User area EEPROM data
-
readFactoryCalibration
(self: depthai.DeviceBase) → depthai.CalibrationHandler¶ Fetches the EEPROM data from Factory area and loads it into CalibrationHandler object
- Throws:
std::runtime_exception if no calibration is flashed
- Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM in Factory Area
-
readFactoryCalibrationOrDefault
(self: depthai.DeviceBase) → depthai.CalibrationHandler¶ Fetches the EEPROM data from Factory area and loads it into CalibrationHandler object If no calibration is flashed, it returns default
- Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM in Factory Area
-
readFactoryCalibrationRaw
(self: depthai.DeviceBase) → List[int]¶ Fetches the raw EEPROM data from Factory area
- Throws:
std::runtime_exception if any error occurred
- Returns
Binary dump of Factory area EEPROM data
-
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
- Parameter
-
setIrFloodLightBrightness
(self: depthai.DeviceBase, mA: float, mask: int = - 1) → bool¶ Sets the brightness of the IR Flood Light. Limits: up to 1500mA at 30% duty cycle. The duty cycle is controlled by the left camera STROBE, aligned to start of exposure. If the dot projector is also enabled, its lower duty cycle limits take precedence. The emitter is turned off by default
- Parameter
mA
: Current in mA that will determine brightness, 0 or negative to turn off
- Parameter
mask
: Optional mask to modify only Left (0x1) or Right (0x2) sides on OAK-D-Pro-W- DEV
- Returns
True on success, false if not found or other failure
- Parameter
-
setIrFloodLightIntensity
(self: depthai.DeviceBase, intensity: float, mask: int = - 1) → bool¶ Sets the intensity of the IR Flood Light. Limits: Intensity is directly normalized to 0 - 1500mA current. The duty cycle is 30% when exposure time is longer than 30% frame time. Otherwise, duty cycle is 100% of exposure time. The duty cycle is controlled by the left camera STROBE, aligned to start of exposure. The emitter is turned off by default
- Parameter
intensity
: Intensity on range 0 to 1, that will determine brightness, 0 or negative to turn off
- Parameter
mask
: Optional mask to modify only Left (0x1) or Right (0x2) sides on OAK-D-Pro-W- DEV
- Returns
True on success, false if not found or other failure
- Parameter
-
setIrLaserDotProjectorBrightness
(self: depthai.DeviceBase, mA: float, mask: int = - 1) → bool¶ Sets the brightness of the IR Laser Dot Projector. Limits: up to 765mA at 30% duty cycle, up to 1200mA at 6% duty cycle. The duty cycle is controlled by left camera STROBE, aligned to start of exposure. The emitter is turned off by default
- Parameter
mA
: Current in mA that will determine brightness, 0 or negative to turn off
- Parameter
mask
: Optional mask to modify only Left (0x1) or Right (0x2) sides on OAK-D-Pro-W- DEV
- Returns
True on success, false if not found or other failure
- Parameter
-
setIrLaserDotProjectorIntensity
(self: depthai.DeviceBase, intensity: float, mask: int = - 1) → bool¶ Sets the intensity of the IR Laser Dot Projector. Limits: up to 765mA at 30% frame time duty cycle when exposure time is longer than 30% frame time. Otherwise, duty cycle is 100% of exposure time, with current increased up to max 1200mA to make up for shorter duty cycle. The duty cycle is controlled by left camera STROBE, aligned to start of exposure. The emitter is turned off by default
- Parameter
intensity
: Intensity on range 0 to 1, that will determine brightness. 0 or negative to turn off
- Parameter
mask
: Optional mask to modify only Left (0x1) or Right (0x2) sides on OAK-D-Pro-W- DEV
- Returns
True on success, false if not found or other failure
- Parameter
-
setLogLevel
(self: depthai.DeviceBase, level: depthai.LogLevel) → None¶ Sets the devices logging severity level. This level affects which logs are transferred from device to host.
- Parameter
level
: Logging severity
- Parameter
-
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
- Parameter
-
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
- Parameter
-
setTimesync
(*args, **kwargs)¶ Overloaded function.
setTimesync(self: depthai.DeviceBase, arg0: datetime.timedelta, arg1: int, arg2: bool) -> None
Configures Timesync service on device. It keeps host and device clocks in sync First time timesync is started it waits until the initial sync is completed Afterwards the function changes the following parameters
- Parameter
period
: Interval between timesync runs
- Parameter
numSamples
: Number of timesync samples per run which are used to compute a better value. Set to zero to disable timesync
- Parameter
random
: If true partial timesync requests will be performed at random intervals, otherwise at fixed intervals
setTimesync(self: depthai.DeviceBase, enable: bool) -> None
Enables or disables Timesync service on device. It keeps host and device clocks in sync.
- Parameter
enable
: Enables or disables consistent timesyncing
-
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
- Parameter
-
startIMUFirmwareUpdate
(self: depthai.DeviceBase, forceUpdate: bool = False) → bool¶ Starts IMU firmware update asynchronously only if IMU node is not running. If current firmware version is the same as embedded firmware version then it’s no- op. Can be overridden by forceUpdate parameter. State of firmware update can be monitored using getIMUFirmwareUpdateStatus API.
- Parameter
forceUpdate
: Force firmware update or not. Will perform FW update regardless of current version and embedded firmware version.
- Returns
Returns whether firmware update can be started. Returns false if IMU node is started.
- Parameter
-
startPipeline
(*args, **kwargs)¶ Overloaded function.
startPipeline(self: depthai.DeviceBase) -> None
Starts the execution of the devices pipeline
- Returns
True if pipeline started, false otherwise
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:
Members:
Members:
Members:
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.
flashBootHeader
(self, memory, frequency, …)Flash optimized boot header
flashBootloader
(*args, **kwargs)Overloaded function.
flashClear
(self, memory)Clears flashed application on the device, by removing SBR boot structure Doesn’t remove fast boot header capability to still boot the application
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
flashCustom
(*args, **kwargs)Overloaded function.
flashDepthaiApplicationPackage
(*args, **kwargs)Overloaded function.
flashFastBootHeader
(self, memory, frequency, …)Flash fast boot header.
flashGpioModeBootHeader
(self, memory, mode)Flash boot header which boots same as equivalent GPIO mode would
flashUsbRecoveryBootHeader
(self, memory)Flash USB recovery boot header.
flashUserBootloader
(self, progressCallback, …)Flashes user bootloader to the current board.
Searches for connected devices in either UNBOOTED or BOOTLOADER states.
- returns
Embedded bootloader binary
- returns
Embedded bootloader version
Searches for connected devices in either UNBOOTED or BOOTLOADER states and returns first available.
getMemoryInfo
(self, arg0)Retrieves information about specified memory
getType
(self)- returns
Type of currently connected bootloader
getVersion
(self)- returns
Version of current running bootloader
- returns
True if allowed to flash bootloader
isEmbeddedVersion
(self)- returns
True when bootloader was booted using latest bootloader integrated in the
isUserBootloader
(self)Retrieves whether current bootloader is User Bootloader (B out of A/B configuration)
Checks whether User Bootloader is supported with current bootloader
readApplicationInfo
(self, memory)Reads information about flashed application in specified memory from device
readConfig
(self, memory, type)Reads configuration from bootloader
readConfigData
(self, memory, type)Reads configuration data from bootloader
readCustom
(*args, **kwargs)Overloaded function.
saveDepthaiApplicationPackage
(*args, **kwargs)Overloaded function.
-
class
ApplicationInfo
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.DeviceBootloader.ApplicationInfo) → None¶
-
property
applicationName
¶
-
property
firmwareVersion
¶
-
property
hasApplication
¶
-
-
class
Config
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)fromJson
(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)toJson
(self)Attributes:
-
__init__
(self: depthai.DeviceBootloader.Config) → None¶
-
property
appMem
¶
-
fromJson
(self: json) → depthai.DeviceBootloader.Config¶
-
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¶
-
setMacAddress
(self: depthai.DeviceBootloader.Config, arg0: str) → None¶
-
setNetworkTimeout
(self: depthai.DeviceBootloader.Config, arg0: datetime.timedelta) → None¶
-
setUsbMaxSpeed
(self: depthai.DeviceBootloader.Config, arg0: depthai.UsbSpeed) → None¶
-
setUsbTimeout
(self: depthai.DeviceBootloader.Config, arg0: datetime.timedelta) → None¶
-
toJson
(self: depthai.DeviceBootloader.Config) → json¶
-
property
usb
¶
-
-
class
Memory
¶ Bases:
pybind11_builtins.pybind11_object
Members:
AUTO
FLASH
EMMC
Attributes:
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
MemoryInfo
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.DeviceBootloader.MemoryInfo) → None¶
-
property
available
¶
-
property
info
¶
-
property
size
¶
-
-
class
NetworkConfig
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__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:
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:
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:
-
__init__
(self: depthai.DeviceBootloader.UsbConfig) → None¶
-
property
maxUsbSpeed
¶
-
property
pid
¶
-
property
timeoutMs
¶
-
property
vid
¶
-
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.DeviceBootloader, devInfo: depthai.DeviceInfo, allowFlashingBootloader: bool = False) -> None
Connects to device in bootloader of specified type. Throws if it wasn’t possible. This constructor will automatically boot into specified bootloader type if not already running
- Parameter
devInfo
: DeviceInfo of which to boot or connect to
- Parameter
type
: Type of bootloader to boot/connect to.
- Parameter
allowFlashingBootloader
: Set to true to allow flashing the devices bootloader. Defaults to false
__init__(self: depthai.DeviceBootloader, devInfo: depthai.DeviceInfo, pathToCmd: Path, allowFlashingBootloader: bool = False) -> None
Connects to or boots device in bootloader mode depending on devInfo state with a custom bootloader firmware.
- Parameter
devInfo
: DeviceInfo of which to boot or connect to
- Parameter
pathToBootloader
: Custom bootloader firmware to boot
- Parameter
allowFlashingBootloader
: Set to true to allow flashing the devices bootloader. Defaults to false
__init__(self: depthai.DeviceBootloader, nameOrDeviceId: str, allowFlashingBootloader: bool = False) -> None
Connects to device with specified name/device id
- Parameter
nameOrDeviceId
: Creates DeviceInfo with nameOrDeviceId to 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
- Parameter
-
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.
createDepthaiApplicationPackage(pipeline: depthai.Pipeline, pathToCmd: Path = ‘’, compress: bool = False, applicationName: str = ‘’, checkChecksum: 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
- Parameter
applicationName
: Optional name the application that is flashed
- Returns
Depthai application package
createDepthaiApplicationPackage(pipeline: depthai.Pipeline, compress: bool, applicationName: str = ‘’, checkChecksum: 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
compress
: Specifies if contents should be compressed
- Parameter
applicationName
: Name the application that is flashed
- Returns
Depthai application package
-
flash
(*args, **kwargs)¶ Overloaded function.
flash(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], pipeline: depthai.Pipeline, compress: bool = False, applicationName: str = ‘’, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, checkChecksum: 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
- Parameter
compress
: Compresses application to reduce needed memory size
- Parameter
applicationName
: Name the application that is flashed
flash(self: depthai.DeviceBootloader, pipeline: depthai.Pipeline, compress: bool = False, applicationName: str = ‘’, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>, checkChecksum: bool = False) -> Tuple[bool, str]
Flashes a given pipeline to the device.
- Parameter
pipeline
: Pipeline to flash to the board
- Parameter
compress
: Compresses application to reduce needed memory size
- Parameter
applicationName
: Optional name the application that is flashed
-
flashBootHeader
(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, frequency: int = - 1, location: int = - 1, dummyCycles: int = - 1, offset: int = - 1) → Tuple[bool, str]¶ Flash optimized boot header
- Parameter
memory
: Which memory to flasht the header to
- Parameter
frequency
: SPI specific parameter, frequency in MHz
- Parameter
location
: Target location the header should boot to. Default to location of bootloader
- Parameter
dummyCycles
: SPI specific parameter
- Parameter
offset
: Offset in memory to flash the header to. Defaults to offset of boot header
- Returns
status as std::tuple<bool, std::string>
- Parameter
-
flashBootloader
(*args, **kwargs)¶ Overloaded function.
flashBootloader(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], path: Path = ‘’) -> 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
flashBootloader(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, type: depthai.DeviceBootloader.Type, progressCallback: Callable[[float], None], path: Path = ‘’) -> 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
-
flashClear
(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>) → Tuple[bool, str]¶ Clears flashed application on the device, by removing SBR boot structure Doesn’t remove fast boot header capability to still boot the application
-
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
- Parameter
-
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
- Parameter
-
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
- Parameter
-
flashConfigFile
(self: depthai.DeviceBootloader, configData: Path, 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
- Parameter
-
flashCustom
(*args, **kwargs)¶ Overloaded function.
flashCustom(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, offset: int, data: List[int], progressCallback: Callable[[float], None] = None) -> Tuple[bool, str]
Flash arbitrary data at custom offset in specified memory
- Parameter
memory
: Memory to flash
- Parameter
offset
: Offset at which to flash the given data in bytes
- Parameter
progressCallback
: Callback that sends back a value between 0..1 which signifies current flashing progress
- Parameter
data
: Data to flash
flashCustom(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, offset: int, filename: str, progressCallback: Callable[[float], None] = None) -> Tuple[bool, str]
Flash arbitrary data at custom offset in specified memory
- Parameter
memory
: Memory to flash
- Parameter
offset
: Offset at which to flash the given data in bytes
- Parameter
progressCallback
: Callback that sends back a value between 0..1 which signifies current flashing progress
- Parameter
data
: Data to flash
-
flashDepthaiApplicationPackage
(*args, **kwargs)¶ Overloaded function.
flashDepthaiApplicationPackage(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], package: List[int], memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>) -> 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
flashDepthaiApplicationPackage(self: depthai.DeviceBootloader, package: List[int], memory: depthai.DeviceBootloader.Memory = <Memory.AUTO: -1>) -> 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
-
flashFastBootHeader
(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, frequency: int = - 1, location: int = - 1, dummyCycles: int = - 1, offset: int = - 1) → Tuple[bool, str]¶ Flash fast boot header. Application must already be present in flash, or location must be specified manually. Note - Can soft brick your device if firmware location changes.
- Parameter
memory
: Which memory to flash the header to
- Parameter
frequency
: SPI specific parameter, frequency in MHz
- Parameter
location
: Target location the header should boot to. Default to location of bootloader
- Parameter
dummyCycles
: SPI specific parameter
- Parameter
offset
: Offset in memory to flash the header to. Defaults to offset of boot header
- Returns
status as std::tuple<bool, std::string>
- Parameter
-
flashGpioModeBootHeader
(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, mode: int) → Tuple[bool, str]¶ Flash boot header which boots same as equivalent GPIO mode would
- Parameter
gpioMode
: GPIO mode equivalent
- Parameter
-
flashUsbRecoveryBootHeader
(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory) → Tuple[bool, str]¶ Flash USB recovery boot header. Switches to USB ROM Bootloader
- Parameter
memory
: Which memory to flash the header to
- Parameter
-
flashUserBootloader
(self: depthai.DeviceBootloader, progressCallback: Callable[[float], None], path: Path = '') → Tuple[bool, str]¶ Flashes user bootloader to the current board. Available for NETWORK bootloader type
- 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
- Parameter
-
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.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
-
getMemoryInfo
(self: depthai.DeviceBootloader, arg0: depthai.DeviceBootloader.Memory) → depthai.DeviceBootloader.MemoryInfo¶ Retrieves information about specified memory
- Parameter
memory
: Specifies which memory to query
- Parameter
-
getType
(self: depthai.DeviceBootloader) → depthai.DeviceBootloader.Type¶ - Returns
Type of currently connected bootloader
-
getVersion
(self: depthai.DeviceBootloader) → depthai.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.
-
isUserBootloader
(self: depthai.DeviceBootloader) → bool¶ Retrieves whether current bootloader is User Bootloader (B out of A/B configuration)
-
isUserBootloaderSupported
(self: depthai.DeviceBootloader) → bool¶ Checks whether User Bootloader is supported with current bootloader
- Returns
true of User Bootloader is supported, false otherwise
-
readApplicationInfo
(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory) → depthai.DeviceBootloader.ApplicationInfo¶ Reads information about flashed application in specified memory from device
- Parameter
memory
: Specifies which memory to query
- Parameter
-
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
- Parameter
-
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
-
readCustom
(*args, **kwargs)¶ Overloaded function.
readCustom(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, offset: int, size: int, filename: str, progressCallback: Callable[[float], None] = None) -> Tuple[bool, str]
Reads arbitrary data at custom offset in specified memory
- Parameter
memory
: Memory to read
- Parameter
offset
: Offset at which to read the specified bytes
- Parameter
size
: Number of bytes to read
- Parameter
data
: Data to read to. Must be at least ‘size’ number of bytes big
- Parameter
progressCallback
: Callback that sends back a value between 0..1 which signifies current reading progress
readCustom(self: depthai.DeviceBootloader, memory: depthai.DeviceBootloader.Memory, offset: int, size: int, progressCallback: Callable[[float], None] = None) -> Tuple[bool, str, List[int]]
Reads arbitrary data at custom offset in specified memory
- Parameter
memory
: Memory to read
- Parameter
offset
: Offset at which to read the specified bytes
- Parameter
size
: Number of bytes to read
- Parameter
data
: Data to read to. Must be at least ‘size’ number of bytes big
- Parameter
progressCallback
: Callback that sends back a value between 0..1 which signifies current reading progress
-
static
saveDepthaiApplicationPackage
(*args, **kwargs)¶ Overloaded function.
saveDepthaiApplicationPackage(path: Path, pipeline: depthai.Pipeline, pathToCmd: Path = ‘’, compress: bool = False, applicationName: str = ‘’, checkChecksum: 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
- Parameter
applicationName
: Optional name the application that is flashed
saveDepthaiApplicationPackage(path: Path, pipeline: depthai.Pipeline, compress: bool, applicationName: str = ‘’, checkChecksum: 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
compress
: Specifies if contents should be compressed
- Parameter
applicationName
: Optional name the application that is flashed
-
class
depthai.
DeviceDesc
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.DeviceDesc) → None¶
-
property
mxid
¶
-
property
name
¶
-
property
platform
¶
-
property
protocol
¶
-
property
state
¶
-
property
status
¶
-
-
class
depthai.
DeviceInfo
¶ Bases:
pybind11_builtins.pybind11_object
Describes a connected device
Methods:
__init__
(*args, **kwargs)Overloaded function.
getMxId
(self)getXLinkDeviceDesc
(self)Attributes:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.DeviceInfo) -> None
__init__(self: depthai.DeviceInfo, name: str, mxid: str, state: depthai.XLinkDeviceState, protocol: depthai.XLinkProtocol, platform: depthai.XLinkPlatform, status: depthai.XLinkError_t) -> None
__init__(self: depthai.DeviceInfo, mxidOrName: str) -> None
Creates a DeviceInfo by checking whether supplied parameter is a MXID or IP/USB name
- Parameter
mxidOrName
: Either MXID, IP Address or USB port name
__init__(self: depthai.DeviceInfo, arg0: depthai.DeviceDesc) -> None
-
property
desc
¶
-
getMxId
(self: depthai.DeviceInfo) → str¶
-
getXLinkDeviceDesc
(self: depthai.DeviceInfo) → depthai.DeviceDesc¶
-
property
mxid
¶
-
property
name
¶
-
property
platform
¶
-
property
protocol
¶
-
property
state
¶
-
property
status
¶
-
-
class
depthai.
EdgeDetectorConfig
¶ Bases:
depthai.Buffer
EdgeDetectorConfig message. Carries sobel edge filter config.
Methods:
__init__
(self)get
(self)Retrieve configuration data for EdgeDetector.
getConfigData
(self)Retrieve configuration data for EdgeDetector
set
(self, config)Set explicit configuration.
setSobelFilterKernels
(self, …)Set sobel filter horizontal and vertical 3x3 kernels
-
__init__
(self: depthai.EdgeDetectorConfig) → None¶
-
get
(self: depthai.EdgeDetectorConfig) → depthai.RawEdgeDetectorConfig¶ Retrieve configuration data for EdgeDetector.
- Returns
config for EdgeDetector
-
getConfigData
(self: depthai.EdgeDetectorConfig) → depthai.EdgeDetectorConfigData¶ Retrieve configuration data for EdgeDetector
- Returns
sobel filter horizontal and vertical 3x3 kernels
- Return type
-
set
(self: depthai.EdgeDetectorConfig, config: depthai.RawEdgeDetectorConfig) → depthai.EdgeDetectorConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
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 gradient computation in 3x3 Sobel filter
- Parameter
verticalKernel
: Used for vertical gradient computation in 3x3 Sobel filter
- Parameter
-
-
class
depthai.
EdgeDetectorConfigData
¶ Bases:
pybind11_builtins.pybind11_object
EdgeDetectorConfigData configuration data structure
Methods:
__init__
(self)Attributes:
Used for horizontal gradient computation in 3x3 Sobel filter Format - 3x3 matrix, 2nd column must be 0 Default - +1 0 -1; +2 0 -2; +1 0 -1
Used for vertical gradient computation in 3x3 Sobel filter Format - 3x3 matrix, 2nd row must be 0 Default - +1 +2 +1; 0 0 0; -1 -2 -1
-
__init__
(self: depthai.EdgeDetectorConfigData) → None¶
-
property
sobelFilterHorizontalKernel
¶ Used for horizontal gradient computation in 3x3 Sobel filter Format - 3x3 matrix, 2nd column must be 0 Default - +1 0 -1; +2 0 -2; +1 0 -1
-
property
sobelFilterVerticalKernel
¶ Used for vertical gradient computation in 3x3 Sobel filter Format - 3x3 matrix, 2nd row must be 0 Default - +1 +2 +1; 0 0 0; -1 -2 -1
-
-
class
depthai.
EdgeDetectorProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for EdgeDetector
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Initial edge detector config
Num frames in output pool
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
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:
-
__init__
(self: depthai.EepromData) → None¶
-
property
batchName
¶
-
property
batchTime
¶
-
property
boardConf
¶
-
property
boardCustom
¶
-
property
boardName
¶
-
property
boardOptions
¶
-
property
boardRev
¶
-
property
cameraData
¶
-
property
deviceName
¶
-
property
hardwareConf
¶
-
property
housingExtrinsics
¶
-
property
imuExtrinsics
¶
-
property
miscellaneousData
¶
-
property
productName
¶
-
property
stereoEnableDistortionCorrection
¶
-
property
stereoRectificationData
¶
-
property
stereoUseSpecTranslation
¶
-
property
version
¶
-
property
verticalCameraSocket
¶
-
-
exception
depthai.
EepromError
¶ Bases:
RuntimeError
-
class
depthai.
EncodedFrame
¶ Bases:
depthai.Buffer
Classes:
Members:
Members:
Methods:
__init__
(self)getBitrate
(self)Retrieves the encoding bitrate
getColorTemperature
(self)Retrieves white-balance color temperature of the light source, in kelvins
getExposureTime
(self)Retrieves exposure time
getFrameType
(self)Retrieves frame type (H26x only)
getInstanceNum
(self)Retrieves instance number
getLensPosition
(self)Retrieves lens position, range 0..255.
getLensPositionRaw
(self)Retrieves lens position, range 0.0f..1.0f.
getLossless
(self)Returns true if encoding is lossless (JPEG only)
getProfile
(self)Retrieves the encoding profile (JPEG, AVC or HEVC)
getQuality
(self)Retrieves the encoding quality
getSensitivity
(self)Retrieves sensitivity, as an ISO value
getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setBitrate
(self, arg0)Retrieves the encoding bitrate
setFrameType
(self, arg0)Retrieves frame type (H26x only)
setLossless
(self, arg0)Returns true if encoding is lossless (JPEG only)
setProfile
(self, arg0)Retrieves the encoding profile (JPEG, AVC or HEVC)
setQuality
(self, arg0)Retrieves the encoding quality
setSequenceNum
(self, arg0)Specifies sequence number
setTimestamp
(self, arg0)Retrieves image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
-
class
FrameType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
I
P
B
Unknown
Attributes:
Methods:
__init__
(self, value)-
B
= <FrameType.B: 2>¶
-
I
= <FrameType.I: 0>¶
-
P
= <FrameType.P: 1>¶
-
Unknown
= <FrameType.Unknown: 3>¶
-
__init__
(self: depthai.RawEncodedFrame.FrameType, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
Profile
¶ Bases:
pybind11_builtins.pybind11_object
Members:
JPEG
AVC
HEVC
Attributes:
Methods:
__init__
(self, value)-
AVC
= <Profile.AVC: 1>¶
-
HEVC
= <Profile.HEVC: 2>¶
-
JPEG
= <Profile.JPEG: 0>¶
-
__init__
(self: depthai.RawEncodedFrame.Profile, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.EncodedFrame) → None¶
-
getBitrate
(self: depthai.EncodedFrame) → int¶ Retrieves the encoding bitrate
-
getColorTemperature
(self: depthai.EncodedFrame) → int¶ Retrieves white-balance color temperature of the light source, in kelvins
-
getExposureTime
(self: depthai.EncodedFrame) → datetime.timedelta¶ Retrieves exposure time
-
getFrameType
(self: depthai.EncodedFrame) → depthai.RawEncodedFrame.FrameType¶ Retrieves frame type (H26x only)
-
getInstanceNum
(self: depthai.EncodedFrame) → int¶ Retrieves instance number
-
getLensPosition
(self: depthai.EncodedFrame) → int¶ Retrieves lens position, range 0..255. Returns -1 if not available
-
getLensPositionRaw
(self: depthai.EncodedFrame) → float¶ Retrieves lens position, range 0.0f..1.0f. Returns -1 if not available
-
getLossless
(self: depthai.EncodedFrame) → bool¶ Returns true if encoding is lossless (JPEG only)
-
getProfile
(self: depthai.EncodedFrame) → depthai.RawEncodedFrame.Profile¶ Retrieves the encoding profile (JPEG, AVC or HEVC)
-
getQuality
(self: depthai.EncodedFrame) → int¶ Retrieves the encoding quality
-
getSensitivity
(self: depthai.EncodedFrame) → int¶ Retrieves sensitivity, as an ISO value
-
getSequenceNum
(self: depthai.EncodedFrame) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.EncodedFrame) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.EncodedFrame) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setBitrate
(self: depthai.EncodedFrame, arg0: int) → depthai.EncodedFrame¶ Retrieves the encoding bitrate
-
setFrameType
(self: depthai.EncodedFrame, arg0: depthai.RawEncodedFrame.FrameType) → depthai.EncodedFrame¶ Retrieves frame type (H26x only)
-
setLossless
(self: depthai.EncodedFrame, arg0: bool) → depthai.EncodedFrame¶ Returns true if encoding is lossless (JPEG only)
-
setProfile
(self: depthai.EncodedFrame, arg0: depthai.RawEncodedFrame.Profile) → depthai.EncodedFrame¶ Retrieves the encoding profile (JPEG, AVC or HEVC)
-
setQuality
(self: depthai.EncodedFrame, arg0: int) → depthai.EncodedFrame¶ Retrieves the encoding quality
-
setSequenceNum
(self: depthai.EncodedFrame, arg0: int) → depthai.EncodedFrame¶ Specifies sequence number
- Parameter
seq
: Sequence number
- Parameter
-
setTimestamp
(self: depthai.EncodedFrame, arg0: datetime.timedelta) → depthai.EncodedFrame¶ Retrieves image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.EncodedFrame, arg0: datetime.timedelta) → depthai.EncodedFrame¶ Sets image timestamp related to dai::Clock::now()
-
class
-
class
depthai.
Extrinsics
¶ Bases:
pybind11_builtins.pybind11_object
Extrinsics structure
Methods:
__init__
(self)Attributes:
-
__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:
Corner detector configuration structure.
FeatureMaintainer configuration structure.
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:
Threshold settings structure for corner detector.
Members:
Methods:
__init__
(self)Attributes:
Ensures distributed feature detection across the image.
Enable 3x3 Sobel operator to smoothen the image whose gradient is to be computed.
Enable sorting detected features based on their score or not.
Hard limit for the maximum number of features that can be detected.
Target number of features to detect.
Threshold settings.
Corner detector algorithm type.
-
class
Thresholds
¶ Bases:
pybind11_builtins.pybind11_object
Threshold settings structure for corner detector.
Methods:
__init__
(self)Attributes:
When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.
When detected number of features doesn’t exceed the maximum in a cell, threshold is increased by multiplying its value with this factor.
Minimum strength of a feature which will be detected.
Maximum limit for threshold.
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:
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
-
class
FeatureMaintainer
¶ Bases:
pybind11_builtins.pybind11_object
FeatureMaintainer configuration structure.
Methods:
__init__
(self)Attributes:
Enable feature maintaining or not.
Optical flow measures the tracking error for every feature.
Used to filter out detected feature points that are too close.
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 euclidean 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:
Optical flow configuration structure.
Members:
Methods:
__init__
(self)Attributes:
Enable motion estimation or not.
Optical flow configuration.
Motion estimator algorithm type.
-
class
OpticalFlow
¶ Bases:
pybind11_builtins.pybind11_object
Optical flow configuration structure.
Methods:
__init__
(self)Attributes:
Feature tracking termination criteria.
Feature tracking termination criteria.
Number of pyramid levels, only for optical flow.
Image patch height used to track features.
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:
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.
-
class
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.FeatureTrackerConfig) -> None
__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) → depthai.FeatureTrackerConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setCornerDetector
(*args, **kwargs)¶ Overloaded function.
setCornerDetector(self: depthai.FeatureTrackerConfig, cornerDetector: depthai.RawFeatureTrackerConfig.CornerDetector.Type) -> depthai.FeatureTrackerConfig
Set corner detector algorithm type.
- Parameter
cornerDetector
: Corner detector type, HARRIS or SHI_THOMASI
setCornerDetector(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.CornerDetector) -> depthai.FeatureTrackerConfig
Set corner detector full configuration.
- Parameter
config
: Corner detector configuration
-
setFeatureMaintainer
(*args, **kwargs)¶ Overloaded function.
setFeatureMaintainer(self: depthai.FeatureTrackerConfig, enable: bool) -> depthai.FeatureTrackerConfig
Enable or disable feature maintainer.
Parameter
enable
:setFeatureMaintainer(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.FeatureMaintainer) -> depthai.FeatureTrackerConfig
Set feature maintainer full configuration.
- Parameter
config
: feature maintainer configuration
-
setHwMotionEstimation
(self: depthai.FeatureTrackerConfig) → depthai.FeatureTrackerConfig¶ 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.
setMotionEstimator(self: depthai.FeatureTrackerConfig, enable: bool) -> depthai.FeatureTrackerConfig
Enable or disable motion estimator.
Parameter
enable
:setMotionEstimator(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.MotionEstimator) -> depthai.FeatureTrackerConfig
Set motion estimator full configuration.
- Parameter
config
: Motion estimator configuration
-
setNumTargetFeatures
(self: depthai.FeatureTrackerConfig, numTargetFeatures: int) → depthai.FeatureTrackerConfig¶ Set number of target features to detect.
- Parameter
numTargetFeatures
: Number of features
- Parameter
-
setOpticalFlow
(*args, **kwargs)¶ Overloaded function.
setOpticalFlow(self: depthai.FeatureTrackerConfig) -> depthai.FeatureTrackerConfig
Set optical flow as motion estimation algorithm type.
setOpticalFlow(self: depthai.FeatureTrackerConfig, config: depthai.RawFeatureTrackerConfig.MotionEstimator.OpticalFlow) -> depthai.FeatureTrackerConfig
Set optical flow full configuration.
- Parameter
config
: Optical flow configuration
-
class
-
class
depthai.
FeatureTrackerProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for FeatureTracker
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Initial feature tracker config
Number of memory slices reserved for feature tracking.
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
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.
FrameEvent
¶ Bases:
pybind11_builtins.pybind11_object
Members:
NONE
READOUT_START
READOUT_END
Attributes:
Methods:
__init__
(self, value)-
NONE
= <FrameEvent.NONE: 0>¶
-
READOUT_END
= <FrameEvent.READOUT_END: 2>¶
-
READOUT_START
= <FrameEvent.READOUT_START: 1>¶
-
__init__
(self: depthai.FrameEvent, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
GlobalProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties which apply for whole pipeline
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Camera tuning blob size in bytes
Uri which points to camera tuning blob
SIPP (Signal Image Processing Pipeline) internal memory pool.
SIPP (Signal Image Processing Pipeline) internal DMA memory pool.
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
sippBufferSize
¶ SIPP (Signal Image Processing Pipeline) internal memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. By default memory is allocated in high speed CMX memory. Setting to 0 will allocate in DDR 256 kilobytes. Units are bytes.
-
property
sippDmaBufferSize
¶ SIPP (Signal Image Processing Pipeline) internal DMA memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. Memory is allocated in high speed CMX memory Units are bytes.
-
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:
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:
-
__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:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
batchReportThreshold
¶
-
property
enableFirmwareUpdate
¶
-
property
imuSensors
¶
-
property
maxBatchReports
¶
-
-
class
depthai.
IMUReport
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Members:
Methods:
__init__
(self)getSequenceNum
(self)Retrieves IMU report sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
Attributes:
-
class
Accuracy
¶ Bases:
pybind11_builtins.pybind11_object
Members:
UNRELIABLE
LOW
MEDIUM
HIGH
Attributes:
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
¶
-
getSequenceNum
(self: depthai.IMUReport) → int¶ Retrieves IMU report sequence number
-
getTimestamp
(self: depthai.IMUReport) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.IMUReport) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
property
sequence
¶
-
property
timestamp
¶
-
property
tsDevice
¶
-
class
-
class
depthai.
IMUReportAccelerometer
¶ Bases:
depthai.IMUReport
Accelerometer
Units are [m/s^2]
Methods:
__init__
(self)Attributes:
-
__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:
-
__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:
-
__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:
-
__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:
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:
-
__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)get
(self)Retrieve configuration data for ImageManip.
getColormap
(self)- returns
specified colormap
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
getInterpolation
(self)Retrieve which interpolation method to use
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
set
(self, config)Set explicit configuration.
setCenterCrop
(self, ratio, whRatio)Specifies a centered crop.
setColormap
(*args, **kwargs)Overloaded function.
setCropRect
(*args, **kwargs)Overloaded function.
setCropRotatedRect
(self, rr, normalizedCoords)Specifies crop with rotated rectangle.
setFrameType
(self, type)Specify output frame type.
setHorizontalFlip
(self, flip)Specify horizontal flip
setInterpolation
(self, interpolation)Specify which interpolation method to use
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.
setVerticalFlip
(self, flip)Specify vertical flip
setWarpBorderFillColor
(self, red, green, blue)Specifies fill color for border pixels.
Specifies that warp replicates border pixels
setWarpTransformFourPoints
(self, pt, …)Specifies warp by supplying 4 points in either absolute or normalized coordinates
setWarpTransformMatrix3x3
(self, mat)Specifies warp with a 3x3 matrix
-
__init__
(self: depthai.ImageManipConfig) → None¶
-
get
(self: depthai.ImageManipConfig) → depthai.RawImageManipConfig¶ Retrieve configuration data for ImageManip.
- Returns
config for ImageManip
-
getColormap
(self: depthai.ImageManipConfig) → depthai.Colormap¶ - Returns
specified colormap
-
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
-
getInterpolation
(self: depthai.ImageManipConfig) → depthai.Interpolation¶ Retrieve which interpolation method to use
-
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
-
set
(self: depthai.ImageManipConfig, config: depthai.RawImageManipConfig) → depthai.ImageManipConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setCenterCrop
(self: depthai.ImageManipConfig, ratio: float, whRatio: float = 1.0) → depthai.ImageManipConfig¶ 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, …
- Parameter
-
setColormap
(*args, **kwargs)¶ Overloaded function.
setColormap(self: depthai.ImageManipConfig, colormap: depthai.Colormap, min: int, max: int) -> depthai.ImageManipConfig
Specify gray to color conversion map
- Parameter
colormap
: map from Colormap enum or Colormap::NONE to disable
setColormap(self: depthai.ImageManipConfig, colormap: depthai.Colormap, max: int = 255) -> depthai.ImageManipConfig
Specify gray to color conversion map
- Parameter
colormap
: map from Colormap enum or Colormap::NONE to disable
setColormap(self: depthai.ImageManipConfig, colormap: depthai.Colormap, max: float = 255.0) -> depthai.ImageManipConfig
Specify gray to color conversion map
- Parameter
colormap
: map from Colormap enum or Colormap::NONE to disable
-
setCropRect
(*args, **kwargs)¶ Overloaded function.
setCropRect(self: depthai.ImageManipConfig, xmin: float, ymin: float, xmax: float, ymax: float) -> depthai.ImageManipConfig
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
setCropRect(self: depthai.ImageManipConfig, coordinates: Tuple[float, float, float, float]) -> depthai.ImageManipConfig
Specifies crop with rectangle with normalized values (0..1)
- Parameter
coordinates
: Coordinate of rectangle
-
setCropRotatedRect
(self: depthai.ImageManipConfig, rr: depthai.RotatedRect, normalizedCoords: bool = True) → depthai.ImageManipConfig¶ 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
- Parameter
-
setFrameType
(self: depthai.ImageManipConfig, type: depthai.RawImgFrame.Type) → depthai.ImageManipConfig¶ Specify output frame type.
- Parameter
name
: Frame type
- Parameter
-
setHorizontalFlip
(self: depthai.ImageManipConfig, flip: bool) → depthai.ImageManipConfig¶ Specify horizontal flip
- Parameter
flip
: True to enable flip, false otherwise
- Parameter
-
setInterpolation
(self: depthai.ImageManipConfig, interpolation: depthai.Interpolation) → depthai.ImageManipConfig¶ Specify which interpolation method to use
- Parameter
interpolation
: type of interpolation
- Parameter
-
setKeepAspectRatio
(self: depthai.ImageManipConfig, keep: bool) → depthai.ImageManipConfig¶ Specifies to whether to keep aspect ratio or not
-
setResize
(*args, **kwargs)¶ Overloaded function.
setResize(self: depthai.ImageManipConfig, w: int, h: int) -> depthai.ImageManipConfig
Specifies output image size. After crop stage the image will be stretched to fit.
- Parameter
w
: Width in pixels
- Parameter
h
: Height in pixels
setResize(self: depthai.ImageManipConfig, size: Tuple[int, int]) -> depthai.ImageManipConfig
Specifies output image size. After crop stage the image will be stretched to fit.
- Parameter
size
: Size in pixels
-
setResizeThumbnail
(*args, **kwargs)¶ Overloaded function.
setResizeThumbnail(self: depthai.ImageManipConfig, w: int, h: int, bgRed: int = 0, bgGreen: int = 0, bgBlue: int = 0) -> depthai.ImageManipConfig
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
setResizeThumbnail(self: depthai.ImageManipConfig, size: Tuple[int, int], bgRed: int = 0, bgGreen: int = 0, bgBlue: int = 0) -> depthai.ImageManipConfig
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) → depthai.ImageManipConfig¶ 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
- Parameter
-
setRotationDegrees
(self: depthai.ImageManipConfig, deg: float) → depthai.ImageManipConfig¶ Specifies clockwise rotation in degrees
- Parameter
deg
: Rotation in degrees
- Parameter
-
setRotationRadians
(self: depthai.ImageManipConfig, rad: float) → depthai.ImageManipConfig¶ Specifies clockwise rotation in radians
- Parameter
rad
: Rotation in radians
- Parameter
-
setSkipCurrentImage
(self: depthai.ImageManipConfig, skip: bool) → depthai.ImageManipConfig¶ Instructs ImageManip to skip current image and wait for next in queue.
- Parameter
skip
: True to skip current image, false otherwise
- Parameter
-
setVerticalFlip
(self: depthai.ImageManipConfig, flip: bool) → None¶ Specify vertical flip
- Parameter
flip
: True to enable vertical flip, false otherwise
- Parameter
-
setWarpBorderFillColor
(self: depthai.ImageManipConfig, red: int, green: int, blue: int) → depthai.ImageManipConfig¶ 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) → depthai.ImageManipConfig¶ Specifies that warp replicates border pixels
-
setWarpTransformFourPoints
(self: depthai.ImageManipConfig, pt: List[depthai.Point2f], normalizedCoords: bool) → depthai.ImageManipConfig¶ Specifies warp by supplying 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
- Parameter
-
setWarpTransformMatrix3x3
(self: depthai.ImageManipConfig, mat: List[float]) → depthai.ImageManipConfig¶ Specifies warp with a 3x3 matrix
- Parameter
mat
: 3x3 matrix
- Parameter
-
class
depthai.
ImgDetection
¶ Bases:
pybind11_builtins.pybind11_object
ImgDetection structure
Methods:
__init__
(self)Attributes:
-
__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
getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
Attributes:
Detections
-
__init__
(self: depthai.ImgDetections) → None¶ Construct ImgDetections message
-
property
detections
¶ Detections
-
getSequenceNum
(self: depthai.ImgDetections) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.ImgDetections) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.ImgDetections) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setSequenceNum
(self: depthai.ImgDetections, arg0: int) → depthai.ImgDetections¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.ImgDetections, arg0: datetime.timedelta) → depthai.ImgDetections¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.ImgDetections, arg0: datetime.timedelta) → depthai.ImgDetections¶ Sets image timestamp related to dai::Clock::now()
-
-
class
depthai.
ImgFrame
¶ Bases:
depthai.Buffer
ImgFrame message. Carries image data and metadata.
Classes:
Members:
Methods:
__init__
(self)getCategory
(self)Retrieves image category
getColorTemperature
(self)Retrieves white-balance color temperature of the light source, in kelvins
getCvFrame
(self)Returns BGR or grayscale frame compatible with use in other opencv functions
getExposureTime
(self)Retrieves exposure time
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
getLensPosition
(self)Retrieves lens position, range 0..255.
getLensPositionRaw
(self)Retrieves lens position, range 0.0f..1.0f.
getSensitivity
(self)Retrieves sensitivity, as an ISO value
getSequenceNum
(self)Retrieves sequence number
getTimestamp
(*args, **kwargs)Overloaded function.
getTimestampDevice
(*args, **kwargs)Overloaded function.
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)Retrieves image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
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:
-
__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:
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
-
getColorTemperature
(self: depthai.ImgFrame) → int¶ Retrieves white-balance color temperature of the light source, in kelvins
-
getCvFrame
(self: object) → object¶ Returns BGR or grayscale frame compatible with use in other opencv functions
-
getExposureTime
(self: depthai.ImgFrame) → datetime.timedelta¶ Retrieves exposure time
-
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
-
getLensPosition
(self: depthai.ImgFrame) → int¶ Retrieves lens position, range 0..255. Returns -1 if not available
-
getLensPositionRaw
(self: depthai.ImgFrame) → float¶ Retrieves lens position, range 0.0f..1.0f. Returns -1 if not available
-
getSensitivity
(self: depthai.ImgFrame) → int¶ Retrieves sensitivity, as an ISO value
-
getSequenceNum
(self: depthai.ImgFrame) → int¶ Retrieves sequence number
-
getTimestamp
(*args, **kwargs)¶ Overloaded function.
getTimestamp(self: depthai.ImgFrame) -> datetime.timedelta
Retrieves timestamp related to dai::Clock::now()
getTimestamp(self: depthai.ImgFrame, offset: depthai.CameraExposureOffset) -> datetime.timedelta
Retrieves image timestamp (at the specified offset of exposure) related to dai::Clock::now()
-
getTimestampDevice
(*args, **kwargs)¶ Overloaded function.
getTimestampDevice(self: depthai.ImgFrame) -> datetime.timedelta
Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
getTimestampDevice(self: depthai.ImgFrame, offset: depthai.CameraExposureOffset) -> datetime.timedelta
Retrieves image timestamp (at the specified offset of exposure) directly captured from device’s monotonic clock, not synchronized to host time. Used when monotonicity is required.
-
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) → depthai.ImgFrame¶ - Parameter
category
: Image category
- Parameter
-
setFrame
(self: depthai.ImgFrame, array: numpy.ndarray) → None¶ Copies array bytes to ImgFrame buffer
-
setHeight
(self: depthai.ImgFrame, height: int) → depthai.ImgFrame¶ Specifies frame height
- Parameter
height
: frame height
- Parameter
-
setInstanceNum
(self: depthai.ImgFrame, instance: int) → depthai.ImgFrame¶ Instance number relates to the origin of the frame (which camera)
- Parameter
instance
: Instance number
- Parameter
-
setSequenceNum
(self: depthai.ImgFrame, seq: int) → depthai.ImgFrame¶ Specifies sequence number
- Parameter
seq
: Sequence number
- Parameter
-
setSize
(*args, **kwargs)¶ Overloaded function.
setSize(self: depthai.ImgFrame, width: int, height: int) -> depthai.ImgFrame
Specifies frame size
- Parameter
height
: frame height
- Parameter
width
: frame width
setSize(self: depthai.ImgFrame, sizer: Tuple[int, int]) -> depthai.ImgFrame
Specifies frame size
- Parameter
size
: frame size
-
setTimestamp
(self: depthai.ImgFrame, timestamp: datetime.timedelta) → depthai.ImgFrame¶ Retrieves image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.ImgFrame, arg0: datetime.timedelta) → depthai.ImgFrame¶ Sets image timestamp related to dai::Clock::now()
-
setType
(self: depthai.ImgFrame, type: depthai.RawImgFrame.Type) → depthai.ImgFrame¶ Specifies frame type, RGB, BGR, …
- Parameter
type
: Type of image
- Parameter
-
setWidth
(self: depthai.ImgFrame, width: int) → depthai.ImgFrame¶ Specifies frame width
- Parameter
width
: frame width
- Parameter
-
class
-
class
depthai.
Interpolation
¶ Bases:
pybind11_builtins.pybind11_object
Interpolation type
Members:
BILINEAR
BICUBIC
NEAREST_NEIGHBOR
BYPASS
DEFAULT
DEFAULT_DISPARITY_DEPTH
Attributes:
Methods:
__init__
(self, value)-
BICUBIC
= <Interpolation.BICUBIC: 1>¶
-
BILINEAR
= <Interpolation.BILINEAR: 0>¶
-
BYPASS
= <Interpolation.NEAREST_NEIGHBOR: 2>¶
-
DEFAULT
= <Interpolation.BICUBIC: 1>¶
-
DEFAULT_DISPARITY_DEPTH
= <Interpolation.NEAREST_NEIGHBOR: 2>¶
-
NEAREST_NEIGHBOR
= <Interpolation.NEAREST_NEIGHBOR: 2>¶
-
__init__
(self: depthai.Interpolation, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
LogLevel
¶ Bases:
pybind11_builtins.pybind11_object
Members:
TRACE
DEBUG
INFO
WARN
ERR
CRITICAL
OFF
Attributes:
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.
LogMessage
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
colorRangeEnd
¶
-
property
colorRangeStart
¶
-
property
level
¶
-
property
nodeIdName
¶
-
property
payload
¶
-
property
time
¶
-
-
class
depthai.
MedianFilter
¶ Bases:
pybind11_builtins.pybind11_object
Median filter config
Members:
MEDIAN_OFF
KERNEL_3x3
KERNEL_5x5
KERNEL_7x7
Attributes:
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:
-
__init__
(self: depthai.MemoryInfo) → None¶
-
property
remaining
¶
-
property
total
¶
-
property
used
¶
-
-
class
depthai.
MessageDemuxProperties
¶ Bases:
pybind11_builtins.pybind11_object
MessageDemux does not have any properties to set
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
depthai.
MessageGroup
¶ Bases:
depthai.Buffer
MessageGroup message. Carries multiple messages in one.
Methods:
__init__
(self)getIntervalNs
(self)Retrieves interval between the first and the last message in the group.
getMessageNames
(self)Gets the names of messages in the group
getNumMessages
(self)getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
isSynced
(self, arg0)True if all messages in the group are in the interval
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
-
__init__
(self: depthai.MessageGroup) → None¶
-
getIntervalNs
(self: depthai.MessageGroup) → int¶ Retrieves interval between the first and the last message in the group.
-
getMessageNames
(self: depthai.MessageGroup) → List[str]¶ Gets the names of messages in the group
-
getNumMessages
(self: depthai.MessageGroup) → int¶
-
getSequenceNum
(self: depthai.MessageGroup) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.MessageGroup) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.MessageGroup) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
isSynced
(self: depthai.MessageGroup, arg0: int) → bool¶ True if all messages in the group are in the interval
- Parameter
thresholdNs
: Maximal interval between messages
- Parameter
-
setSequenceNum
(self: depthai.MessageGroup, arg0: int) → depthai.MessageGroup¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.MessageGroup, arg0: datetime.timedelta) → depthai.MessageGroup¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.MessageGroup, arg0: datetime.timedelta) → depthai.MessageGroup¶ Sets image timestamp related to dai::Clock::now()
-
-
class
depthai.
MonoCameraProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for MonoCamera such as camera ID, …
Classes:
Select the camera sensor resolution: 1280×720, 1280×800, 640×400, 640×480, 1920×1200
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
class
SensorResolution
¶ Bases:
pybind11_builtins.pybind11_object
Select the camera sensor resolution: 1280×720, 1280×800, 640×400, 640×480, 1920×1200
Members:
THE_720_P
THE_800_P
THE_400_P
THE_480_P
THE_1200_P
Attributes:
Methods:
__init__
(self, value)-
THE_1200_P
= <SensorResolution.THE_1200_P: 4>¶
-
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
eventFilter
¶
-
property
fps
¶
-
property
initialControl
¶
-
property
isp3aFps
¶
-
property
numFramesPool
¶
-
property
numFramesPoolRaw
¶
-
property
resolution
¶
-
class
-
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)Convenience function to retrieve float values from first layers FP16 tensor
getFirstLayerInt32
(self)Convenience function to retrieve INT32 values from first layers tensor
getFirstLayerUInt8
(self)Convenience 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)Convenience function to retrieve float values from layers FP16 tensor
getLayerInt32
(self, name)Convenience function to retrieve INT32 values from layers tensor
getLayerUInt8
(self, name)Convenience function to retrieve U8 data from layer
getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
hasLayer
(self, name)Checks if given layer exists
setLayer
(*args, **kwargs)Overloaded function.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
-
__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]¶ Convenience function to retrieve float values from first layers FP16 tensor
- Returns
Float data
-
getFirstLayerInt32
(self: depthai.NNData) → List[int]¶ Convenience function to retrieve INT32 values from first layers tensor
- Returns
INT32 data
-
getFirstLayerUInt8
(self: depthai.NNData) → List[int]¶ Convenience 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 information of that layer
- Returns
True if layer exists, false otherwise
- Parameter
-
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
- Parameter
-
getLayerFp16
(self: depthai.NNData, name: str) → List[float]¶ Convenience function to retrieve float values from layers FP16 tensor
- Parameter
name
: Name of the layer
- Returns
Float data
- Parameter
-
getLayerInt32
(self: depthai.NNData, name: str) → List[int]¶ Convenience function to retrieve INT32 values from layers tensor
- Parameter
name
: Name of the layer
- Returns
INT32 data
- Parameter
-
getLayerUInt8
(self: depthai.NNData, name: str) → List[int]¶ Convenience function to retrieve U8 data from layer
- Parameter
name
: Name of the layer
- Returns
U8 binary data
- Parameter
-
getSequenceNum
(self: depthai.NNData) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.NNData) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.NNData) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
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
- Parameter
-
setLayer
(*args, **kwargs)¶ Overloaded function.
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
setLayer(self: depthai.NNData, name: str, data: List[int]) -> depthai.NNData
Set a layer with datatype U8. Integers are cast to bytes.
- Parameter
name
: Name of the layer
- Parameter
data
: Data to store
setLayer(self: depthai.NNData, name: str, data: List[float]) -> depthai.NNData
Set a layer with datatype FP16. Float values are converted to FP16.
- Parameter
name
: Name of the layer
- Parameter
data
: Data to store
setLayer(self: depthai.NNData, name: str, data: List[float]) -> depthai.NNData
Set a layer with datatype FP16. Double values are converted to FP16.
- Parameter
name
: Name of the layer
- Parameter
data
: Data to store
-
setSequenceNum
(self: depthai.NNData, arg0: int) → depthai.NNData¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.NNData, arg0: datetime.timedelta) → depthai.NNData¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.NNData, arg0: datetime.timedelta) → depthai.NNData¶ Sets image timestamp related to dai::Clock::now()
-
class
depthai.
NeuralNetworkProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for NeuralNetwork such as blob path, …
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__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 between an Input and Output
Node identificator.
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 of node
-
class
Connection
¶ Bases:
pybind11_builtins.pybind11_object
Connection between an Input and Output
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
inputGroup
¶
-
property
inputId
¶
-
property
inputName
¶
-
property
outputGroup
¶
-
property
outputId
¶
-
property
outputName
¶
-
-
class
DatatypeHierarchy
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self, arg0, arg1)Attributes:
-
__init__
(self: depthai.Node.DatatypeHierarchy, arg0: depthai.DatatypeEnum, arg1: bool) → None¶
-
property
datatype
¶
-
property
descendants
¶
-
-
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:
Members:
Methods:
__init__
(*args, **kwargs)Initialize self.
getBlocking
(self)Get input queue behavior
getParent
(*args, **kwargs)Overloaded function.
getQueueSize
(self)Get input queue size.
getReusePreviousMessage
(self)Equivalent to getWaitForMessage but with inverted logic.
getWaitForMessage
(self)Get behavior whether to wait for this input when a Node processes certain data or not
setBlocking
(self, blocking)Overrides default input queue behavior.
setQueueSize
(self, size)Overrides default input queue size.
setReusePreviousMessage
(self, …)Equivalent to setWaitForMessage but with inverted logic.
setWaitForMessage
(self, waitForMessage)Overrides default wait for message behavior.
Attributes:
-
class
Type
¶ Bases:
pybind11_builtins.pybind11_object
Members:
SReceiver
MReceiver
Attributes:
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
-
getParent
(*args, **kwargs)¶ Overloaded function.
getParent(self: depthai.Node.Input) -> depthai.Node
getParent(self: depthai.Node.Input) -> depthai.Node
-
getQueueSize
(self: depthai.Node.Input) → int¶ Get input queue size.
- Returns
Maximum input queue size
-
getReusePreviousMessage
(self: depthai.Node.Input) → bool¶ Equivalent to getWaitForMessage but with inverted logic.
-
getWaitForMessage
(self: depthai.Node.Input) → bool¶ Get behavior whether to wait for this input when a Node processes certain data or not
- Returns
Whether to wait for message to arrive to this input or not
-
property
group
¶
-
property
name
¶
-
property
possibleDatatypes
¶
-
setBlocking
(self: depthai.Node.Input, blocking: bool) → None¶ Overrides default input queue behavior.
- Parameter
blocking
: True blocking, false overwriting
- Parameter
-
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
- Parameter
-
setReusePreviousMessage
(self: depthai.Node.Input, reusePreviousMessage: bool) → None¶ Equivalent to setWaitForMessage but with inverted logic.
-
setWaitForMessage
(self: depthai.Node.Input, waitForMessage: bool) → None¶ Overrides default wait for message behavior. Applicable for nodes with multiple inputs. Specifies behavior whether to wait for this input when a Node processes certain data or not.
- Parameter
waitForMessage
: Whether to wait for message to arrive to this input or not
- Parameter
-
property
type
¶
-
property
waitForMessage
¶
-
class
-
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:
Members:
Methods:
__init__
(*args, **kwargs)Initialize self.
canConnect
(self, input)Check if connection is possible
getConnections
(self)Retrieve all connections from this output
getParent
(*args, **kwargs)Overloaded function.
isSamePipeline
(self, input)Check if this output and given input are on the same pipeline.
link
(self, input)Link current output to input.
unlink
(self, input)Unlink a previously linked connection
Attributes:
-
class
Type
¶ Bases:
pybind11_builtins.pybind11_object
Members:
MSender
SSender
Attributes:
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
- Parameter
-
getConnections
(self: depthai.Node.Output) → List[depthai.Node.Connection]¶ Retrieve all connections from this output
- Returns
Vector of connections
-
getParent
(*args, **kwargs)¶ Overloaded function.
getParent(self: depthai.Node.Output) -> depthai.Node
getParent(self: depthai.Node.Output) -> depthai.Node
-
property
group
¶
-
isSamePipeline
(self: depthai.Node.Output, input: depthai.Node.Input) → bool¶ Check if this output and given input are on the same pipeline.
See also
canConnect for checking if connection is possible
- Returns
True if output and input are on the same pipeline
-
link
(self: depthai.Node.Output, input: depthai.Node.Input) → None¶ 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
- Parameter
-
property
name
¶
-
property
possibleDatatypes
¶
-
property
type
¶
-
unlink
(self: depthai.Node.Output, input: depthai.Node.Input) → None¶ Unlink a previously linked connection
Throws an error if not linked.
- Parameter
in
: Input from which to unlink from
- Parameter
-
class
-
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.
getAssetManager(self: depthai.Node) -> depthai.AssetManager
Get node AssetManager as a const reference
getAssetManager(self: depthai.Node) -> depthai.AssetManager
Get node AssetManager as a const reference
-
getInputRefs
(*args, **kwargs)¶ Overloaded function.
getInputRefs(self: depthai.Node) -> List[depthai.Node.Input]
Retrieves reference to node inputs
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.
getOutputRefs(self: depthai.Node) -> List[depthai.Node.Output]
Retrieves reference to node outputs
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.
getParentPipeline(self: depthai.Node) -> depthai.Pipeline
getParentPipeline(self: depthai.Node) -> depthai.Pipeline
-
property
id
¶ Id of node
-
property
properties
¶
-
class
-
class
depthai.
ObjectTrackerProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for ObjectTracker
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Which detections labels to track.
Maximum number of objects to track.
New ID assignment policy.
Confidence threshold for tracklets.
Tracking method.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
detectionLabelsToTrack
¶ Which detections labels to track. Default all labels are tracked.
-
property
maxObjectsToTrack
¶ Maximum number of objects to track. Maximum 60 for SHORT_TERM_KCF, maximum 1000 for other tracking methods. Default 60.
-
property
trackerIdAssignmentPolicy
¶ New ID assignment policy.
-
property
trackerThreshold
¶ Confidence threshold for tracklets. Above this threshold detections will be tracked. Default 0, all detections are tracked.
-
property
trackerType
¶ Tracking method.
-
-
class
depthai.
OpenVINO
¶ Bases:
pybind11_builtins.pybind11_object
Support for basic OpenVINO related actions like version identification of neural network blobs,…
Classes:
OpenVINO Blob
OpenVINO Version supported version information
Attributes:
Methods:
__init__
(*args, **kwargs)Initialize self.
areVersionsBlobCompatible
(v1, v2)Checks whether two blob versions are compatible
getBlobLatestSupportedVersion
(majorVersion, …)Returns latest potentially supported version by a given blob version.
getBlobSupportedVersions
(majorVersion, …)Returns a list of potentially supported versions for a specified blob major and minor versions.
getVersionName
(version)Returns string representation of a given version
- returns
Supported versions
parseVersionName
(versionString)Creates Version from string representation.
-
class
Blob
¶ Bases:
pybind11_builtins.pybind11_object
OpenVINO Blob
Methods:
__init__
(*args, **kwargs)Overloaded function.
Attributes:
Blob data
Map of input names to additional information
Map of output names to additional information
Number of shaves the blob was compiled for
Number of CMX slices the blob was compiled for
Number of network stages
OpenVINO version
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.OpenVINO.Blob, arg0: List[int]) -> None
Construct a new Blob from data in memory
- Parameter
data
: In memory blob
__init__(self: depthai.OpenVINO.Blob, arg0: Path) -> None
Construct a new Blob by loading from a filesystem path
- Parameter
path
: Filesystem path to the blob
-
property
data
¶ Blob data
-
property
networkInputs
¶ Map of input names to additional information
-
property
networkOutputs
¶ Map of output names to additional information
-
property
numShaves
¶ Number of shaves the blob was compiled for
-
property
numSlices
¶ Number of CMX slices the blob was compiled for
-
property
stageCount
¶ Number of network stages
-
property
version
¶ OpenVINO version
-
-
DEFAULT_VERSION
= <Version.VERSION_2022_1: 6>¶
-
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>¶
-
VERSION_2022_1
= <Version.VERSION_2022_1: 6>¶
-
VERSION_UNIVERSAL
= <Version.VERSION_UNIVERSAL: 7>¶
-
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
VERSION_2022_1
VERSION_UNIVERSAL
Attributes:
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>¶
-
VERSION_2022_1
= <Version.VERSION_2022_1: 6>¶
-
VERSION_UNIVERSAL
= <Version.VERSION_UNIVERSAL: 7>¶
-
__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 potentially supported version by a given blob version.
- Parameter
majorVersion
: Major version from OpenVINO blob
- Parameter
minorVersion
: Minor version from OpenVINO blob
- Returns
Latest potentially supported version
- Parameter
-
OpenVINO.getBlobSupportedVersions(majorVersion: int, majorVersion: int) -> List[depthai.OpenVINO.Version]
Returns a list of potentially 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 potentially supported versions
- Parameter
-
static
getVersionName
(version: depthai.OpenVINO.Version) → str¶ Returns string representation of a given version
- Parameter
version
: OpenVINO version
- Returns
Name of a given version
- Parameter
-
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
- Parameter
-
class
depthai.
Pipeline
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Constructs a new pipeline
create
(self, arg0)createAprilTag
(self)createCamera
(self)createColorCamera
(self)createDetectionParser
(self)createEdgeDetector
(self)createFeatureTracker
(self)createIMU
(self)createImageManip
(self)createMonoCamera
(self)createNeuralNetwork
(self)createObjectTracker
(self)createSPIIn
(self)createSPIOut
(self)createScript
(self)createStereoDepth
(self)createSystemLogger
(self)createUVC
(self)createVideoEncoder
(self)createWarp
(self)createXLinkIn
(self)createXLinkOut
(self)getAllNodes
(*args, **kwargs)Overloaded function.
getAssetManager
(*args, **kwargs)Overloaded function.
getBoardConfig
(self)Gets board configuration
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
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
serializeToJson
(self)Returns whole pipeline represented as JSON
setBoardConfig
(self, arg0)Sets board configuration
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
setSippBufferSize
(self, sizeBytes)SIPP (Signal Image Processing Pipeline) internal memory pool.
setSippDmaBufferSize
(self, sizeBytes)SIPP (Signal Image Processing Pipeline) internal DMA memory pool.
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¶
-
createAprilTag
(self: depthai.Pipeline) → depthai.node.AprilTag¶
-
createCamera
(self: depthai.Pipeline) → depthai.node.Camera¶
-
createColorCamera
(self: depthai.Pipeline) → depthai.node.ColorCamera¶
-
createDetectionParser
(self: depthai.Pipeline) → depthai.node.DetectionParser¶
-
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¶
-
createScript
(self: depthai.Pipeline) → depthai.node.Script¶
-
createSpatialLocationCalculator
(self: depthai.Pipeline) → depthai.node.SpatialLocationCalculator¶
-
createStereoDepth
(self: depthai.Pipeline) → depthai.node.StereoDepth¶
-
createSystemLogger
(self: depthai.Pipeline) → depthai.node.SystemLogger¶
-
createUVC
(self: depthai.Pipeline) → depthai.node.UVC¶
-
createVideoEncoder
(self: depthai.Pipeline) → depthai.node.VideoEncoder¶
-
createWarp
(self: depthai.Pipeline) → depthai.node.Warp¶
-
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.
getAllNodes(self: depthai.Pipeline) -> List[depthai.Node]
Get a vector of all nodes
getAllNodes(self: depthai.Pipeline) -> List[depthai.Node]
Get a vector of all nodes
-
getAssetManager
(*args, **kwargs)¶ Overloaded function.
getAssetManager(self: depthai.Pipeline) -> depthai.AssetManager
Get pipelines AssetManager as reference
getAssetManager(self: depthai.Pipeline) -> depthai.AssetManager
Get pipelines AssetManager as reference
-
getBoardConfig
(self: depthai.Pipeline) → depthai.BoardConfig¶ Gets board configuration
-
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.
getNode(self: depthai.Pipeline, arg0: int) -> depthai.Node
Get node with id if it exists, nullptr otherwise
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
(self: depthai.Pipeline, arg0: depthai.Node.Output, arg1: depthai.Node.Input) → 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
- Parameter
-
remove
(self: depthai.Pipeline, node: depthai.Node) → None¶ Removes a node from pipeline
-
serializeToJson
(self: depthai.Pipeline) → json¶ Returns whole pipeline represented as JSON
-
setBoardConfig
(self: depthai.Pipeline, arg0: depthai.BoardConfig) → None¶ Sets board configuration
-
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.
- Parameter
-
setCameraTuningBlobPath
(self: depthai.Pipeline, path: Path) → None¶ Set a camera IQ (Image Quality) tuning blob, used for all cameras
-
setOpenVINOVersion
(self: depthai.Pipeline, version: depthai.OpenVINO.Version) → None¶ Set a specific OpenVINO version to use with this pipeline
-
setSippBufferSize
(self: depthai.Pipeline, sizeBytes: int) → None¶ SIPP (Signal Image Processing Pipeline) internal memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. By default memory is allocated in high speed CMX memory. Setting to 0 will allocate in DDR 256 kilobytes. Units are bytes.
-
setSippDmaBufferSize
(self: depthai.Pipeline, sizeBytes: int) → None¶ SIPP (Signal Image Processing Pipeline) internal DMA memory pool. SIPP is a framework used to schedule HW filters, e.g. ISP, Warp, Median filter etc. Changing the size of this pool is meant for advanced use cases, pushing the limits of the HW. Memory is allocated in high speed CMX memory Units are bytes.
-
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
(self: depthai.Pipeline, arg0: depthai.Node.Output, arg1: depthai.Node.Input) → None¶ 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
- Parameter
-
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:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.Point2f) -> None
__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:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.Point3f) -> None
__init__(self: depthai.Point3f, arg0: float, arg1: float, arg2: float) -> None
-
property
x
¶
-
property
y
¶
-
property
z
¶
-
-
class
depthai.
PointCloudConfig
¶ Bases:
depthai.Buffer
PointCloudConfig message. Carries ROI (region of interest) and threshold for depth calculation
Methods:
__init__
(*args, **kwargs)Overloaded function.
get
(self)Retrieve configuration data for SpatialLocationCalculator.
getSparse
(self)Retrieve sparse point cloud calculation status.
getTransformationMatrix
(self)Retrieve transformation matrix for point cloud calculation.
set
(self, config)Set explicit configuration.
setSparse
(self, arg0)Enable or disable sparse point cloud calculation.
setTransformationMatrix
(*args, **kwargs)Overloaded function.
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.PointCloudConfig) -> None
__init__(self: depthai.PointCloudConfig, arg0: depthai.RawPointCloudConfig) -> None
-
get
(self: depthai.PointCloudConfig) → depthai.RawPointCloudConfig¶ Retrieve configuration data for SpatialLocationCalculator.
- Returns
config for SpatialLocationCalculator
-
getSparse
(self: depthai.PointCloudConfig) → bool¶ Retrieve sparse point cloud calculation status.
- Returns
true if sparse point cloud calculation is enabled, false otherwise
-
getTransformationMatrix
(self: depthai.PointCloudConfig) → List[List[float[4]][4]]¶ Retrieve transformation matrix for point cloud calculation.
- Returns
4x4 transformation matrix
-
set
(self: depthai.PointCloudConfig, config: depthai.RawPointCloudConfig) → depthai.PointCloudConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setSparse
(self: depthai.PointCloudConfig, arg0: bool) → depthai.PointCloudConfig¶ Enable or disable sparse point cloud calculation.
Parameter
enable
:
-
setTransformationMatrix
(*args, **kwargs)¶ Overloaded function.
setTransformationMatrix(self: depthai.PointCloudConfig, arg0: List[List[float[3]][3]]) -> depthai.PointCloudConfig
Set 4x4 transformation matrix for point cloud calculation. Default is an identity matrix.
Parameter
transformationMatrix
:setTransformationMatrix(self: depthai.PointCloudConfig, arg0: List[List[float[4]][4]]) -> depthai.PointCloudConfig
Set 4x4 transformation matrix for point cloud calculation. Default is an identity matrix.
Parameter
transformationMatrix
:
-
-
class
depthai.
PointCloudData
¶ Bases:
depthai.Buffer
PointCloudData message. Carries point cloud data.
Methods:
__init__
(self)getHeight
(self)Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
getInstanceNum
(self)Retrieves instance number
getMaxX
(self)Retrieves maximal x coordinate in depth units (millimeter by default)
getMaxY
(self)Retrieves maximal y coordinate in depth units (millimeter by default)
getMaxZ
(self)Retrieves maximal z coordinate in depth units (millimeter by default)
getMinX
(self)Retrieves minimal x coordinate in depth units (millimeter by default)
getMinY
(self)Retrieves minimal y coordinate in depth units (millimeter by default)
getMinZ
(self)Retrieves minimal z coordinate in depth units (millimeter by default)
getPoints
(self)getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
getWidth
(self)Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
isSparse
(self)Retrieves whether point cloud is sparse
setHeight
(self, arg0)Specifies frame height
setInstanceNum
(self, arg0)Instance number relates to the origin of the frame (which camera)
setMaxX
(self, arg0)Specifies maximal x coordinate in depth units (millimeter by default)
setMaxY
(self, arg0)Specifies maximal y coordinate in depth units (millimeter by default)
setMaxZ
(self, arg0)Specifies maximal z coordinate in depth units (millimeter by default)
setMinX
(self, arg0)Specifies minimal x coordinate in depth units (millimeter by default)
setMinY
(self, arg0)Specifies minimal y coordinate in depth units (millimeter by default)
setMinZ
(self, arg0)Specifies minimal z coordinate in depth units (millimeter by default)
setSequenceNum
(self, arg0)Specifies sequence number
setSize
(*args, **kwargs)Overloaded function.
setTimestamp
(self, arg0)Retrieves image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
setWidth
(self, arg0)Specifies frame width
Attributes:
-
__init__
(self: depthai.PointCloudData) → None¶
-
getHeight
(self: depthai.PointCloudData) → int¶ Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
-
getInstanceNum
(self: depthai.PointCloudData) → int¶ Retrieves instance number
-
getMaxX
(self: depthai.PointCloudData) → float¶ Retrieves maximal x coordinate in depth units (millimeter by default)
-
getMaxY
(self: depthai.PointCloudData) → float¶ Retrieves maximal y coordinate in depth units (millimeter by default)
-
getMaxZ
(self: depthai.PointCloudData) → float¶ Retrieves maximal z coordinate in depth units (millimeter by default)
-
getMinX
(self: depthai.PointCloudData) → float¶ Retrieves minimal x coordinate in depth units (millimeter by default)
-
getMinY
(self: depthai.PointCloudData) → float¶ Retrieves minimal y coordinate in depth units (millimeter by default)
-
getMinZ
(self: depthai.PointCloudData) → float¶ Retrieves minimal z coordinate in depth units (millimeter by default)
-
getSequenceNum
(self: depthai.PointCloudData) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.PointCloudData) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.PointCloudData) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
getWidth
(self: depthai.PointCloudData) → int¶ Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
-
isSparse
(self: depthai.PointCloudData) → bool¶ Retrieves whether point cloud is sparse
-
property
points
¶
-
setHeight
(self: depthai.PointCloudData, arg0: int) → depthai.PointCloudData¶ Specifies frame height
- Parameter
height
: frame height
- Parameter
-
setInstanceNum
(self: depthai.PointCloudData, arg0: int) → depthai.PointCloudData¶ Instance number relates to the origin of the frame (which camera)
- Parameter
instance
: Instance number
- Parameter
-
setMaxX
(self: depthai.PointCloudData, arg0: float) → depthai.PointCloudData¶ Specifies maximal x coordinate in depth units (millimeter by default)
- Parameter
val
: maximal x coordinate in depth units (millimeter by default)
- Parameter
-
setMaxY
(self: depthai.PointCloudData, arg0: float) → depthai.PointCloudData¶ Specifies maximal y coordinate in depth units (millimeter by default)
- Parameter
val
: maximal y coordinate in depth units (millimeter by default)
- Parameter
-
setMaxZ
(self: depthai.PointCloudData, arg0: float) → depthai.PointCloudData¶ Specifies maximal z coordinate in depth units (millimeter by default)
- Parameter
val
: maximal z coordinate in depth units (millimeter by default)
- Parameter
-
setMinX
(self: depthai.PointCloudData, arg0: float) → depthai.PointCloudData¶ Specifies minimal x coordinate in depth units (millimeter by default)
- Parameter
val
: minimal x coordinate in depth units (millimeter by default)
- Parameter
-
setMinY
(self: depthai.PointCloudData, arg0: float) → depthai.PointCloudData¶ Specifies minimal y coordinate in depth units (millimeter by default)
- Parameter
val
: minimal y coordinate in depth units (millimeter by default)
- Parameter
-
setMinZ
(self: depthai.PointCloudData, arg0: float) → depthai.PointCloudData¶ Specifies minimal z coordinate in depth units (millimeter by default)
- Parameter
val
: minimal z coordinate in depth units (millimeter by default)
- Parameter
-
setSequenceNum
(self: depthai.PointCloudData, arg0: int) → depthai.PointCloudData¶ Specifies sequence number
- Parameter
seq
: Sequence number
- Parameter
-
setSize
(*args, **kwargs)¶ Overloaded function.
setSize(self: depthai.PointCloudData, width: int, height: int) -> depthai.PointCloudData
Specifies frame size
- Parameter
height
: frame height
- Parameter
width
: frame width
setSize(self: depthai.PointCloudData, size: Tuple[int, int]) -> depthai.PointCloudData
Specifies frame size
- Parameter
size
: frame size
-
setTimestamp
(self: depthai.PointCloudData, arg0: datetime.timedelta) → depthai.PointCloudData¶ Retrieves image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.PointCloudData, arg0: datetime.timedelta) → depthai.PointCloudData¶ Sets image timestamp related to dai::Clock::now()
-
setWidth
(self: depthai.PointCloudData, arg0: int) → depthai.PointCloudData¶ Specifies frame width
- Parameter
width
: frame width
- Parameter
-
-
class
depthai.
PointCloudProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for PointCloud
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
initialConfig
¶
-
property
numFramesPool
¶
-
-
class
depthai.
ProcessorType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
LEON_CSS
LEON_MSS
Attributes:
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.
ProfilingData
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
numBytesRead
¶
-
property
numBytesWritten
¶
-
-
class
depthai.
Properties
¶ Bases:
pybind11_builtins.pybind11_object
Base Properties structure
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
depthai.
RawAprilTagConfig
¶ Bases:
depthai.RawBuffer
RawAprilTags configuration structure
Classes:
Supported AprilTag families.
AprilTag quad threshold parameters.
Methods:
__init__
(self)Attributes:
How much sharpening should be done to decoded images? This can help decode small tags but may or may not help in odd lighting conditions or low light conditions.
AprilTag family.
Max number of error bits that should be corrected.
Detection of quads can be done on a lower-resolution image, improving speed at a cost of pose accuracy and a slight decrease in detection rate.
What Gaussian blur should be applied to the segmented image.
AprilTag quad threshold parameters.
When non-zero, the edges of the each quad are adjusted to “snap to” strong gradients nearby.
-
class
Family
¶ Bases:
pybind11_builtins.pybind11_object
Supported AprilTag families.
Members:
TAG_36H11
TAG_36H10
TAG_25H9
TAG_16H5
TAG_CIR21H7
TAG_STAND41H12
Attributes:
Methods:
__init__
(self, value)-
TAG_16H5
= <Family.TAG_16H5: 3>¶
-
TAG_25H9
= <Family.TAG_25H9: 2>¶
-
TAG_36H10
= <Family.TAG_36H10: 1>¶
-
TAG_36H11
= <Family.TAG_36H11: 0>¶
-
TAG_CIR21H7
= <Family.TAG_CIR21H7: 4>¶
-
TAG_STAND41H12
= <Family.TAG_STAND41H12: 5>¶
-
__init__
(self: depthai.RawAprilTagConfig.Family, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
QuadThresholds
¶ Bases:
pybind11_builtins.pybind11_object
AprilTag quad threshold parameters.
Methods:
__init__
(self)Attributes:
Reject quads where pairs of edges have angles that are close to straight or close to 180 degrees.
Should the thresholded image be deglitched? Only useful for very noisy images
When fitting lines to the contours, what is the maximum mean squared error allowed? This is useful in rejecting contours that are far from being quad shaped; rejecting these quads “early” saves expensive decoding processing.
How many corner candidates to consider when segmenting a group of pixels into a quad.
Reject quads containing too few pixels.
When we build our model of black & white pixels, we add an extra check that the white model must be (overall) brighter than the black model.
-
__init__
(self: depthai.RawAprilTagConfig.QuadThresholds) → None¶
-
property
criticalDegree
¶ Reject quads where pairs of edges have angles that are close to straight or close to 180 degrees. Zero means that no quads are rejected. (In degrees).
-
property
deglitch
¶ Should the thresholded image be deglitched? Only useful for very noisy images
-
property
maxLineFitMse
¶ When fitting lines to the contours, what is the maximum mean squared error allowed? This is useful in rejecting contours that are far from being quad shaped; rejecting these quads “early” saves expensive decoding processing.
-
property
maxNmaxima
¶ How many corner candidates to consider when segmenting a group of pixels into a quad.
-
property
minClusterPixels
¶ Reject quads containing too few pixels.
-
property
minWhiteBlackDiff
¶ When we build our model of black & white pixels, we add an extra check that the white model must be (overall) brighter than the black model. How much brighter? (in pixel values: [0,255]).
-
-
__init__
(self: depthai.RawAprilTagConfig) → None¶
-
property
decodeSharpening
¶ How much sharpening should be done to decoded images? This can help decode small tags but may or may not help in odd lighting conditions or low light conditions. The default value is 0.25.
-
property
family
¶ AprilTag family.
-
property
maxHammingDistance
¶ Max number of error bits that should be corrected. Accepting large numbers of corrected errors leads to greatly increased false positive rates. As of this implementation, the detector cannot detect tags with a hamming distance greater than 2.
-
property
quadDecimate
¶ Detection of quads can be done on a lower-resolution image, improving speed at a cost of pose accuracy and a slight decrease in detection rate. Decoding the binary payload is still done at full resolution.
-
property
quadSigma
¶ What Gaussian blur should be applied to the segmented image. Parameter is the standard deviation in pixels. Very noisy images benefit from non-zero values (e.g. 0.8).
-
property
quadThresholds
¶ AprilTag quad threshold parameters.
-
property
refineEdges
¶ When non-zero, the edges of the each quad are adjusted to “snap to” strong gradients nearby. This is useful when decimation is employed, as it can increase the quality of the initial quad estimate substantially. Generally recommended to be on. Very computationally inexpensive. Option is ignored if quadDecimate = 1.
-
class
-
class
depthai.
RawBuffer
¶ Bases:
pybind11_builtins.pybind11_object
RawBuffer structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawBuffer) → None¶
-
property
data
¶
-
property
sequenceNum
¶
-
property
ts
¶
-
property
tsDevice
¶
-
-
class
depthai.
RawCameraControl
¶ Bases:
depthai.RawBuffer
RawCameraControl structure
Classes:
Members:
Members:
Members:
Members:
Members:
Members:
Members:
Members:
Members:
Methods:
__init__
(self)clearCommand
(self, arg0)getCommand
(self, arg0)setCommand
(self, arg0, arg1)Attributes:
-
class
AntiBandingMode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
OFF
MAINS_50_HZ
MAINS_60_HZ
AUTO
Attributes:
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:
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:
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
CaptureIntent
¶ Bases:
pybind11_builtins.pybind11_object
Members:
CUSTOM
PREVIEW
STILL_CAPTURE
VIDEO_RECORD
VIDEO_SNAPSHOT
ZERO_SHUTTER_LAG
Attributes:
Methods:
__init__
(self, value)-
CUSTOM
= <CaptureIntent.CUSTOM: 0>¶
-
PREVIEW
= <CaptureIntent.PREVIEW: 1>¶
-
STILL_CAPTURE
= <CaptureIntent.STILL_CAPTURE: 2>¶
-
VIDEO_RECORD
= <CaptureIntent.VIDEO_RECORD: 3>¶
-
VIDEO_SNAPSHOT
= <CaptureIntent.VIDEO_SNAPSHOT: 4>¶
-
ZERO_SHUTTER_LAG
= <CaptureIntent.ZERO_SHUTTER_LAG: 5>¶
-
__init__
(self: depthai.RawCameraControl.CaptureIntent, 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:
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
ControlMode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
OFF
AUTO
USE_SCENE_MODE
Attributes:
Methods:
__init__
(self, value)-
AUTO
= <ControlMode.AUTO: 1>¶
-
OFF
= <ControlMode.OFF: 0>¶
-
USE_SCENE_MODE
= <ControlMode.USE_SCENE_MODE: 2>¶
-
__init__
(self: depthai.RawCameraControl.ControlMode, 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:
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
FrameSyncMode
¶ Bases:
pybind11_builtins.pybind11_object
Members:
OFF
OUTPUT
INPUT
Attributes:
Methods:
__init__
(self, value)-
INPUT
= <FrameSyncMode.INPUT: 2>¶
-
OFF
= <FrameSyncMode.OFF: 0>¶
-
OUTPUT
= <FrameSyncMode.OUTPUT: 1>¶
-
__init__
(self: depthai.RawCameraControl.FrameSyncMode, 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:
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.RawCameraControl) → None¶
-
property
aeLockMode
¶
-
property
aeMaxExposureTimeUs
¶
-
property
afRegion
¶
-
property
antiBandingMode
¶
-
property
autoFocusMode
¶
-
property
awbLockMode
¶
-
property
awbMode
¶
-
property
brightness
¶
-
property
captureIntent
¶
-
property
chromaDenoise
¶
-
clearCommand
(self: depthai.RawCameraControl, arg0: depthai.RawCameraControl.Command) → None¶
-
property
cmdMask
¶
-
property
contrast
¶
-
property
controlMode
¶
-
property
effectMode
¶
-
property
expCompensation
¶
-
property
expManual
¶
-
getCommand
(self: depthai.RawCameraControl, arg0: depthai.RawCameraControl.Command) → bool¶
-
property
lensPosition
¶
-
property
lensPositionRaw
¶
-
property
lumaDenoise
¶
-
property
saturation
¶
-
property
sceneMode
¶
-
setCommand
(self: depthai.RawCameraControl, arg0: depthai.RawCameraControl.Command, arg1: bool) → None¶
-
property
sharpness
¶
-
property
wbColorTemp
¶
-
class
-
class
depthai.
RawEdgeDetectorConfig
¶ Bases:
depthai.RawBuffer
RawEdgeDetectorConfig configuration structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawEdgeDetectorConfig) → None¶
-
property
config
¶
-
-
class
depthai.
RawEncodedFrame
¶ Bases:
depthai.RawBuffer
Classes:
Members:
Members:
Methods:
__init__
(self)Attributes:
-
class
FrameType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
I
P
B
Unknown
Attributes:
Methods:
__init__
(self, value)-
B
= <FrameType.B: 2>¶
-
I
= <FrameType.I: 0>¶
-
P
= <FrameType.P: 1>¶
-
Unknown
= <FrameType.Unknown: 3>¶
-
__init__
(self: depthai.RawEncodedFrame.FrameType, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
Profile
¶ Bases:
pybind11_builtins.pybind11_object
Members:
JPEG
AVC
HEVC
Attributes:
Methods:
__init__
(self, value)-
AVC
= <Profile.AVC: 1>¶
-
HEVC
= <Profile.HEVC: 2>¶
-
JPEG
= <Profile.JPEG: 0>¶
-
__init__
(self: depthai.RawEncodedFrame.Profile, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawEncodedFrame) → None¶
-
property
bitrate
¶
-
property
instanceNum
¶
-
property
lossless
¶
-
property
profile
¶
-
property
quality
¶
-
property
sequenceNum
¶
-
property
ts
¶
-
property
tsDevice
¶
-
property
type
¶
-
class
-
class
depthai.
RawFeatureTrackerConfig
¶ Bases:
depthai.RawBuffer
RawFeatureTrackerConfig configuration structure
Classes:
Corner detector configuration structure.
FeatureMaintainer configuration structure.
Used for feature reidentification between current and previous features.
Methods:
__init__
(self)Attributes:
Corner detector configuration.
FeatureMaintainer configuration.
Motion estimator configuration.
-
class
CornerDetector
¶ Bases:
pybind11_builtins.pybind11_object
Corner detector configuration structure.
Classes:
Threshold settings structure for corner detector.
Members:
Methods:
__init__
(self)Attributes:
Ensures distributed feature detection across the image.
Enable 3x3 Sobel operator to smoothen the image whose gradient is to be computed.
Enable sorting detected features based on their score or not.
Hard limit for the maximum number of features that can be detected.
Target number of features to detect.
Threshold settings.
Corner detector algorithm type.
-
class
Thresholds
¶ Bases:
pybind11_builtins.pybind11_object
Threshold settings structure for corner detector.
Methods:
__init__
(self)Attributes:
When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.
When detected number of features doesn’t exceed the maximum in a cell, threshold is increased by multiplying its value with this factor.
Minimum strength of a feature which will be detected.
Maximum limit for threshold.
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:
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
-
class
FeatureMaintainer
¶ Bases:
pybind11_builtins.pybind11_object
FeatureMaintainer configuration structure.
Methods:
__init__
(self)Attributes:
Enable feature maintaining or not.
Optical flow measures the tracking error for every feature.
Used to filter out detected feature points that are too close.
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 euclidean 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:
Optical flow configuration structure.
Members:
Methods:
__init__
(self)Attributes:
Enable motion estimation or not.
Optical flow configuration.
Motion estimator algorithm type.
-
class
OpticalFlow
¶ Bases:
pybind11_builtins.pybind11_object
Optical flow configuration structure.
Methods:
__init__
(self)Attributes:
Feature tracking termination criteria.
Feature tracking termination criteria.
Number of pyramid levels, only for optical flow.
Image patch height used to track features.
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:
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.
-
class
-
__init__
(self: depthai.RawFeatureTrackerConfig) → None¶
-
property
cornerDetector
¶ Corner detector configuration. Used for feature detection.
-
property
featureMaintainer
¶ FeatureMaintainer configuration. Used for feature maintaining.
-
property
motionEstimator
¶ Motion estimator configuration. Used for feature reidentification between current and previous features.
-
class
-
class
depthai.
RawIMUData
¶ Bases:
depthai.RawBuffer
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawIMUData) → None¶
-
property
packets
¶
-
-
class
depthai.
RawImageManipConfig
¶ Bases:
depthai.RawBuffer
RawImageManipConfig structure
Classes:
Methods:
__init__
(self)Attributes:
-
class
CropConfig
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawImageManipConfig.CropConfig) → None¶
-
property
cropRatio
¶
-
property
cropRect
¶
-
property
cropRotatedRect
¶
-
property
enableCenterCropRectangle
¶
-
property
enableRotatedRect
¶
-
property
normalizedCoords
¶
-
property
widthHeightAspectRatio
¶
-
-
class
CropRect
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawImageManipConfig.CropRect) → None¶
-
property
xmax
¶
-
property
xmin
¶
-
property
ymax
¶
-
property
ymin
¶
-
-
class
FormatConfig
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawImageManipConfig.FormatConfig) → None¶
-
property
flipHorizontal
¶
-
property
flipVertical
¶
-
property
type
¶
-
-
class
ResizeConfig
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawImageManipConfig.ResizeConfig) → None¶
-
property
bgBlue
¶
-
property
bgGreen
¶
-
property
bgRed
¶
-
property
enableRotation
¶
-
property
enableWarp4pt
¶
-
property
enableWarpMatrix
¶
-
property
height
¶
-
property
keepAspectRatio
¶
-
property
lockAspectRatioFill
¶
-
property
normalizedCoords
¶
-
property
rotationAngleDeg
¶
-
property
warpBorderReplicate
¶
-
property
warpFourPoints
¶
-
property
warpMatrix3x3
¶
-
property
width
¶
-
-
__init__
(self: depthai.RawImageManipConfig) → None¶
-
property
cropConfig
¶
-
property
enableCrop
¶
-
property
enableFormat
¶
-
property
enableResize
¶
-
property
formatConfig
¶
-
property
interpolation
¶
-
property
resizeConfig
¶
-
class
-
class
depthai.
RawImgDetections
¶ Bases:
depthai.RawBuffer
RawImgDetections structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawImgDetections) → None¶
-
property
detections
¶
-
property
sequenceNum
¶
-
property
ts
¶
-
property
tsDevice
¶
-
-
class
depthai.
RawImgFrame
¶ Bases:
depthai.RawBuffer
RawImgFrame structure
Classes:
Members:
Methods:
__init__
(self)Attributes:
-
class
Specs
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(self)Attributes:
-
__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:
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.RawImgFrame) → None¶
-
property
category
¶
-
property
fb
¶
-
property
instanceNum
¶
-
property
sequenceNum
¶
-
property
ts
¶
-
property
tsDevice
¶
-
class
-
class
depthai.
RawMessageGroup
¶ Bases:
depthai.RawBuffer
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawMessageGroup) → None¶
-
property
group
¶
-
-
class
depthai.
RawNNData
¶ Bases:
depthai.RawBuffer
RawNNData structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawNNData) → None¶
-
property
batchSize
¶
-
property
sequenceNum
¶
-
property
tensors
¶
-
property
ts
¶
-
property
tsDevice
¶
-
-
class
depthai.
RawPointCloudConfig
¶ Bases:
depthai.RawBuffer
RawPointCloudConfig configuration structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawPointCloudConfig) → None¶
-
property
sparse
¶
-
property
transformationMatrix
¶
-
-
class
depthai.
RawPointCloudData
¶ Bases:
depthai.RawBuffer
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawPointCloudData) → None¶
-
property
height
¶
-
property
instanceNum
¶
-
property
maxx
¶
-
property
maxy
¶
-
property
maxz
¶
-
property
minx
¶
-
property
miny
¶
-
property
minz
¶
-
property
sparse
¶
-
property
width
¶
-
-
class
depthai.
RawSpatialImgDetections
¶ Bases:
depthai.RawBuffer
RawSpatialImgDetections structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawSpatialImgDetections) → None¶
-
property
detections
¶
-
property
sequenceNum
¶
-
property
ts
¶
-
property
tsDevice
¶
-
-
class
depthai.
RawStereoDepthConfig
¶ Bases:
depthai.RawBuffer
RawStereoDepthConfig configuration structure
Classes:
The basic cost function used by the Stereo Accelerator for matching the left and right images is the Census Transform.
Cost Aggregation is based on Semi Global Block Matching (SGBM).
The matching cost is way of measuring the similarity of image locations in stereo correspondence algorithm.
Median filter config
Post-processing filters, all the filters are applied in disparity domain.
Methods:
__init__
(self)Attributes:
Controls the flow of stereo algorithm - left-right check, subpixel etc.
Census transform settings.
Cost aggregation settings.
Cost matching settings.
Controls the postprocessing of disparity and/or depth map.
-
class
AlgorithmControl
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Align the disparity/depth to the perspective of a rectified output, or center it
Measurement unit for depth data
Methods:
__init__
(self)Attributes:
Used only for debug purposes.
Custom depth unit multiplier, if custom depth unit is enabled, relative to 1 meter.
Set the disparity/depth alignment to the perspective of a rectified output, or center it
Measurement unit for depth data.
Shift input frame by a number of pixels to increase minimum depth.
Disparity range increased from 95 to 190, combined from full resolution and downscaled images.
Computes and combines disparities in both L-R and R-L directions, and combine them.
Computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
Left-right check threshold for left-right, right-left disparity map combine, 0..128 Used only when left-right check mode is enabled.
Invalidate X amount of pixels at the edge of disparity frame.
Number of fractional bits for subpixel mode
-
class
DepthAlign
¶ Bases:
pybind11_builtins.pybind11_object
Align the disparity/depth to the perspective of a rectified output, or center it
Members:
RECTIFIED_RIGHT :
RECTIFIED_LEFT :
CENTER :
Attributes:
Methods:
__init__
(self, value)-
CENTER
= <DepthAlign.CENTER: 2>¶
-
RECTIFIED_LEFT
= <DepthAlign.RECTIFIED_LEFT: 1>¶
-
RECTIFIED_RIGHT
= <DepthAlign.RECTIFIED_RIGHT: 0>¶
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl.DepthAlign, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
DepthUnit
¶ Bases:
pybind11_builtins.pybind11_object
Measurement unit for depth data
Members:
METER :
CENTIMETER :
MILLIMETER :
INCH :
FOOT :
CUSTOM :
Attributes:
Methods:
__init__
(self, value)-
CENTIMETER
= <DepthUnit.CENTIMETER: 1>¶
-
CUSTOM
= <DepthUnit.CUSTOM: 5>¶
-
FOOT
= <DepthUnit.FOOT: 4>¶
-
INCH
= <DepthUnit.INCH: 3>¶
-
METER
= <DepthUnit.METER: 0>¶
-
MILLIMETER
= <DepthUnit.MILLIMETER: 2>¶
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl.DepthUnit, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl) → None¶
-
property
centerAlignmentShiftFactor
¶ Used only for debug purposes. centerAlignmentShiftFactor is set automatically in firmware, from camera extrinsics when depth alignment to camera is enabled. Center alignment is achieved by shifting the obtained disparity map by a scale factor. It’s used to align to a different camera that is on the same horizontal baseline as the two stereo cameras. E.g. if we have a device with 10 cm stereo baseline, and we have another camera inbetween, 9cm from the LEFT camera and 1 cm from the RIGHT camera we can align the obtained disparity map using a scale factor of 0.9. Note that aligning disparity map to a different camera involves 2 steps: 1. Shifting obtained disparity map. 2. Warping the image to counter rotate and scaling to match the FOV. Center alignment factor 1 is equivalent to RECTIFIED_RIGHT Center alignment factor 0 is equivalent to RECTIFIED_LEFT
-
property
customDepthUnitMultiplier
¶ Custom depth unit multiplier, if custom depth unit is enabled, relative to 1 meter. A multiplier of 1000 effectively means depth unit in millimeter.
-
property
depthAlign
¶ Set the disparity/depth alignment to the perspective of a rectified output, or center it
-
property
depthUnit
¶ Measurement unit for depth data. Depth data is integer value, multiple of depth unit.
-
property
disparityShift
¶ Shift input frame by a number of pixels to increase minimum depth. For example shifting by 48 will change effective disparity search range from (0,95] to [48,143]. An alternative approach to reducing the minZ. We normally only recommend doing this when it is known that there will be no objects farther away than MaxZ, such as having a depth camera mounted above a table pointing down at the table surface.
-
property
enableExtended
¶ Disparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
-
property
enableLeftRightCheck
¶ Computes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling
-
property
enableSubpixel
¶ Computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
-
property
leftRightCheckThreshold
¶ Left-right check threshold for left-right, right-left disparity map combine, 0..128 Used only when left-right check mode is enabled. Defines the maximum difference between the confidence of pixels from left-right and right-left confidence maps
-
property
numInvalidateEdgePixels
¶ Invalidate X amount of pixels at the edge of disparity frame. For right and center alignment X pixels will be invalidated from the right edge, for left alignment from the left edge.
-
property
subpixelFractionalBits
¶ Number of fractional bits for subpixel mode
Valid values: 3,4,5
Defines the number of fractional disparities: 2^x
Median filter postprocessing is supported only for 3 fractional bits
-
class
-
class
CensusTransform
¶ Bases:
pybind11_builtins.pybind11_object
The basic cost function used by the Stereo Accelerator for matching the left and right images is the Census Transform. It works on a block of pixels and computes a bit vector which represents the structure of the image in that block. There are two types of Census Transform based on how the middle pixel is used: Classic Approach and Modified Census. The comparisons that are made between pixels can be or not thresholded. In some cases a mask can be applied to filter out only specific bits from the entire bit stream. All these approaches are: Classic Approach: Uses middle pixel to compare against all its neighbors over a defined window. Each comparison results in a new bit, that is 0 if central pixel is smaller, or 1 if is it bigger than its neighbor. Modified Census Transform: same as classic Census Transform, but instead of comparing central pixel with its neighbors, the window mean will be compared with each pixel over the window. Thresholding Census Transform: same as classic Census Transform, but it is not enough that a neighbor pixel to be bigger than the central pixel, it must be significant bigger (based on a threshold). Census Transform with Mask: same as classic Census Transform, but in this case not all of the pixel from the support window are part of the binary descriptor. We use a ma sk “M” to define which pixels are part of the binary descriptor (1), and which pixels should be skipped (0).
Classes:
Census transform kernel size possible values.
Methods:
__init__
(self)Attributes:
If enabled, each pixel in the window is compared with the mean window value instead of the central pixel.
Census transform mask, default - auto, mask is set based on resolution and kernel size.
Census transform kernel size.
Census transform comparison threshold value.
-
class
KernelSize
¶ Bases:
pybind11_builtins.pybind11_object
Census transform kernel size possible values.
Members:
AUTO :
KERNEL_5x5 :
KERNEL_7x7 :
KERNEL_7x9 :
Attributes:
Methods:
__init__
(self, value)-
AUTO
= <KernelSize.AUTO: -1>¶
-
KERNEL_5x5
= <KernelSize.KERNEL_5x5: 0>¶
-
KERNEL_7x7
= <KernelSize.KERNEL_7x7: 1>¶
-
KERNEL_7x9
= <KernelSize.KERNEL_7x9: 2>¶
-
__init__
(self: depthai.RawStereoDepthConfig.CensusTransform.KernelSize, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.CensusTransform) → None¶
-
property
enableMeanMode
¶ If enabled, each pixel in the window is compared with the mean window value instead of the central pixel.
-
property
kernelMask
¶ Census transform mask, default - auto, mask is set based on resolution and kernel size. Disabled for 400p input resolution. Enabled for 720p. 0XA82415 for 5x5 census transform kernel. 0XAA02A8154055 for 7x7 census transform kernel. 0X2AA00AA805540155 for 7x9 census transform kernel. Empirical values.
-
property
kernelSize
¶ Census transform kernel size.
-
property
threshold
¶ Census transform comparison threshold value.
-
class
-
class
CostAggregation
¶ Bases:
pybind11_builtins.pybind11_object
Cost Aggregation is based on Semi Global Block Matching (SGBM). This algorithm uses a semi global technique to aggregate the cost map. Ultimately the idea is to build inertia into the stereo algorithm. If a pixel has very little texture information, then odds are the correct disparity for this pixel is close to that of the previous pixel considered. This means that we get improved results in areas with low texture.
Methods:
__init__
(self)Attributes:
Cost calculation linear equation parameters.
Horizontal P1 penalty cost parameter.
Horizontal P2 penalty cost parameter.
Vertical P1 penalty cost parameter.
Vertical P2 penalty cost parameter.
-
__init__
(self: depthai.RawStereoDepthConfig.CostAggregation) → None¶
-
property
divisionFactor
¶ Cost calculation linear equation parameters.
-
property
horizontalPenaltyCostP1
¶ Horizontal P1 penalty cost parameter.
-
property
horizontalPenaltyCostP2
¶ Horizontal P2 penalty cost parameter.
-
property
verticalPenaltyCostP1
¶ Vertical P1 penalty cost parameter.
-
property
verticalPenaltyCostP2
¶ Vertical P2 penalty cost parameter.
-
-
class
CostMatching
¶ Bases:
pybind11_builtins.pybind11_object
The matching cost is way of measuring the similarity of image locations in stereo correspondence algorithm. Based on the configuration parameters and based on the descriptor type, a linear equation is applied to computing the cost for each candidate disparity at each pixel.
Classes:
Disparity search range: 64 or 96 pixels are supported by the HW.
The linear equation applied for computing the cost is: COMB_COST = α*AD + β*(CTC<<3).
Methods:
__init__
(self)Attributes:
Disparities with confidence value under this threshold are accepted.
Disparity search range, default 96 pixels.
Disparity companding using sparse matching.
Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly.
Cost calculation linear equation parameters.
-
class
DisparityWidth
¶ Bases:
pybind11_builtins.pybind11_object
Disparity search range: 64 or 96 pixels are supported by the HW.
Members:
DISPARITY_64 :
DISPARITY_96 :
Attributes:
Methods:
__init__
(self, value)-
DISPARITY_64
= <DisparityWidth.DISPARITY_64: 0>¶
-
DISPARITY_96
= <DisparityWidth.DISPARITY_96: 1>¶
-
__init__
(self: depthai.RawStereoDepthConfig.CostMatching.DisparityWidth, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
LinearEquationParameters
¶ Bases:
pybind11_builtins.pybind11_object
The linear equation applied for computing the cost is: COMB_COST = α*AD + β*(CTC<<3). CLAMP(COMB_COST >> 5, threshold). Where AD is the Absolute Difference between 2 pixels values. CTC is the Census Transform Cost between 2 pixels, based on Hamming distance (xor). The α and β parameters are subject to fine tuning by the user.
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawStereoDepthConfig.CostMatching.LinearEquationParameters) → None¶
-
property
alpha
¶
-
property
beta
¶
-
property
threshold
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.CostMatching) → None¶
-
property
confidenceThreshold
¶ Disparities with confidence value under this threshold are accepted. Higher confidence threshold means disparities with less confidence are accepted too.
-
property
disparityWidth
¶ Disparity search range, default 96 pixels.
-
property
enableCompanding
¶ Disparity companding using sparse matching. Matching pixel by pixel for N disparities. Matching every 2nd pixel for M disparitites. Matching every 4th pixel for T disparities. In case of 96 disparities: N=48, M=32, T=16. This way the search range is extended to 176 disparities, by sparse matching. Note: when enabling this flag only depth map will be affected, disparity map is not.
-
property
invalidDisparityValue
¶ Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly.
-
property
linearEquationParameters
¶ Cost calculation linear equation parameters.
-
class
-
class
MedianFilter
¶ Bases:
pybind11_builtins.pybind11_object
Median filter config
Members:
MEDIAN_OFF
KERNEL_3x3
KERNEL_5x5
KERNEL_7x7
Attributes:
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
PostProcessing
¶ Bases:
pybind11_builtins.pybind11_object
Post-processing filters, all the filters are applied in disparity domain.
Classes:
Brightness filtering.
Decimation filter.
1D edge-preserving spatial filter using high-order domain transform.
Speckle filtering.
Temporal filtering with optional persistence.
Threshold filtering.
Methods:
__init__
(self)Attributes:
Sigma value for bilateral filter.
Brightness filtering.
Decimation filter.
Set kernel size for disparity/depth median filtering, or disable
This type of filter will smooth the depth noise while attempting to preserve edges.
Speckle filtering.
Temporal filtering with optional persistence.
Threshold filtering.
-
class
BrightnessFilter
¶ Bases:
pybind11_builtins.pybind11_object
Brightness filtering. If input frame pixel is too dark or too bright, disparity will be invalidated. The idea is that for too dark/too bright pixels we have low confidence, since that area was under/over exposed and details were lost.
Methods:
__init__
(self)Attributes:
Maximum range in depth units.
Minimum pixel brightness.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.BrightnessFilter) → None¶
-
property
maxBrightness
¶ Maximum range in depth units. If input pixel is less or equal than this value the depth value is invalidated.
-
property
minBrightness
¶ Minimum pixel brightness. If input pixel is less or equal than this value the depth value is invalidated.
-
-
class
DecimationFilter
¶ Bases:
pybind11_builtins.pybind11_object
Decimation filter. Reduces the depth scene complexity. The filter runs on kernel sizes [2x2] to [8x8] pixels.
Classes:
Decimation algorithm type.
Methods:
__init__
(self)Attributes:
Decimation factor.
Decimation algorithm type.
-
class
DecimationMode
¶ Bases:
pybind11_builtins.pybind11_object
Decimation algorithm type.
Members:
PIXEL_SKIPPING :
NON_ZERO_MEDIAN :
NON_ZERO_MEAN :
Attributes:
Methods:
__init__
(self, value)-
NON_ZERO_MEAN
= <DecimationMode.NON_ZERO_MEAN: 2>¶
-
NON_ZERO_MEDIAN
= <DecimationMode.NON_ZERO_MEDIAN: 1>¶
-
PIXEL_SKIPPING
= <DecimationMode.PIXEL_SKIPPING: 0>¶
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.DecimationFilter) → None¶
-
property
decimationFactor
¶ Decimation factor. Valid values are 1,2,3,4. Disparity/depth map x/y resolution will be decimated with this value.
-
property
decimationMode
¶ Decimation algorithm type.
-
class
-
class
SpatialFilter
¶ Bases:
pybind11_builtins.pybind11_object
1D edge-preserving spatial filter using high-order domain transform.
Methods:
__init__
(self)Attributes:
The Alpha factor in an exponential moving average with Alpha=1 - no filter.
Step-size boundary.
Whether to enable or disable the filter.
An in-place heuristic symmetric hole-filling mode applied horizontally during the filter passes.
Number of iterations over the image in both horizontal and vertical direction.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.SpatialFilter) → None¶
-
property
alpha
¶ The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the amount of smoothing.
-
property
delta
¶ Step-size boundary. Establishes the threshold used to preserve “edges”. If the disparity value between neighboring pixels exceed the disparity threshold set by this delta parameter, then filtering will be temporarily disabled. Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode it’s 3*number of subpixel levels.
-
property
enable
¶ Whether to enable or disable the filter.
-
property
holeFillingRadius
¶ An in-place heuristic symmetric hole-filling mode applied horizontally during the filter passes. Intended to rectify minor artefacts with minimal performance impact. Search radius for hole filling.
-
property
numIterations
¶ Number of iterations over the image in both horizontal and vertical direction.
-
-
class
SpeckleFilter
¶ Bases:
pybind11_builtins.pybind11_object
Speckle filtering. Removes speckle noise.
Methods:
__init__
(self)Attributes:
Whether to enable or disable the filter.
Speckle search range.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.SpeckleFilter) → None¶
-
property
enable
¶ Whether to enable or disable the filter.
-
property
speckleRange
¶ Speckle search range.
-
-
class
TemporalFilter
¶ Bases:
pybind11_builtins.pybind11_object
Temporal filtering with optional persistence.
Classes:
Persistency algorithm type.
Methods:
__init__
(self)Attributes:
The Alpha factor in an exponential moving average with Alpha=1 - no filter.
Step-size boundary.
Whether to enable or disable the filter.
Persistency mode.
-
class
PersistencyMode
¶ Bases:
pybind11_builtins.pybind11_object
Persistency algorithm type.
Members:
PERSISTENCY_OFF :
VALID_8_OUT_OF_8 :
VALID_2_IN_LAST_3 :
VALID_2_IN_LAST_4 :
VALID_2_OUT_OF_8 :
VALID_1_IN_LAST_2 :
VALID_1_IN_LAST_5 :
VALID_1_IN_LAST_8 :
PERSISTENCY_INDEFINITELY :
Attributes:
Methods:
__init__
(self, value)-
PERSISTENCY_INDEFINITELY
= <PersistencyMode.PERSISTENCY_INDEFINITELY: 8>¶
-
PERSISTENCY_OFF
= <PersistencyMode.PERSISTENCY_OFF: 0>¶
-
VALID_1_IN_LAST_2
= <PersistencyMode.VALID_1_IN_LAST_2: 5>¶
-
VALID_1_IN_LAST_5
= <PersistencyMode.VALID_1_IN_LAST_5: 6>¶
-
VALID_1_IN_LAST_8
= <PersistencyMode.VALID_1_IN_LAST_8: 7>¶
-
VALID_2_IN_LAST_3
= <PersistencyMode.VALID_2_IN_LAST_3: 2>¶
-
VALID_2_IN_LAST_4
= <PersistencyMode.VALID_2_IN_LAST_4: 3>¶
-
VALID_2_OUT_OF_8
= <PersistencyMode.VALID_2_OUT_OF_8: 4>¶
-
VALID_8_OUT_OF_8
= <PersistencyMode.VALID_8_OUT_OF_8: 1>¶
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.TemporalFilter) → None¶
-
property
alpha
¶ The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the extent of the temporal history that should be averaged.
-
property
delta
¶ Step-size boundary. Establishes the threshold used to preserve surfaces (edges). If the disparity value between neighboring pixels exceed the disparity threshold set by this delta parameter, then filtering will be temporarily disabled. Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode it’s 3*number of subpixel levels.
-
property
enable
¶ Whether to enable or disable the filter.
-
property
persistencyMode
¶ Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
-
class
-
class
ThresholdFilter
¶ Bases:
pybind11_builtins.pybind11_object
Threshold filtering. Filters out distances outside of a given interval.
Methods:
__init__
(self)Attributes:
Maximum range in depth units.
Minimum range in depth units.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.ThresholdFilter) → None¶
-
property
maxRange
¶ Maximum range in depth units. Depth values over this value are invalidated.
-
property
minRange
¶ Minimum range in depth units. Depth values under this value are invalidated.
-
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing) → None¶
-
property
bilateralSigmaValue
¶ Sigma value for bilateral filter. 0 means disabled. A larger value of the parameter means that farther colors within the pixel neighborhood will be mixed together.
-
property
brightnessFilter
¶ Brightness filtering. If input frame pixel is too dark or too bright, disparity will be invalidated. The idea is that for too dark/too bright pixels we have low confidence, since that area was under/over exposed and details were lost.
-
property
decimationFilter
¶ Decimation filter. Reduces disparity/depth map x/y complexity, reducing runtime complexity for other filters.
-
property
median
¶ Set kernel size for disparity/depth median filtering, or disable
-
property
spatialFilter
¶ This type of filter will smooth the depth noise while attempting to preserve edges.
- Type
Edge-preserving filtering
-
property
speckleFilter
¶ Speckle filtering. Removes speckle noise.
-
property
temporalFilter
¶ Temporal filtering with optional persistence.
-
property
thresholdFilter
¶ Threshold filtering. Filters out distances outside of a given interval.
-
class
-
__init__
(self: depthai.RawStereoDepthConfig) → None¶
-
property
algorithmControl
¶ Controls the flow of stereo algorithm - left-right check, subpixel etc.
-
property
censusTransform
¶ Census transform settings.
-
property
costAggregation
¶ Cost aggregation settings.
-
property
costMatching
¶ Cost matching settings.
-
property
postProcessing
¶ Controls the postprocessing of disparity and/or depth map.
-
class
-
class
depthai.
RawSystemInformation
¶ Bases:
depthai.RawBuffer
System information of device
Memory usage, cpu usage and chip temperature
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawSystemInformation) → None¶
-
property
chipTemperature
¶
-
property
cmxMemoryUsage
¶
-
property
ddrMemoryUsage
¶
-
property
leonCssCpuUsage
¶
-
property
leonCssMemoryUsage
¶
-
property
leonMssCpuUsage
¶
-
property
leonMssMemoryUsage
¶
-
-
class
depthai.
RawToFConfig
¶ Bases:
depthai.RawBuffer
RawToFConfig configuration structure
Classes:
DepthParams configuration structure.
Methods:
__init__
(self)Attributes:
DepthParams configuration.
-
class
DepthParams
¶ Bases:
pybind11_builtins.pybind11_object
DepthParams configuration structure.
Classes:
Frequency modulation frames used for depth calculation.
Methods:
__init__
(self)Attributes:
Enable averaging between phases with same modulation frequency(e.g.
Set kernel size for depth median filtering, or disable
Perform depth calculation only for pixels with amplitude greater than provided value
-
class
TypeFMod
¶ Bases:
pybind11_builtins.pybind11_object
Frequency modulation frames used for depth calculation. If the ToF sensor supports multiple modulation frequencies, all will be used for depth calculation.
Members:
ALL
MIN
MAX
Attributes:
Methods:
__init__
(self, value)-
ALL
= <TypeFMod.ALL: 0>¶
-
MAX
= <TypeFMod.MAX: 2>¶
-
MIN
= <TypeFMod.MIN: 1>¶
-
__init__
(self: depthai.RawToFConfig.DepthParams.TypeFMod, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawToFConfig.DepthParams) → None¶
-
property
avgPhaseShuffle
¶ Enable averaging between phases with same modulation frequency(e.g. for ToF cameras with phase shuffle). The depth frame rate will be half if this is enabled
-
property
freqModUsed
¶
-
property
median
¶ Set kernel size for depth median filtering, or disable
-
property
minimumAmplitude
¶ Perform depth calculation only for pixels with amplitude greater than provided value
-
class
-
__init__
(self: depthai.RawToFConfig) → None¶
-
property
depthParams
¶ DepthParams configuration. Used for configuring the ToF.
-
class
-
class
depthai.
RawTrackedFeatures
¶ Bases:
depthai.RawBuffer
RawTrackedFeatures structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawTrackedFeatures) → None¶
-
property
trackedFeatures
¶
-
-
class
depthai.
RawTracklets
¶ Bases:
depthai.RawBuffer
RawTracklets structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawTracklets) → None¶
-
property
tracklets
¶
-
-
class
depthai.
Rect
¶ Bases:
pybind11_builtins.pybind11_object
Rect structure
x,y coordinates together with width and height that define a rectangle. Can be either normalized [0,1] or absolute representation.
Methods:
__init__
(*args, **kwargs)Overloaded function.
area
(self)Area (width*height) of the rectangle
bottomRight
(self)The bottom-right corner
contains
(self, arg0)Checks whether the rectangle contains the point.
denormalize
(self, width, height)Denormalize rectangle.
empty
(self)True if rectangle is empty.
isNormalized
(self)Whether rectangle is normalized (coordinates in [0,1] range) or not.
normalize
(self, width, height)Normalize rectangle.
size
(self)Size (width, height) of the rectangle
topLeft
(self)The top-left corner.
Attributes:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.Rect) -> None
__init__(self: depthai.Rect, arg0: float, arg1: float, arg2: float, arg3: float) -> None
__init__(self: depthai.Rect, arg0: depthai.Point2f, arg1: depthai.Point2f) -> None
__init__(self: depthai.Rect, arg0: depthai.Point2f, arg1: depthai.Size2f) -> None
-
area
(self: depthai.Rect) → float¶ Area (width*height) of the rectangle
-
bottomRight
(self: depthai.Rect) → depthai.Point2f¶ The bottom-right corner
-
contains
(self: depthai.Rect, arg0: depthai.Point2f) → bool¶ Checks whether the rectangle contains the point.
-
denormalize
(self: depthai.Rect, width: int, height: int) → depthai.Rect¶ Denormalize rectangle.
- Parameter
destWidth
: Destination frame width.
- Parameter
destHeight
: Destination frame height.
- Parameter
-
empty
(self: depthai.Rect) → bool¶ True if rectangle is empty.
-
property
height
¶
-
isNormalized
(self: depthai.Rect) → bool¶ Whether rectangle is normalized (coordinates in [0,1] range) or not.
-
normalize
(self: depthai.Rect, width: int, height: int) → depthai.Rect¶ Normalize rectangle.
- Parameter
srcWidth
: Source frame width.
- Parameter
srcHeight
: Source frame height.
- Parameter
-
size
(self: depthai.Rect) → depthai.Size2f¶ Size (width, height) of the rectangle
-
topLeft
(self: depthai.Rect) → depthai.Point2f¶ The top-left corner.
-
property
width
¶
-
property
x
¶
-
property
y
¶
-
-
class
depthai.
RotatedRect
¶ Bases:
pybind11_builtins.pybind11_object
RotatedRect structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RotatedRect) → None¶
-
property
angle
¶
-
property
center
¶
-
property
size
¶
-
-
class
depthai.
SPIInProperties
¶ Bases:
pybind11_builtins.pybind11_object
Properties for SPIIn node
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
busId
¶
-
property
maxDataSize
¶
-
property
numFrames
¶
-
property
streamName
¶
-
-
class
depthai.
SPIOutProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for SPIOut node
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
busId
¶
-
property
streamName
¶
-
-
class
depthai.
ScriptProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify ScriptProperties options such as script uri, script name, …
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Which processor should execute the script
Name of script
Uri which points to actual script
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
processor
¶ Which processor should execute the script
-
property
scriptName
¶ Name of script
-
property
scriptUri
¶ Uri which points to actual script
-
-
class
depthai.
SerializationType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
LIBNOP
JSON
JSON_MSGPACK
Attributes:
Methods:
__init__
(self, value)-
JSON
= <SerializationType.JSON: 1>¶
-
JSON_MSGPACK
= <SerializationType.JSON_MSGPACK: 2>¶
-
LIBNOP
= <SerializationType.LIBNOP: 0>¶
-
__init__
(self: depthai.SerializationType, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
Size2f
¶ Bases:
pybind11_builtins.pybind11_object
Size2f structure
width, height values define the size of the shape/frame
Methods:
__init__
(*args, **kwargs)Overloaded function.
Attributes:
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.Size2f) -> None
__init__(self: depthai.Size2f, arg0: float, arg1: float) -> None
-
property
height
¶
-
property
width
¶
-
-
class
depthai.
SpatialDetectionNetworkProperties
¶ Bases:
depthai.DetectionNetworkProperties
Specify properties for SpatialDetectionNetwork
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
depthThresholds
¶
-
property
detectedBBScaleFactor
¶
-
-
class
depthai.
SpatialImgDetection
¶ Bases:
depthai.ImgDetection
SpatialImgDetection structure
Contains image detection results together with spatial location data.
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.SpatialImgDetection) → None¶
-
property
boundingBoxMapping
¶
-
property
spatialCoordinates
¶
-
-
class
depthai.
SpatialImgDetections
¶ Bases:
depthai.Buffer
SpatialImgDetections message. Carries detection results together with spatial location data
Methods:
__init__
(self)getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
Attributes:
-
__init__
(self: depthai.SpatialImgDetections) → None¶
-
property
detections
¶
-
getSequenceNum
(self: depthai.SpatialImgDetections) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.SpatialImgDetections) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.SpatialImgDetections) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setSequenceNum
(self: depthai.SpatialImgDetections, arg0: int) → depthai.SpatialImgDetections¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.SpatialImgDetections, arg0: datetime.timedelta) → depthai.SpatialImgDetections¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.SpatialImgDetections, arg0: datetime.timedelta) → depthai.SpatialImgDetections¶ Sets image timestamp related to dai::Clock::now()
-
-
class
depthai.
SpatialLocationCalculatorAlgorithm
¶ Bases:
pybind11_builtins.pybind11_object
SpatialLocationCalculatorAlgorithm configuration modes
Contains calculation method used to obtain spatial locations.
Members:
AVERAGE
MEAN
MIN
MAX
MODE
MEDIAN
Attributes:
Methods:
__init__
(self, value)-
AVERAGE
= <SpatialLocationCalculatorAlgorithm.AVERAGE: 0>¶
-
MAX
= <SpatialLocationCalculatorAlgorithm.MAX: 2>¶
-
MEAN
= <SpatialLocationCalculatorAlgorithm.AVERAGE: 0>¶
-
MEDIAN
= <SpatialLocationCalculatorAlgorithm.MEDIAN: 4>¶
-
MIN
= <SpatialLocationCalculatorAlgorithm.MIN: 1>¶
-
MODE
= <SpatialLocationCalculatorAlgorithm.MODE: 3>¶
-
__init__
(self: depthai.SpatialLocationCalculatorAlgorithm, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
SpatialLocationCalculatorConfig
¶ Bases:
depthai.Buffer
SpatialLocationCalculatorConfig message. Carries ROI (region of interest) and threshold for depth calculation
Methods:
__init__
(self)addROI
(self, ROI)Add a new ROI to configuration data.
get
(self)Retrieve configuration data for SpatialLocationCalculator.
getConfigData
(self)Retrieve configuration data for SpatialLocationCalculator
set
(self, config)Set explicit configuration.
setROIs
(self, ROIs)Set a vector of ROIs as configuration data.
-
__init__
(self: depthai.SpatialLocationCalculatorConfig) → None¶
-
addROI
(self: depthai.SpatialLocationCalculatorConfig, ROI: depthai.SpatialLocationCalculatorConfigData) → None¶ Add a new ROI to configuration data.
- Parameter
roi
: Configuration parameters for ROI (region of interest)
- Parameter
-
get
(self: depthai.SpatialLocationCalculatorConfig) → dai::RawSpatialLocationCalculatorConfig¶ Retrieve configuration data for SpatialLocationCalculator.
- Returns
config for SpatialLocationCalculator
-
getConfigData
(self: depthai.SpatialLocationCalculatorConfig) → List[depthai.SpatialLocationCalculatorConfigData]¶ Retrieve configuration data for SpatialLocationCalculator
- Returns
Vector of configuration parameters for ROIs (region of interests)
-
set
(self: depthai.SpatialLocationCalculatorConfig, config: dai::RawSpatialLocationCalculatorConfig) → depthai.SpatialLocationCalculatorConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setROIs
(self: depthai.SpatialLocationCalculatorConfig, ROIs: List[depthai.SpatialLocationCalculatorConfigData]) → None¶ Set a vector of ROIs as configuration data.
- Parameter
ROIs
: Vector of configuration parameters for ROIs (region of interests)
- Parameter
-
-
class
depthai.
SpatialLocationCalculatorConfigData
¶ Bases:
pybind11_builtins.pybind11_object
SpatialLocation configuration data structure
Methods:
__init__
(self)Attributes:
the average of ROI is used for calculation.
Upper and lower thresholds for depth values to take into consideration.
Region of interest for spatial location calculation.
-
__init__
(self: depthai.SpatialLocationCalculatorConfigData) → None¶
-
property
calculationAlgorithm
¶ the average of ROI is used for calculation. Min: the minimum value inside ROI is used for calculation. Max: the maximum value inside ROI is used for calculation. Mode: the most frequent value inside ROI is used for calculation. Median: the median value inside ROI is used for calculation. Default: median.
- Type
Calculation method used to obtain spatial locations Average/mean
-
property
depthThresholds
¶ Upper and lower thresholds for depth values to take into consideration.
-
property
roi
¶ Region of interest for spatial location calculation.
-
-
class
depthai.
SpatialLocationCalculatorConfigThresholds
¶ Bases:
pybind11_builtins.pybind11_object
SpatialLocation configuration thresholds structure
Contains configuration data for lower and upper threshold in depth units (millimeter by default) for ROI. Values outside of threshold range will be ignored when calculating spatial coordinates from depth map.
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.SpatialLocationCalculatorConfigThresholds) → None¶
-
property
lowerThreshold
¶
-
property
upperThreshold
¶
-
-
class
depthai.
SpatialLocationCalculatorData
¶ Bases:
depthai.Buffer
SpatialLocationCalculatorData message. Carries spatial information (X,Y,Z) and their configuration parameters
Methods:
__init__
(self)getSequenceNum
(self)Retrieves sequence number
getSpatialLocations
(self)Retrieve configuration data for SpatialLocationCalculatorData.
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
Attributes:
-
__init__
(self: depthai.SpatialLocationCalculatorData) → None¶
-
getSequenceNum
(self: depthai.SpatialLocationCalculatorData) → int¶ Retrieves sequence number
-
getSpatialLocations
(self: depthai.SpatialLocationCalculatorData) → List[depthai.SpatialLocations]¶ Retrieve configuration data for SpatialLocationCalculatorData.
- Returns
Vector of spatial location data, carrying spatial information (X,Y,Z)
-
getTimestamp
(self: depthai.SpatialLocationCalculatorData) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.SpatialLocationCalculatorData) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setSequenceNum
(self: depthai.SpatialLocationCalculatorData, arg0: int) → depthai.SpatialLocationCalculatorData¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.SpatialLocationCalculatorData, arg0: datetime.timedelta) → depthai.SpatialLocationCalculatorData¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.SpatialLocationCalculatorData, arg0: datetime.timedelta) → depthai.SpatialLocationCalculatorData¶ Sets image timestamp related to dai::Clock::now()
-
property
spatialLocations
¶
-
-
class
depthai.
SpatialLocationCalculatorProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for SpatialLocationCalculator
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
roiConfig
¶
-
-
class
depthai.
SpatialLocations
¶ Bases:
pybind11_builtins.pybind11_object
SpatialLocations structure
Contains configuration data, average depth for the calculated ROI on depth map. Together with spatial coordinates: x,y,z relative to the center of depth map. Units are in depth units (millimeter by default).
Methods:
__init__
(self)Attributes:
Configuration for selected ROI
Average of depth values inside the ROI between the specified thresholds in config.
Number of depth values used in calculations.
Maximum of depth values inside the ROI between the specified thresholds in config.
Median of depth values inside the ROI between the specified thresholds in config.
Minimum of depth values inside the ROI between the specified thresholds in config.
Most frequent of depth values inside the ROI between the specified thresholds in config.
Spatial coordinates - x,y,z; x,y are the relative positions of the center of ROI to the center of depth map
-
__init__
(self: depthai.SpatialLocations) → None¶
-
property
config
¶ Configuration for selected ROI
-
property
depthAverage
¶ Average of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to AVERAGE or MIN oR MAX.
-
property
depthAveragePixelCount
¶ Number of depth values used in calculations.
-
property
depthMax
¶ Maximum of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to AVERAGE or MIN oR MAX.
-
property
depthMedian
¶ Median of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to MEDIAN.
-
property
depthMin
¶ Minimum of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to AVERAGE or MIN oR MAX.
-
property
depthMode
¶ Most frequent of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to MODE.
-
property
spatialCoordinates
¶ Spatial coordinates - x,y,z; x,y are the relative positions of the center of ROI to the center of depth map
-
-
class
depthai.
StereoDepthConfig
¶ Bases:
depthai.Buffer
StereoDepthConfig message.
Classes:
The basic cost function used by the Stereo Accelerator for matching the left and right images is the Census Transform.
Cost Aggregation is based on Semi Global Block Matching (SGBM).
The matching cost is way of measuring the similarity of image locations in stereo correspondence algorithm.
Median filter config
Post-processing filters, all the filters are applied in disparity domain.
Methods:
__init__
(self)get
(self)Retrieve configuration data for StereoDepth.
getBilateralFilterSigma
(self)Get sigma value for 5x5 bilateral filter
getConfidenceThreshold
(self)Get confidence threshold for disparity calculation
getDepthUnit
(self)Get depth unit of depth map.
Get threshold for left-right check combine
getMaxDisparity
(self)Useful for normalization of the disparity map.
getMedianFilter
(self)Get median filter setting
set
(self, config)Set explicit configuration.
setBilateralFilterSigma
(self, sigma)A larger value of the parameter means that farther colors within the pixel neighborhood will be mixed together, resulting in larger areas of semi-equal color.
setConfidenceThreshold
(self, confThr)Confidence threshold for disparity calculation
setDepthAlign
(self, align)Parameter
align
:setDepthUnit
(self, arg0)Set depth unit of depth map.
setDisparityShift
(self, arg0)Shift input frame by a number of pixels to increase minimum depth.
setExtendedDisparity
(self, enable)Disparity range increased from 95 to 190, combined from full resolution and downscaled images.
setLeftRightCheck
(self, enable)Computes and combines disparities in both L-R and R-L directions, and combine them.
setLeftRightCheckThreshold
(self, sigma)Parameter
threshold
:setMedianFilter
(self, median)Parameter
median
:setNumInvalidateEdgePixels
(self, arg0)Invalidate X amount of pixels at the edge of disparity frame.
setSubpixel
(self, enable)Computes disparity with sub-pixel interpolation (3 fractional bits by default).
setSubpixelFractionalBits
(self, …)Number of fractional bits for subpixel mode.
-
class
AlgorithmControl
¶ Bases:
pybind11_builtins.pybind11_object
Classes:
Align the disparity/depth to the perspective of a rectified output, or center it
Measurement unit for depth data
Methods:
__init__
(self)Attributes:
Used only for debug purposes.
Custom depth unit multiplier, if custom depth unit is enabled, relative to 1 meter.
Set the disparity/depth alignment to the perspective of a rectified output, or center it
Measurement unit for depth data.
Shift input frame by a number of pixels to increase minimum depth.
Disparity range increased from 95 to 190, combined from full resolution and downscaled images.
Computes and combines disparities in both L-R and R-L directions, and combine them.
Computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
Left-right check threshold for left-right, right-left disparity map combine, 0..128 Used only when left-right check mode is enabled.
Invalidate X amount of pixels at the edge of disparity frame.
Number of fractional bits for subpixel mode
-
class
DepthAlign
¶ Bases:
pybind11_builtins.pybind11_object
Align the disparity/depth to the perspective of a rectified output, or center it
Members:
RECTIFIED_RIGHT :
RECTIFIED_LEFT :
CENTER :
Attributes:
Methods:
__init__
(self, value)-
CENTER
= <DepthAlign.CENTER: 2>¶
-
RECTIFIED_LEFT
= <DepthAlign.RECTIFIED_LEFT: 1>¶
-
RECTIFIED_RIGHT
= <DepthAlign.RECTIFIED_RIGHT: 0>¶
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl.DepthAlign, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
DepthUnit
¶ Bases:
pybind11_builtins.pybind11_object
Measurement unit for depth data
Members:
METER :
CENTIMETER :
MILLIMETER :
INCH :
FOOT :
CUSTOM :
Attributes:
Methods:
__init__
(self, value)-
CENTIMETER
= <DepthUnit.CENTIMETER: 1>¶
-
CUSTOM
= <DepthUnit.CUSTOM: 5>¶
-
FOOT
= <DepthUnit.FOOT: 4>¶
-
INCH
= <DepthUnit.INCH: 3>¶
-
METER
= <DepthUnit.METER: 0>¶
-
MILLIMETER
= <DepthUnit.MILLIMETER: 2>¶
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl.DepthUnit, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl) → None¶
-
property
centerAlignmentShiftFactor
¶ Used only for debug purposes. centerAlignmentShiftFactor is set automatically in firmware, from camera extrinsics when depth alignment to camera is enabled. Center alignment is achieved by shifting the obtained disparity map by a scale factor. It’s used to align to a different camera that is on the same horizontal baseline as the two stereo cameras. E.g. if we have a device with 10 cm stereo baseline, and we have another camera inbetween, 9cm from the LEFT camera and 1 cm from the RIGHT camera we can align the obtained disparity map using a scale factor of 0.9. Note that aligning disparity map to a different camera involves 2 steps: 1. Shifting obtained disparity map. 2. Warping the image to counter rotate and scaling to match the FOV. Center alignment factor 1 is equivalent to RECTIFIED_RIGHT Center alignment factor 0 is equivalent to RECTIFIED_LEFT
-
property
customDepthUnitMultiplier
¶ Custom depth unit multiplier, if custom depth unit is enabled, relative to 1 meter. A multiplier of 1000 effectively means depth unit in millimeter.
-
property
depthAlign
¶ Set the disparity/depth alignment to the perspective of a rectified output, or center it
-
property
depthUnit
¶ Measurement unit for depth data. Depth data is integer value, multiple of depth unit.
-
property
disparityShift
¶ Shift input frame by a number of pixels to increase minimum depth. For example shifting by 48 will change effective disparity search range from (0,95] to [48,143]. An alternative approach to reducing the minZ. We normally only recommend doing this when it is known that there will be no objects farther away than MaxZ, such as having a depth camera mounted above a table pointing down at the table surface.
-
property
enableExtended
¶ Disparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
-
property
enableLeftRightCheck
¶ Computes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling
-
property
enableSubpixel
¶ Computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
-
property
leftRightCheckThreshold
¶ Left-right check threshold for left-right, right-left disparity map combine, 0..128 Used only when left-right check mode is enabled. Defines the maximum difference between the confidence of pixels from left-right and right-left confidence maps
-
property
numInvalidateEdgePixels
¶ Invalidate X amount of pixels at the edge of disparity frame. For right and center alignment X pixels will be invalidated from the right edge, for left alignment from the left edge.
-
property
subpixelFractionalBits
¶ Number of fractional bits for subpixel mode
Valid values: 3,4,5
Defines the number of fractional disparities: 2^x
Median filter postprocessing is supported only for 3 fractional bits
-
class
-
class
CensusTransform
¶ Bases:
pybind11_builtins.pybind11_object
The basic cost function used by the Stereo Accelerator for matching the left and right images is the Census Transform. It works on a block of pixels and computes a bit vector which represents the structure of the image in that block. There are two types of Census Transform based on how the middle pixel is used: Classic Approach and Modified Census. The comparisons that are made between pixels can be or not thresholded. In some cases a mask can be applied to filter out only specific bits from the entire bit stream. All these approaches are: Classic Approach: Uses middle pixel to compare against all its neighbors over a defined window. Each comparison results in a new bit, that is 0 if central pixel is smaller, or 1 if is it bigger than its neighbor. Modified Census Transform: same as classic Census Transform, but instead of comparing central pixel with its neighbors, the window mean will be compared with each pixel over the window. Thresholding Census Transform: same as classic Census Transform, but it is not enough that a neighbor pixel to be bigger than the central pixel, it must be significant bigger (based on a threshold). Census Transform with Mask: same as classic Census Transform, but in this case not all of the pixel from the support window are part of the binary descriptor. We use a ma sk “M” to define which pixels are part of the binary descriptor (1), and which pixels should be skipped (0).
Classes:
Census transform kernel size possible values.
Methods:
__init__
(self)Attributes:
If enabled, each pixel in the window is compared with the mean window value instead of the central pixel.
Census transform mask, default - auto, mask is set based on resolution and kernel size.
Census transform kernel size.
Census transform comparison threshold value.
-
class
KernelSize
¶ Bases:
pybind11_builtins.pybind11_object
Census transform kernel size possible values.
Members:
AUTO :
KERNEL_5x5 :
KERNEL_7x7 :
KERNEL_7x9 :
Attributes:
Methods:
__init__
(self, value)-
AUTO
= <KernelSize.AUTO: -1>¶
-
KERNEL_5x5
= <KernelSize.KERNEL_5x5: 0>¶
-
KERNEL_7x7
= <KernelSize.KERNEL_7x7: 1>¶
-
KERNEL_7x9
= <KernelSize.KERNEL_7x9: 2>¶
-
__init__
(self: depthai.RawStereoDepthConfig.CensusTransform.KernelSize, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.CensusTransform) → None¶
-
property
enableMeanMode
¶ If enabled, each pixel in the window is compared with the mean window value instead of the central pixel.
-
property
kernelMask
¶ Census transform mask, default - auto, mask is set based on resolution and kernel size. Disabled for 400p input resolution. Enabled for 720p. 0XA82415 for 5x5 census transform kernel. 0XAA02A8154055 for 7x7 census transform kernel. 0X2AA00AA805540155 for 7x9 census transform kernel. Empirical values.
-
property
kernelSize
¶ Census transform kernel size.
-
property
threshold
¶ Census transform comparison threshold value.
-
class
-
class
CostAggregation
¶ Bases:
pybind11_builtins.pybind11_object
Cost Aggregation is based on Semi Global Block Matching (SGBM). This algorithm uses a semi global technique to aggregate the cost map. Ultimately the idea is to build inertia into the stereo algorithm. If a pixel has very little texture information, then odds are the correct disparity for this pixel is close to that of the previous pixel considered. This means that we get improved results in areas with low texture.
Methods:
__init__
(self)Attributes:
Cost calculation linear equation parameters.
Horizontal P1 penalty cost parameter.
Horizontal P2 penalty cost parameter.
Vertical P1 penalty cost parameter.
Vertical P2 penalty cost parameter.
-
__init__
(self: depthai.RawStereoDepthConfig.CostAggregation) → None¶
-
property
divisionFactor
¶ Cost calculation linear equation parameters.
-
property
horizontalPenaltyCostP1
¶ Horizontal P1 penalty cost parameter.
-
property
horizontalPenaltyCostP2
¶ Horizontal P2 penalty cost parameter.
-
property
verticalPenaltyCostP1
¶ Vertical P1 penalty cost parameter.
-
property
verticalPenaltyCostP2
¶ Vertical P2 penalty cost parameter.
-
-
class
CostMatching
¶ Bases:
pybind11_builtins.pybind11_object
The matching cost is way of measuring the similarity of image locations in stereo correspondence algorithm. Based on the configuration parameters and based on the descriptor type, a linear equation is applied to computing the cost for each candidate disparity at each pixel.
Classes:
Disparity search range: 64 or 96 pixels are supported by the HW.
The linear equation applied for computing the cost is: COMB_COST = α*AD + β*(CTC<<3).
Methods:
__init__
(self)Attributes:
Disparities with confidence value under this threshold are accepted.
Disparity search range, default 96 pixels.
Disparity companding using sparse matching.
Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly.
Cost calculation linear equation parameters.
-
class
DisparityWidth
¶ Bases:
pybind11_builtins.pybind11_object
Disparity search range: 64 or 96 pixels are supported by the HW.
Members:
DISPARITY_64 :
DISPARITY_96 :
Attributes:
Methods:
__init__
(self, value)-
DISPARITY_64
= <DisparityWidth.DISPARITY_64: 0>¶
-
DISPARITY_96
= <DisparityWidth.DISPARITY_96: 1>¶
-
__init__
(self: depthai.RawStereoDepthConfig.CostMatching.DisparityWidth, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
LinearEquationParameters
¶ Bases:
pybind11_builtins.pybind11_object
The linear equation applied for computing the cost is: COMB_COST = α*AD + β*(CTC<<3). CLAMP(COMB_COST >> 5, threshold). Where AD is the Absolute Difference between 2 pixels values. CTC is the Census Transform Cost between 2 pixels, based on Hamming distance (xor). The α and β parameters are subject to fine tuning by the user.
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.RawStereoDepthConfig.CostMatching.LinearEquationParameters) → None¶
-
property
alpha
¶
-
property
beta
¶
-
property
threshold
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.CostMatching) → None¶
-
property
confidenceThreshold
¶ Disparities with confidence value under this threshold are accepted. Higher confidence threshold means disparities with less confidence are accepted too.
-
property
disparityWidth
¶ Disparity search range, default 96 pixels.
-
property
enableCompanding
¶ Disparity companding using sparse matching. Matching pixel by pixel for N disparities. Matching every 2nd pixel for M disparitites. Matching every 4th pixel for T disparities. In case of 96 disparities: N=48, M=32, T=16. This way the search range is extended to 176 disparities, by sparse matching. Note: when enabling this flag only depth map will be affected, disparity map is not.
-
property
invalidDisparityValue
¶ Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly.
-
property
linearEquationParameters
¶ Cost calculation linear equation parameters.
-
class
-
class
MedianFilter
¶ Bases:
pybind11_builtins.pybind11_object
Median filter config
Members:
MEDIAN_OFF
KERNEL_3x3
KERNEL_5x5
KERNEL_7x7
Attributes:
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
PostProcessing
¶ Bases:
pybind11_builtins.pybind11_object
Post-processing filters, all the filters are applied in disparity domain.
Classes:
Brightness filtering.
Decimation filter.
1D edge-preserving spatial filter using high-order domain transform.
Speckle filtering.
Temporal filtering with optional persistence.
Threshold filtering.
Methods:
__init__
(self)Attributes:
Sigma value for bilateral filter.
Brightness filtering.
Decimation filter.
Set kernel size for disparity/depth median filtering, or disable
This type of filter will smooth the depth noise while attempting to preserve edges.
Speckle filtering.
Temporal filtering with optional persistence.
Threshold filtering.
-
class
BrightnessFilter
¶ Bases:
pybind11_builtins.pybind11_object
Brightness filtering. If input frame pixel is too dark or too bright, disparity will be invalidated. The idea is that for too dark/too bright pixels we have low confidence, since that area was under/over exposed and details were lost.
Methods:
__init__
(self)Attributes:
Maximum range in depth units.
Minimum pixel brightness.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.BrightnessFilter) → None¶
-
property
maxBrightness
¶ Maximum range in depth units. If input pixel is less or equal than this value the depth value is invalidated.
-
property
minBrightness
¶ Minimum pixel brightness. If input pixel is less or equal than this value the depth value is invalidated.
-
-
class
DecimationFilter
¶ Bases:
pybind11_builtins.pybind11_object
Decimation filter. Reduces the depth scene complexity. The filter runs on kernel sizes [2x2] to [8x8] pixels.
Classes:
Decimation algorithm type.
Methods:
__init__
(self)Attributes:
Decimation factor.
Decimation algorithm type.
-
class
DecimationMode
¶ Bases:
pybind11_builtins.pybind11_object
Decimation algorithm type.
Members:
PIXEL_SKIPPING :
NON_ZERO_MEDIAN :
NON_ZERO_MEAN :
Attributes:
Methods:
__init__
(self, value)-
NON_ZERO_MEAN
= <DecimationMode.NON_ZERO_MEAN: 2>¶
-
NON_ZERO_MEDIAN
= <DecimationMode.NON_ZERO_MEDIAN: 1>¶
-
PIXEL_SKIPPING
= <DecimationMode.PIXEL_SKIPPING: 0>¶
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.DecimationFilter) → None¶
-
property
decimationFactor
¶ Decimation factor. Valid values are 1,2,3,4. Disparity/depth map x/y resolution will be decimated with this value.
-
property
decimationMode
¶ Decimation algorithm type.
-
class
-
class
SpatialFilter
¶ Bases:
pybind11_builtins.pybind11_object
1D edge-preserving spatial filter using high-order domain transform.
Methods:
__init__
(self)Attributes:
The Alpha factor in an exponential moving average with Alpha=1 - no filter.
Step-size boundary.
Whether to enable or disable the filter.
An in-place heuristic symmetric hole-filling mode applied horizontally during the filter passes.
Number of iterations over the image in both horizontal and vertical direction.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.SpatialFilter) → None¶
-
property
alpha
¶ The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the amount of smoothing.
-
property
delta
¶ Step-size boundary. Establishes the threshold used to preserve “edges”. If the disparity value between neighboring pixels exceed the disparity threshold set by this delta parameter, then filtering will be temporarily disabled. Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode it’s 3*number of subpixel levels.
-
property
enable
¶ Whether to enable or disable the filter.
-
property
holeFillingRadius
¶ An in-place heuristic symmetric hole-filling mode applied horizontally during the filter passes. Intended to rectify minor artefacts with minimal performance impact. Search radius for hole filling.
-
property
numIterations
¶ Number of iterations over the image in both horizontal and vertical direction.
-
-
class
SpeckleFilter
¶ Bases:
pybind11_builtins.pybind11_object
Speckle filtering. Removes speckle noise.
Methods:
__init__
(self)Attributes:
Whether to enable or disable the filter.
Speckle search range.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.SpeckleFilter) → None¶
-
property
enable
¶ Whether to enable or disable the filter.
-
property
speckleRange
¶ Speckle search range.
-
-
class
TemporalFilter
¶ Bases:
pybind11_builtins.pybind11_object
Temporal filtering with optional persistence.
Classes:
Persistency algorithm type.
Methods:
__init__
(self)Attributes:
The Alpha factor in an exponential moving average with Alpha=1 - no filter.
Step-size boundary.
Whether to enable or disable the filter.
Persistency mode.
-
class
PersistencyMode
¶ Bases:
pybind11_builtins.pybind11_object
Persistency algorithm type.
Members:
PERSISTENCY_OFF :
VALID_8_OUT_OF_8 :
VALID_2_IN_LAST_3 :
VALID_2_IN_LAST_4 :
VALID_2_OUT_OF_8 :
VALID_1_IN_LAST_2 :
VALID_1_IN_LAST_5 :
VALID_1_IN_LAST_8 :
PERSISTENCY_INDEFINITELY :
Attributes:
Methods:
__init__
(self, value)-
PERSISTENCY_INDEFINITELY
= <PersistencyMode.PERSISTENCY_INDEFINITELY: 8>¶
-
PERSISTENCY_OFF
= <PersistencyMode.PERSISTENCY_OFF: 0>¶
-
VALID_1_IN_LAST_2
= <PersistencyMode.VALID_1_IN_LAST_2: 5>¶
-
VALID_1_IN_LAST_5
= <PersistencyMode.VALID_1_IN_LAST_5: 6>¶
-
VALID_1_IN_LAST_8
= <PersistencyMode.VALID_1_IN_LAST_8: 7>¶
-
VALID_2_IN_LAST_3
= <PersistencyMode.VALID_2_IN_LAST_3: 2>¶
-
VALID_2_IN_LAST_4
= <PersistencyMode.VALID_2_IN_LAST_4: 3>¶
-
VALID_2_OUT_OF_8
= <PersistencyMode.VALID_2_OUT_OF_8: 4>¶
-
VALID_8_OUT_OF_8
= <PersistencyMode.VALID_8_OUT_OF_8: 1>¶
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.TemporalFilter) → None¶
-
property
alpha
¶ The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the extent of the temporal history that should be averaged.
-
property
delta
¶ Step-size boundary. Establishes the threshold used to preserve surfaces (edges). If the disparity value between neighboring pixels exceed the disparity threshold set by this delta parameter, then filtering will be temporarily disabled. Default value 0 means auto: 3 disparity integer levels. In case of subpixel mode it’s 3*number of subpixel levels.
-
property
enable
¶ Whether to enable or disable the filter.
-
property
persistencyMode
¶ Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
-
class
-
class
ThresholdFilter
¶ Bases:
pybind11_builtins.pybind11_object
Threshold filtering. Filters out distances outside of a given interval.
Methods:
__init__
(self)Attributes:
Maximum range in depth units.
Minimum range in depth units.
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing.ThresholdFilter) → None¶
-
property
maxRange
¶ Maximum range in depth units. Depth values over this value are invalidated.
-
property
minRange
¶ Minimum range in depth units. Depth values under this value are invalidated.
-
-
__init__
(self: depthai.RawStereoDepthConfig.PostProcessing) → None¶
-
property
bilateralSigmaValue
¶ Sigma value for bilateral filter. 0 means disabled. A larger value of the parameter means that farther colors within the pixel neighborhood will be mixed together.
-
property
brightnessFilter
¶ Brightness filtering. If input frame pixel is too dark or too bright, disparity will be invalidated. The idea is that for too dark/too bright pixels we have low confidence, since that area was under/over exposed and details were lost.
-
property
decimationFilter
¶ Decimation filter. Reduces disparity/depth map x/y complexity, reducing runtime complexity for other filters.
-
property
median
¶ Set kernel size for disparity/depth median filtering, or disable
-
property
spatialFilter
¶ This type of filter will smooth the depth noise while attempting to preserve edges.
- Type
Edge-preserving filtering
-
property
speckleFilter
¶ Speckle filtering. Removes speckle noise.
-
property
temporalFilter
¶ Temporal filtering with optional persistence.
-
property
thresholdFilter
¶ Threshold filtering. Filters out distances outside of a given interval.
-
class
-
__init__
(self: depthai.StereoDepthConfig) → None¶
-
get
(self: depthai.StereoDepthConfig) → depthai.RawStereoDepthConfig¶ Retrieve configuration data for StereoDepth.
- Returns
config for stereo depth algorithm
-
getBilateralFilterSigma
(self: depthai.StereoDepthConfig) → int¶ Get sigma value for 5x5 bilateral filter
-
getConfidenceThreshold
(self: depthai.StereoDepthConfig) → int¶ Get confidence threshold for disparity calculation
-
getDepthUnit
(self: depthai.StereoDepthConfig) → depthai.RawStereoDepthConfig.AlgorithmControl.DepthUnit¶ Get depth unit of depth map.
-
getLeftRightCheckThreshold
(self: depthai.StereoDepthConfig) → int¶ Get threshold for left-right check combine
-
getMaxDisparity
(self: depthai.StereoDepthConfig) → float¶ Useful for normalization of the disparity map.
- Returns
Maximum disparity value that the node can return
-
getMedianFilter
(self: depthai.StereoDepthConfig) → depthai.MedianFilter¶ Get median filter setting
-
set
(self: depthai.StereoDepthConfig, config: depthai.RawStereoDepthConfig) → depthai.StereoDepthConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setBilateralFilterSigma
(self: depthai.StereoDepthConfig, sigma: int) → depthai.StereoDepthConfig¶ A larger value of the parameter means that farther colors within the pixel neighborhood will be mixed together, resulting in larger areas of semi-equal color.
- Parameter
sigma
: Set sigma value for 5x5 bilateral filter. 0..65535
- Parameter
-
setConfidenceThreshold
(self: depthai.StereoDepthConfig, confThr: int) → depthai.StereoDepthConfig¶ Confidence threshold for disparity calculation
- Parameter
confThr
: Confidence threshold value 0..255
- Parameter
-
setDepthAlign
(self: depthai.StereoDepthConfig, align: depthai.RawStereoDepthConfig.AlgorithmControl.DepthAlign) → depthai.StereoDepthConfig¶ - Parameter
align
: Set the disparity/depth alignment: centered (between the ‘left’ and ‘right’ inputs), or from the perspective of a rectified output stream
- Parameter
-
setDepthUnit
(self: depthai.StereoDepthConfig, arg0: depthai.RawStereoDepthConfig.AlgorithmControl.DepthUnit) → depthai.StereoDepthConfig¶ Set depth unit of depth map.
Meter, centimeter, millimeter, inch, foot or custom unit is available.
-
setDisparityShift
(self: depthai.StereoDepthConfig, arg0: int) → depthai.StereoDepthConfig¶ Shift input frame by a number of pixels to increase minimum depth. For example shifting by 48 will change effective disparity search range from (0,95] to [48,143]. An alternative approach to reducing the minZ. We normally only recommend doing this when it is known that there will be no objects farther away than MaxZ, such as having a depth camera mounted above a table pointing down at the table surface.
-
setExtendedDisparity
(self: depthai.StereoDepthConfig, enable: bool) → depthai.StereoDepthConfig¶ Disparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
-
setLeftRightCheck
(self: depthai.StereoDepthConfig, enable: bool) → depthai.StereoDepthConfig¶ Computes and combines disparities in both L-R and R-L directions, and combine them.
For better occlusion handling, discarding invalid disparity values
-
setLeftRightCheckThreshold
(self: depthai.StereoDepthConfig, sigma: int) → depthai.StereoDepthConfig¶ - Parameter
threshold
: Set threshold for left-right, right-left disparity map combine, 0..255
- Parameter
-
setMedianFilter
(self: depthai.StereoDepthConfig, median: depthai.MedianFilter) → depthai.StereoDepthConfig¶ - Parameter
median
: Set kernel size for disparity/depth median filtering, or disable
- Parameter
-
setNumInvalidateEdgePixels
(self: depthai.StereoDepthConfig, arg0: int) → depthai.StereoDepthConfig¶ Invalidate X amount of pixels at the edge of disparity frame. For right and center alignment X pixels will be invalidated from the right edge, for left alignment from the left edge.
-
setSubpixel
(self: depthai.StereoDepthConfig, enable: bool) → depthai.StereoDepthConfig¶ Computes disparity with sub-pixel interpolation (3 fractional bits by default).
Suitable for long range. Currently incompatible with extended disparity
-
setSubpixelFractionalBits
(self: depthai.StereoDepthConfig, subpixelFractionalBits: int) → depthai.StereoDepthConfig¶ Number of fractional bits for subpixel mode. Default value: 3. Valid values: 3,4,5. Defines the number of fractional disparities: 2^x. Median filter postprocessing is supported only for 3 fractional bits.
-
class
-
class
depthai.
StereoDepthProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for StereoDepth
Classes:
Align the disparity/depth to the perspective of a rectified output, or center it
Median filter config
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image).
Override baseline from calibration.
Which camera to align disparity/depth to.
Use baseline information for depth alignment from specs (design data) or from calibration.
Use baseline information for disparity to depth conversion from specs (design data) or from calibration.
Enable stereo rectification/dewarp or not.
Whether to enable switching stereo modes at runtime or not.
Override focal length from calibration.
Whether to use horizontal focal length from calibration intrinsics (fx) or calculate based on calibration FOV.
Input frame height.
Initial stereo config
Specify a direct warp mesh to be used for rectification, instead of intrinsics + extrinsic matrices
Num frames in output pool
Number of memory slices reserved for stereo depth post processing.
Number of shaves reserved for stereo depth post processing.
Output disparity/depth height.
Whether to keep aspect ratio of the input (rectified) or not
Output disparity/depth width.
Obtain rectification matrices using spec translation (design data) or from calibration in calculations.
Fill color for missing data at frame edges - grayscale 0..255, or -1 to replicate pixels
Use 3x3 homography matrix for stereo rectification instead of sparse mesh generated on device.
Input frame width.
-
class
DepthAlign
¶ Bases:
pybind11_builtins.pybind11_object
Align the disparity/depth to the perspective of a rectified output, or center it
Members:
RECTIFIED_RIGHT :
RECTIFIED_LEFT :
CENTER :
Attributes:
Methods:
__init__
(self, value)-
CENTER
= <DepthAlign.CENTER: 2>¶
-
RECTIFIED_LEFT
= <DepthAlign.RECTIFIED_LEFT: 1>¶
-
RECTIFIED_RIGHT
= <DepthAlign.RECTIFIED_RIGHT: 0>¶
-
__init__
(self: depthai.RawStereoDepthConfig.AlgorithmControl.DepthAlign, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
MedianFilter
¶ Bases:
pybind11_builtins.pybind11_object
Median filter config
Members:
MEDIAN_OFF
KERNEL_3x3
KERNEL_5x5
KERNEL_7x7
Attributes:
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
RectificationMesh
¶ Bases:
pybind11_builtins.pybind11_object
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Uri which points to the mesh array for ‘left’ input rectification
Uri which points to the mesh array for ‘right’ input rectification
Mesh array size in bytes, for each of ‘left’ and ‘right’ (need to match)
Distance between mesh points, in the vertical direction
Distance between mesh points, in the horizontal direction
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
meshLeftUri
¶ Uri which points to the mesh array for ‘left’ input rectification
-
property
meshRightUri
¶ Uri which points to the mesh array for ‘right’ input rectification
-
property
meshSize
¶ Mesh array size in bytes, for each of ‘left’ and ‘right’ (need to match)
-
property
stepHeight
¶ Distance between mesh points, in the vertical direction
-
property
stepWidth
¶ Distance between mesh points, in the horizontal direction
-
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
alphaScaling
¶ Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image). On some high distortion lenses, and/or due to rectification (image rotated) invalid areas may appear even with alpha=0, in these cases alpha < 0.0 helps removing invalid areas. See getOptimalNewCameraMatrix from opencv for more details.
-
property
baseline
¶ Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
-
property
depthAlignCamera
¶ Which camera to align disparity/depth to. When configured (not AUTO), takes precedence over ‘depthAlign’
-
property
depthAlignmentUseSpecTranslation
¶ Use baseline information for depth alignment from specs (design data) or from calibration. Suitable for debugging. Utilizes calibrated value as default
-
property
disparityToDepthUseSpecTranslation
¶ Use baseline information for disparity to depth conversion from specs (design data) or from calibration. Suitable for debugging. Utilizes calibrated value as default
-
property
enableRectification
¶ Enable stereo rectification/dewarp or not. Useful to disable when replaying pre- recorded rectified frames.
-
property
enableRuntimeStereoModeSwitch
¶ Whether to enable switching stereo modes at runtime or not. E.g. standard to subpixel, standard+LR-check to subpixel + LR-check. Note: It will allocate resources for worst cases scenario, should be enabled only if dynamic mode switch is required. Default value: false.
-
property
focalLength
¶ Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
-
property
focalLengthFromCalibration
¶ Whether to use horizontal focal length from calibration intrinsics (fx) or calculate based on calibration FOV. Default value is true. If set to false it’s calculated from FOV and image resolution: focalLength = calib.width / (2.f * tan(calib.fov / 2 / 180.f * pi));
-
property
height
¶ Input frame height. Optional (taken from MonoCamera nodes if they exist)
-
property
initialConfig
¶ Initial stereo config
-
property
mesh
¶ Specify a direct warp mesh to be used for rectification, instead of intrinsics + extrinsic matrices
-
property
numFramesPool
¶ Num frames in output pool
-
property
numPostProcessingMemorySlices
¶ Number of memory slices reserved for stereo depth post processing. -1 means auto, memory will be allocated based on initial stereo settings and number of shaves. 0 means that it will reuse the memory slices assigned for main stereo algorithm. For optimal performance it’s recommended to allocate more than 0, so post processing will run in parallel with main stereo algorithm. Minimum 1, maximum 6.
-
property
numPostProcessingShaves
¶ Number of shaves reserved for stereo depth post processing. Post processing can use multiple shaves to increase performance. -1 means auto, resources will be allocated based on enabled filters. 0 means that it will reuse the shave assigned for main stereo algorithm. For optimal performance it’s recommended to allocate more than 0, so post processing will run in parallel with main stereo algorithm. Minimum 1, maximum 10.
-
property
outHeight
¶ Output disparity/depth height. Currently only used when aligning to RGB
-
property
outKeepAspectRatio
¶ Whether to keep aspect ratio of the input (rectified) or not
-
property
outWidth
¶ Output disparity/depth width. Currently only used when aligning to RGB
-
property
rectificationUseSpecTranslation
¶ Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Suitable for debugging. Default: false
-
property
rectifyEdgeFillColor
¶ Fill color for missing data at frame edges - grayscale 0..255, or -1 to replicate pixels
-
property
useHomographyRectification
¶ Use 3x3 homography matrix for stereo rectification instead of sparse mesh generated on device. Default behaviour is AUTO, for lenses with FOV over 85 degrees sparse mesh is used, otherwise 3x3 homography. If custom mesh data is provided through loadMeshData or loadMeshFiles this option is ignored. true: 3x3 homography matrix generated from calibration data is used for stereo rectification, can’t correct lens distortion. false: sparse mesh is generated on-device from calibration data with mesh step specified with setMeshStep (Default: (16, 16)), can correct lens distortion. Implementation for generating the mesh is same as opencv’s initUndistortRectifyMap function. Only the first 8 distortion coefficients are used from calibration data.
-
property
width
¶ Input frame width. Optional (taken from MonoCamera nodes if they exist)
-
class
-
class
depthai.
StereoPair
¶ Bases:
pybind11_builtins.pybind11_object
Describes which camera sockets can be used for stereo and their baseline.
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.StereoPair) → None¶
-
property
baseline
¶
-
property
isVertical
¶
-
property
left
¶
-
property
right
¶
-
-
class
depthai.
StereoRectification
¶ Bases:
pybind11_builtins.pybind11_object
StereoRectification structure
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.StereoRectification) → None¶
-
property
leftCameraSocket
¶
-
property
rectifiedRotationLeft
¶
-
property
rectifiedRotationRight
¶
-
property
rightCameraSocket
¶
-
-
class
depthai.
SyncProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for Sync.
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
syncAttempts
¶
-
property
syncThresholdNs
¶
-
-
class
depthai.
SystemInformation
¶ Bases:
depthai.Buffer
SystemInformation message. Carries memory usage, cpu usage and chip temperatures.
Methods:
__init__
(self)Attributes:
-
__init__
(self: depthai.SystemInformation) → None¶
-
property
chipTemperature
¶
-
property
cmxMemoryUsage
¶
-
property
ddrMemoryUsage
¶
-
property
leonCssCpuUsage
¶
-
property
leonCssMemoryUsage
¶
-
property
leonMssCpuUsage
¶
-
property
leonMssMemoryUsage
¶
-
-
class
depthai.
SystemLoggerProperties
¶ Bases:
pybind11_builtins.pybind11_object
SystemLoggerProperties structure
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
rateHz
¶
-
-
class
depthai.
TensorInfo
¶ Bases:
pybind11_builtins.pybind11_object
TensorInfo structure
Classes:
Members:
Members:
Methods:
__init__
(self)Attributes:
-
class
DataType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
FP16
U8F
INT
FP32
I8
Attributes:
Methods:
__init__
(self, value)-
FP16
= <DataType.FP16: 0>¶
-
FP32
= <DataType.FP32: 3>¶
-
I8
= <DataType.I8: 4>¶
-
INT
= <DataType.INT: 2>¶
-
U8F
= <DataType.U8F: 1>¶
-
__init__
(self: depthai.TensorInfo.DataType, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
StorageOrder
¶ Bases:
pybind11_builtins.pybind11_object
Members:
NHWC
NHCW
NCHW
HWC
CHW
WHC
HCW
WCH
CWH
NC
CN
C
H
W
Attributes:
Methods:
__init__
(self, value)-
C
= <StorageOrder.C: 3>¶
-
CHW
= <StorageOrder.CHW: 801>¶
-
CN
= <StorageOrder.CN: 52>¶
-
CWH
= <StorageOrder.CWH: 786>¶
-
H
= <StorageOrder.H: 2>¶
-
HCW
= <StorageOrder.HCW: 561>¶
-
HWC
= <StorageOrder.HWC: 531>¶
-
NC
= <StorageOrder.NC: 67>¶
-
NCHW
= <StorageOrder.NCHW: 17185>¶
-
NHCW
= <StorageOrder.NHCW: 16945>¶
-
NHWC
= <StorageOrder.NHWC: 16915>¶
-
W
= <StorageOrder.W: 1>¶
-
WCH
= <StorageOrder.WCH: 306>¶
-
WHC
= <StorageOrder.WHC: 291>¶
-
__init__
(self: depthai.TensorInfo.StorageOrder, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.TensorInfo) → None¶
-
property
dataType
¶
-
property
dims
¶
-
property
name
¶
-
property
numDimensions
¶
-
property
offset
¶
-
property
order
¶
-
property
strides
¶
-
class
-
class
depthai.
Timestamp
¶ Bases:
pybind11_builtins.pybind11_object
Timestamp structure
Methods:
__init__
(self)get
(self)Attributes:
-
__init__
(self: depthai.Timestamp) → None¶
-
get
(self: depthai.Timestamp) → datetime.timedelta¶
-
property
nsec
¶
-
property
sec
¶
-
-
class
depthai.
ToFConfig
¶ Bases:
depthai.Buffer
ToFConfig message. Carries config for feature tracking algorithm
Classes:
DepthParams configuration structure.
Methods:
__init__
(*args, **kwargs)Overloaded function.
get
(self)Retrieve configuration data for ToF.
set
(self, config)Set explicit configuration.
setAvgPhaseShuffle
(self, arg0)setDepthParams
(self, config)setFreqModUsed
(self, arg0)setMedianFilter
(self, arg0)Parameter
median
:setMinAmplitude
(self, arg0)-
class
DepthParams
¶ Bases:
pybind11_builtins.pybind11_object
DepthParams configuration structure.
Classes:
Frequency modulation frames used for depth calculation.
Methods:
__init__
(self)Attributes:
Enable averaging between phases with same modulation frequency(e.g.
Set kernel size for depth median filtering, or disable
Perform depth calculation only for pixels with amplitude greater than provided value
-
class
TypeFMod
¶ Bases:
pybind11_builtins.pybind11_object
Frequency modulation frames used for depth calculation. If the ToF sensor supports multiple modulation frequencies, all will be used for depth calculation.
Members:
ALL
MIN
MAX
Attributes:
Methods:
__init__
(self, value)-
ALL
= <TypeFMod.ALL: 0>¶
-
MAX
= <TypeFMod.MAX: 2>¶
-
MIN
= <TypeFMod.MIN: 1>¶
-
__init__
(self: depthai.RawToFConfig.DepthParams.TypeFMod, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.RawToFConfig.DepthParams) → None¶
-
property
avgPhaseShuffle
¶ Enable averaging between phases with same modulation frequency(e.g. for ToF cameras with phase shuffle). The depth frame rate will be half if this is enabled
-
property
freqModUsed
¶
-
property
median
¶ Set kernel size for depth median filtering, or disable
-
property
minimumAmplitude
¶ Perform depth calculation only for pixels with amplitude greater than provided value
-
class
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.ToFConfig) -> None
__init__(self: depthai.ToFConfig, arg0: depthai.RawToFConfig) -> None
-
get
(self: depthai.ToFConfig) → depthai.RawToFConfig¶ Retrieve configuration data for ToF.
- Returns
config for feature tracking algorithm
-
set
(self: depthai.ToFConfig, config: depthai.RawToFConfig) → depthai.ToFConfig¶ Set explicit configuration.
- Parameter
config
: Explicit configuration
- Parameter
-
setAvgPhaseShuffle
(self: depthai.ToFConfig, arg0: bool) → depthai.ToFConfig¶
-
setDepthParams
(self: depthai.ToFConfig, config: depthai.RawToFConfig.DepthParams) → depthai.ToFConfig¶
-
setFreqModUsed
(self: depthai.ToFConfig, arg0: depthai.RawToFConfig.DepthParams.TypeFMod) → depthai.ToFConfig¶
-
setMedianFilter
(self: depthai.ToFConfig, arg0: depthai.MedianFilter) → depthai.ToFConfig¶ - Parameter
median
: Set kernel size for median filtering, or disable
- Parameter
-
setMinAmplitude
(self: depthai.ToFConfig, arg0: float) → depthai.ToFConfig¶
-
class
-
class
depthai.
ToFProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for ToF
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Initial ToF config
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
initialConfig
¶ Initial ToF config
-
-
class
depthai.
TrackedFeature
¶ Bases:
pybind11_builtins.pybind11_object
TrackedFeature structure
Methods:
__init__
(self)Attributes:
Feature age in frames
Feature harris score
Feature ID.
x, y position of the detected feature
Feature tracking error
-
__init__
(self: depthai.TrackedFeature) → None¶
-
property
age
¶ Feature age in frames
-
property
harrisScore
¶ Feature harris score
-
property
id
¶ Feature ID. Persistent between frames if motion estimation is enabled.
-
property
position
¶ x, y position of the detected feature
-
property
trackingError
¶ Feature tracking error
-
-
class
depthai.
TrackedFeatures
¶ Bases:
depthai.Buffer
TrackedFeatures message. Carries position (X, Y) of tracked features and their ID.
Methods:
__init__
(self)getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
Attributes:
-
__init__
(self: depthai.TrackedFeatures) → None¶
-
getSequenceNum
(self: depthai.TrackedFeatures) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.TrackedFeatures) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.TrackedFeatures) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setSequenceNum
(self: depthai.TrackedFeatures, arg0: int) → depthai.TrackedFeatures¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.TrackedFeatures, arg0: datetime.timedelta) → depthai.TrackedFeatures¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.TrackedFeatures, arg0: datetime.timedelta) → depthai.TrackedFeatures¶ Sets image timestamp related to dai::Clock::now()
-
property
trackedFeatures
¶
-
-
class
depthai.
TrackerIdAssignmentPolicy
¶ Bases:
pybind11_builtins.pybind11_object
Members:
UNIQUE_ID
SMALLEST_ID
Attributes:
Methods:
__init__
(self, value)-
SMALLEST_ID
= <TrackerIdAssignmentPolicy.SMALLEST_ID: 1>¶
-
UNIQUE_ID
= <TrackerIdAssignmentPolicy.UNIQUE_ID: 0>¶
-
__init__
(self: depthai.TrackerIdAssignmentPolicy, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
TrackerType
¶ Bases:
pybind11_builtins.pybind11_object
Members:
SHORT_TERM_KCF : Kernelized Correlation Filter tracking
SHORT_TERM_IMAGELESS : Short term tracking without using image data
ZERO_TERM_IMAGELESS : Ability to track the objects without accessing image data.
ZERO_TERM_COLOR_HISTOGRAM : Tracking using image data too.
Attributes:
Methods:
__init__
(self, value)-
SHORT_TERM_IMAGELESS
= <TrackerType.SHORT_TERM_IMAGELESS: 3>¶
-
SHORT_TERM_KCF
= <TrackerType.SHORT_TERM_KCF: 1>¶
-
ZERO_TERM_COLOR_HISTOGRAM
= <TrackerType.ZERO_TERM_COLOR_HISTOGRAM: 6>¶
-
ZERO_TERM_IMAGELESS
= <TrackerType.ZERO_TERM_IMAGELESS: 5>¶
-
__init__
(self: depthai.TrackerType, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
Tracklet
¶ Bases:
pybind11_builtins.pybind11_object
Tracklet structure
Contains tracklets from object tracker output.
Classes:
Members:
Methods:
__init__
(self)Attributes:
-
class
TrackingStatus
¶ Bases:
pybind11_builtins.pybind11_object
Members:
NEW
TRACKED
LOST
REMOVED
Attributes:
Methods:
__init__
(self, value)-
LOST
= <TrackingStatus.LOST: 2>¶
-
NEW
= <TrackingStatus.NEW: 0>¶
-
REMOVED
= <TrackingStatus.REMOVED: 3>¶
-
TRACKED
= <TrackingStatus.TRACKED: 1>¶
-
__init__
(self: depthai.Tracklet.TrackingStatus, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(self: depthai.Tracklet) → None¶
-
property
age
¶
-
property
id
¶
-
property
label
¶
-
property
roi
¶
-
property
spatialCoordinates
¶
-
property
srcImgDetection
¶
-
property
status
¶
-
class
-
class
depthai.
Tracklets
¶ Bases:
depthai.Buffer
Tracklets message. Carries object tracking information.
Methods:
__init__
(self)getSequenceNum
(self)Retrieves sequence number
getTimestamp
(self)Retrieves timestamp related to dai::Clock::now()
getTimestampDevice
(self)Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time.
setSequenceNum
(self, arg0)Retrieves image sequence number
setTimestamp
(self, arg0)Sets image timestamp related to dai::Clock::now()
setTimestampDevice
(self, arg0)Sets image timestamp related to dai::Clock::now()
Attributes:
Retrieve data for Tracklets.
-
__init__
(self: depthai.Tracklets) → None¶
-
getSequenceNum
(self: depthai.Tracklets) → int¶ Retrieves sequence number
-
getTimestamp
(self: depthai.Tracklets) → datetime.timedelta¶ Retrieves timestamp related to dai::Clock::now()
-
getTimestampDevice
(self: depthai.Tracklets) → datetime.timedelta¶ Retrieves timestamp directly captured from device’s monotonic clock, not synchronized to host time. Used mostly for debugging
-
setSequenceNum
(self: depthai.Tracklets, arg0: int) → depthai.Tracklets¶ Retrieves image sequence number
-
setTimestamp
(self: depthai.Tracklets, arg0: datetime.timedelta) → depthai.Tracklets¶ Sets image timestamp related to dai::Clock::now()
-
setTimestampDevice
(self: depthai.Tracklets, arg0: datetime.timedelta) → depthai.Tracklets¶ Sets image timestamp related to dai::Clock::now()
-
property
tracklets
¶ Retrieve data for Tracklets.
- Returns
Vector of object tracker data, carrying tracking information.
-
-
class
depthai.
UVCProperties
¶ Bases:
pybind11_builtins.pybind11_object
Properties for UVC node
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
gpioInit
¶
-
property
gpioStreamOff
¶
-
property
gpioStreamOn
¶
-
-
class
depthai.
UsbSpeed
¶ Bases:
pybind11_builtins.pybind11_object
Get USB Speed
Members:
UNKNOWN
LOW
FULL
HIGH
SUPER
SUPER_PLUS
Attributes:
Methods:
__init__
(self, value)-
FULL
= <UsbSpeed.FULL: 2>¶
-
HIGH
= <UsbSpeed.HIGH: 3>¶
-
LOW
= <UsbSpeed.LOW: 1>¶
-
SUPER
= <UsbSpeed.SUPER: 4>¶
-
SUPER_PLUS
= <UsbSpeed.SUPER_PLUS: 5>¶
-
UNKNOWN
= <UsbSpeed.UNKNOWN: 0>¶
-
__init__
(self: depthai.UsbSpeed, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
Version
¶ Bases:
pybind11_builtins.pybind11_object
Version structure
Methods:
__init__
(*args, **kwargs)Overloaded function.
getBuildInfo
(self)Get build info
getSemver
(self)Retrieves semver version (no build information)
toStringSemver
(self)Convert Version to semver (no build information) string
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.Version, v: str) -> None
Construct Version from string
__init__(self: depthai.Version, major: int, minor: int, patch: int) -> None
Construct Version major, minor and patch numbers
-
getBuildInfo
(self: depthai.Version) → str¶ Get build info
-
getSemver
(self: depthai.Version) → depthai.Version¶ Retrieves semver version (no build information)
-
toStringSemver
(self: depthai.Version) → str¶ Convert Version to semver (no build information) string
-
-
class
depthai.
VideoEncoderProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for VideoEncoder such as profile, bitrate, …
Classes:
Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
class
Profile
¶ Bases:
pybind11_builtins.pybind11_object
Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG
Members:
H264_BASELINE
H264_HIGH
H264_MAIN
H265_MAIN
MJPEG
Attributes:
Methods:
__init__
(self, value)-
H264_BASELINE
= <Profile.H264_BASELINE: 0>¶
-
H264_HIGH
= <Profile.H264_HIGH: 1>¶
-
H264_MAIN
= <Profile.H264_MAIN: 2>¶
-
H265_MAIN
= <Profile.H265_MAIN: 3>¶
-
MJPEG
= <Profile.MJPEG: 4>¶
-
__init__
(self: depthai.VideoEncoderProperties.Profile, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
RateControlMode
¶ Bases:
pybind11_builtins.pybind11_object
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
Members:
CBR
VBR
Attributes:
Methods:
__init__
(self, value)-
CBR
= <RateControlMode.CBR: 0>¶
-
VBR
= <RateControlMode.VBR: 1>¶
-
__init__
(self: depthai.VideoEncoderProperties.RateControlMode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
bitrate
¶
-
property
keyframeFrequency
¶
-
property
maxBitrate
¶
-
property
numBFrames
¶
-
property
numFramesPool
¶
-
property
outputFrameSize
¶
-
property
profile
¶
-
property
quality
¶
-
property
rateCtrlMode
¶
-
class
-
class
depthai.
WarpProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for Warp
Classes:
Interpolation type
Methods:
__init__
(*args, **kwargs)Initialize self.
-
class
Interpolation
¶ Bases:
pybind11_builtins.pybind11_object
Interpolation type
Members:
BILINEAR
BICUBIC
NEAREST_NEIGHBOR
BYPASS
DEFAULT
DEFAULT_DISPARITY_DEPTH
Attributes:
Methods:
__init__
(self, value)-
BICUBIC
= <Interpolation.BICUBIC: 1>¶
-
BILINEAR
= <Interpolation.BILINEAR: 0>¶
-
BYPASS
= <Interpolation.NEAREST_NEIGHBOR: 2>¶
-
DEFAULT
= <Interpolation.BICUBIC: 1>¶
-
DEFAULT_DISPARITY_DEPTH
= <Interpolation.NEAREST_NEIGHBOR: 2>¶
-
NEAREST_NEIGHBOR
= <Interpolation.NEAREST_NEIGHBOR: 2>¶
-
__init__
(self: depthai.Interpolation, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
class
-
class
depthai.
XLinkConnection
¶ Bases:
pybind11_builtins.pybind11_object
Represents connection between host and device over XLink protocol
Methods:
__init__
(*args, **kwargs)Overloaded function.
bootBootloader
(devInfo)getAllConnectedDevices
(state, skipInvalidDevices)getDeviceByMxId
(mxId, state, skipInvalidDevice)getFirstDevice
(state, skipInvalidDevice)Get current accumulated profiling data
-
__init__
(*args, **kwargs)¶ Overloaded function.
__init__(self: depthai.XLinkConnection, arg0: depthai.DeviceInfo, arg1: List[int]) -> None
__init__(self: depthai.XLinkConnection, arg0: depthai.DeviceInfo, arg1: str) -> None
__init__(self: depthai.XLinkConnection, arg0: depthai.DeviceInfo) -> None
-
static
bootBootloader
(devInfo: depthai.DeviceInfo) → depthai.DeviceInfo¶
-
static
getAllConnectedDevices
(state: depthai.XLinkDeviceState = <XLinkDeviceState.X_LINK_ANY_STATE: 0>, skipInvalidDevices: bool = True) → List[depthai.DeviceInfo]¶
-
static
getDeviceByMxId
(mxId: str, state: depthai.XLinkDeviceState = <XLinkDeviceState.X_LINK_ANY_STATE: 0>, skipInvalidDevice: bool = True) → Tuple[bool, depthai.DeviceInfo]¶
-
static
getFirstDevice
(state: depthai.XLinkDeviceState = <XLinkDeviceState.X_LINK_ANY_STATE: 0>, skipInvalidDevice: bool = True) → Tuple[bool, depthai.DeviceInfo]¶
-
static
getGlobalProfilingData
() → depthai.ProfilingData¶ Get current accumulated profiling data
- Returns
ProfilingData from the specific connection
-
-
class
depthai.
XLinkDeviceState
¶ Bases:
pybind11_builtins.pybind11_object
Members:
X_LINK_ANY_STATE
X_LINK_BOOTED
X_LINK_UNBOOTED
X_LINK_BOOTLOADER
X_LINK_FLASH_BOOTED
Attributes:
Methods:
__init__
(self, value)-
X_LINK_ANY_STATE
= <XLinkDeviceState.X_LINK_ANY_STATE: 0>¶
-
X_LINK_BOOTED
= <XLinkDeviceState.X_LINK_BOOTED: 1>¶
-
X_LINK_BOOTLOADER
= <XLinkDeviceState.X_LINK_BOOTLOADER: 3>¶
-
X_LINK_FLASH_BOOTED
= <XLinkDeviceState.X_LINK_FLASH_BOOTED: 4>¶
-
X_LINK_UNBOOTED
= <XLinkDeviceState.X_LINK_UNBOOTED: 2>¶
-
__init__
(self: depthai.XLinkDeviceState, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
exception
depthai.
XLinkError
¶ Bases:
RuntimeError
-
class
depthai.
XLinkError_t
¶ Bases:
pybind11_builtins.pybind11_object
Members:
X_LINK_SUCCESS
X_LINK_ALREADY_OPEN
X_LINK_COMMUNICATION_NOT_OPEN
X_LINK_COMMUNICATION_FAIL
X_LINK_COMMUNICATION_UNKNOWN_ERROR
X_LINK_DEVICE_NOT_FOUND
X_LINK_TIMEOUT
X_LINK_ERROR
X_LINK_OUT_OF_MEMORY
X_LINK_INSUFFICIENT_PERMISSIONS
X_LINK_DEVICE_ALREADY_IN_USE
X_LINK_NOT_IMPLEMENTED
X_LINK_INIT_USB_ERROR
X_LINK_INIT_TCP_IP_ERROR
X_LINK_INIT_PCIE_ERROR
Attributes:
Methods:
__init__
(self, value)-
X_LINK_ALREADY_OPEN
= <XLinkError_t.X_LINK_ALREADY_OPEN: 1>¶
-
X_LINK_COMMUNICATION_FAIL
= <XLinkError_t.X_LINK_COMMUNICATION_FAIL: 3>¶
-
X_LINK_COMMUNICATION_NOT_OPEN
= <XLinkError_t.X_LINK_COMMUNICATION_NOT_OPEN: 2>¶
-
X_LINK_COMMUNICATION_UNKNOWN_ERROR
= <XLinkError_t.X_LINK_COMMUNICATION_UNKNOWN_ERROR: 4>¶
-
X_LINK_DEVICE_ALREADY_IN_USE
= <XLinkError_t.X_LINK_DEVICE_ALREADY_IN_USE: 10>¶
-
X_LINK_DEVICE_NOT_FOUND
= <XLinkError_t.X_LINK_DEVICE_NOT_FOUND: 5>¶
-
X_LINK_ERROR
= <XLinkError_t.X_LINK_ERROR: 7>¶
-
X_LINK_INIT_PCIE_ERROR
= <XLinkError_t.X_LINK_INIT_PCIE_ERROR: 14>¶
-
X_LINK_INIT_TCP_IP_ERROR
= <XLinkError_t.X_LINK_INIT_TCP_IP_ERROR: 13>¶
-
X_LINK_INIT_USB_ERROR
= <XLinkError_t.X_LINK_INIT_USB_ERROR: 12>¶
-
X_LINK_INSUFFICIENT_PERMISSIONS
= <XLinkError_t.X_LINK_INSUFFICIENT_PERMISSIONS: 9>¶
-
X_LINK_NOT_IMPLEMENTED
= <XLinkError_t.X_LINK_NOT_IMPLEMENTED: 11>¶
-
X_LINK_OUT_OF_MEMORY
= <XLinkError_t.X_LINK_OUT_OF_MEMORY: 8>¶
-
X_LINK_SUCCESS
= <XLinkError_t.X_LINK_SUCCESS: 0>¶
-
X_LINK_TIMEOUT
= <XLinkError_t.X_LINK_TIMEOUT: 6>¶
-
__init__
(self: depthai.XLinkError_t, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
XLinkInProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for XLinkIn such as stream name, …
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
maxDataSize
¶
-
property
numFrames
¶
-
property
streamName
¶
-
-
class
depthai.
XLinkOutProperties
¶ Bases:
pybind11_builtins.pybind11_object
Specify properties for XLinkOut such as stream name, …
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
maxFpsLimit
¶
-
property
metadataOnly
¶
-
property
streamName
¶
-
-
class
depthai.
XLinkPlatform
¶ Bases:
pybind11_builtins.pybind11_object
Members:
X_LINK_ANY_PLATFORM
X_LINK_MYRIAD_2
X_LINK_MYRIAD_X
Attributes:
Methods:
__init__
(self, value)-
X_LINK_ANY_PLATFORM
= <XLinkPlatform.X_LINK_ANY_PLATFORM: 0>¶
-
X_LINK_MYRIAD_2
= <XLinkPlatform.X_LINK_MYRIAD_2: 2450>¶
-
X_LINK_MYRIAD_X
= <XLinkPlatform.X_LINK_MYRIAD_X: 2480>¶
-
__init__
(self: depthai.XLinkPlatform, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
class
depthai.
XLinkProtocol
¶ Bases:
pybind11_builtins.pybind11_object
Members:
X_LINK_USB_VSC
X_LINK_USB_CDC
X_LINK_PCIE
X_LINK_TCP_IP
X_LINK_IPC
X_LINK_NMB_OF_PROTOCOLS
X_LINK_ANY_PROTOCOL
Attributes:
Methods:
__init__
(self, value)-
X_LINK_ANY_PROTOCOL
= <XLinkProtocol.X_LINK_ANY_PROTOCOL: 6>¶
-
X_LINK_IPC
= <XLinkProtocol.X_LINK_IPC: 3>¶
-
X_LINK_NMB_OF_PROTOCOLS
= <XLinkProtocol.X_LINK_NMB_OF_PROTOCOLS: 5>¶
-
X_LINK_PCIE
= <XLinkProtocol.X_LINK_PCIE: 2>¶
-
X_LINK_TCP_IP
= <XLinkProtocol.X_LINK_TCP_IP: 4>¶
-
X_LINK_USB_CDC
= <XLinkProtocol.X_LINK_USB_CDC: 1>¶
-
X_LINK_USB_VSC
= <XLinkProtocol.X_LINK_USB_VSC: 0>¶
-
__init__
(self: depthai.XLinkProtocol, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
exception
depthai.
XLinkReadError
¶ Bases:
depthai.XLinkError
-
exception
depthai.
XLinkWriteError
¶ Bases:
depthai.XLinkError
-
class
depthai.
connectionInterface
¶ Bases:
pybind11_builtins.pybind11_object
Members:
USB
ETHERNET
WIFI
Attributes:
Methods:
__init__
(self, value)-
ETHERNET
= <connectionInterface.ETHERNET: 1>¶
-
USB
= <connectionInterface.USB: 0>¶
-
WIFI
= <connectionInterface.WIFI: 2>¶
-
__init__
(self: depthai.connectionInterface, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
depthai.
isDatatypeSubclassOf
(arg0: depthai.DatatypeEnum, arg1: depthai.DatatypeEnum) → bool¶
Nodes¶
Classes:
AprilTag node. |
|
Camera node. |
|
ColorCamera node. |
|
DetectionNetwork, base for different network specializations |
|
DetectionParser node. |
|
EdgeDetector node. |
|
FeatureTracker node. |
|
IMU node for BNO08X. |
|
ImageManip node. |
|
MobileNetDetectionNetwork node. |
|
MobileNetSpatialDetectionNetwork node. |
|
MonoCamera node. |
|
NeuralNetwork node. |
|
ObjectTracker node. |
|
PointCloud node. |
|
SPIIn node. |
|
SPIOut node. |
|
SpatialDetectionNetwork node. |
|
SpatialLocationCalculator node. |
|
StereoDepth node. |
|
SystemLogger node. |
|
ToF node |
|
UVC (USB Video Class) node |
|
VideoEncoder node. |
|
Warp node. |
|
XLinkIn node. |
|
XLinkOut node. |
|
YoloDetectionNetwork node. |
|
YoloSpatialDetectionNetwork node. |
-
class
depthai.node.
AprilTag
¶ Bases:
depthai.Node
AprilTag node.
Classes:
alias of
depthai.AprilTagProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
setWaitForConfigInput
(self, wait)Specify whether or not wait until configuration message arrives to inputConfig Input.
Attributes:
Initial config to use when calculating spatial location data.
Input AprilTagConfig message with ability to modify parameters in runtime.
Input message with depth data used to retrieve spatial information about detected object.
Outputs AprilTags message that carries spatial location results.
Passthrough message on which the calculation was performed.
-
Properties
¶ alias of
depthai.AprilTagProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
initialConfig
inputConfigSync
Whether to wait for config at ‘inputConfig’ IO
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
initialConfig
¶ Initial config to use when calculating spatial location data.
-
property
inputConfig
¶ Input AprilTagConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
inputImage
¶ Input message with depth data used to retrieve spatial information about detected object. Default queue is non-blocking with size 4.
-
property
out
¶ Outputs AprilTags message that carries spatial location results.
-
property
passthroughInputImage
¶ Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
-
setWaitForConfigInput
(self: depthai.node.AprilTag, wait: bool) → None¶ Specify whether or not wait until configuration message arrives to inputConfig Input.
- Parameter
wait
: True to wait for configuration message, false otherwise.
- Parameter
-
-
class
depthai.node.
Camera
¶ Bases:
depthai.Node
Camera node. Experimental node, for both mono and color types of sensors
Classes:
alias of
depthai.CameraProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getBoardSocket
(self)Retrieves which board socket to use
getCalibrationAlpha
(self)Get calibration alpha parameter that determines FOV of undistorted frames
getCamera
(self)Retrieves which camera to use by name
getFps
(self)Get rate at which camera should produce frames
getHeight
(self)Get sensor resolution height
getImageOrientation
(self)Get camera image orientation
getMeshSource
(self)Gets the source of the warp mesh
getMeshStep
(self)Gets the distance between mesh points
getPreviewHeight
(self)Get preview height
getPreviewSize
(self)Get preview size as tuple
getPreviewWidth
(self)Get preview width
getSize
(self)Get sensor resolution as size
getStillHeight
(self)Get still height
getStillSize
(self)Get still size as tuple
getStillWidth
(self)Get still width
getVideoHeight
(self)Get video height
getVideoSize
(self)Get video size as tuple
getVideoWidth
(self)Get video width
getWidth
(self)Get sensor resolution width
loadMeshData
(self, warpMesh)Specify mesh calibration data for undistortion See loadMeshFiles for the expected data format
loadMeshFile
(self, warpMesh)Specify local filesystem paths to the undistort mesh calibration files.
setBoardSocket
(self, boardSocket)Specify which board socket to use
setCalibrationAlpha
(self, alpha)Set calibration alpha parameter that determines FOV of undistorted frames
setCamera
(self, name)Specify which camera to use by name
setFps
(self, fps)Set rate at which camera should produce frames
setImageOrientation
(self, imageOrientation)Set camera image orientation
setIsp3aFps
(self, arg0)Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.).
setMeshSource
(self, source)Set the source of the warp mesh or disable
setMeshStep
(self, width, height)Set the distance between mesh points.
setPreviewSize
(*args, **kwargs)Overloaded function.
setRawOutputPacked
(self, packed)Configures whether the camera raw frames are saved as MIPI-packed to memory.
setSize
(*args, **kwargs)Overloaded function.
setStillSize
(*args, **kwargs)Overloaded function.
setVideoSize
(*args, **kwargs)Overloaded function.
Attributes:
Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
Initial control options to apply to sensor
Input for ImageManipConfig message, which can modify crop parameters in runtime
Input for CameraControl message, which can modify camera parameters in runtime
Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data.
Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
-
Properties
¶ alias of
depthai.CameraProperties
Classes:ColorOrder
For 24 bit color these can be either RGB or BGR
WarpMeshSource
Warp mesh source
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
boardSocket
calibAlpha
cameraName
colorOrder
fp16
fps
imageOrientation
initialControl
interleaved
isp3aFps
ispScale
numFramesPoolIsp
numFramesPoolPreview
numFramesPoolRaw
numFramesPoolStill
numFramesPoolVideo
previewHeight
previewKeepAspectRatio
previewWidth
rawPacked
resolutionHeight
resolutionWidth
sensorCropX
sensorCropY
sensorType
stillHeight
stillWidth
videoHeight
videoWidth
warpMeshHeight
warpMeshSource
warpMeshStepHeight
warpMeshStepWidth
warpMeshUri
warpMeshWidth
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
frameEvent
¶ Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
It’s sent on the MIPI SoF (start-of-frame) event, just after the exposure of the current frame has finished and before the exposure for next frame starts. Could be used to synchronize various processes with camera capture. Fields populated: camera id, sequence number, timestamp
-
getBoardSocket
(self: depthai.node.Camera) → depthai.CameraBoardSocket¶ Retrieves which board socket to use
- Returns
Board socket to use
-
getCalibrationAlpha
(self: depthai.node.Camera) → Optional[float]¶ Get calibration alpha parameter that determines FOV of undistorted frames
-
getCamera
(self: depthai.node.Camera) → str¶ Retrieves which camera to use by name
- Returns
Name of the camera to use
-
getFps
(self: depthai.node.Camera) → float¶ Get rate at which camera should produce frames
- Returns
Rate in frames per second
-
getHeight
(self: depthai.node.Camera) → int¶ Get sensor resolution height
-
getImageOrientation
(self: depthai.node.Camera) → depthai.CameraImageOrientation¶ Get camera image orientation
-
getMeshSource
(self: depthai.node.Camera) → depthai.CameraProperties.WarpMeshSource¶ Gets the source of the warp mesh
-
getMeshStep
(self: depthai.node.Camera) → Tuple[int, int]¶ Gets the distance between mesh points
-
getPreviewHeight
(self: depthai.node.Camera) → int¶ Get preview height
-
getPreviewSize
(self: depthai.node.Camera) → Tuple[int, int]¶ Get preview size as tuple
-
getPreviewWidth
(self: depthai.node.Camera) → int¶ Get preview width
-
getSize
(self: depthai.node.Camera) → Tuple[int, int]¶ Get sensor resolution as size
-
getStillHeight
(self: depthai.node.Camera) → int¶ Get still height
-
getStillSize
(self: depthai.node.Camera) → Tuple[int, int]¶ Get still size as tuple
-
getStillWidth
(self: depthai.node.Camera) → int¶ Get still width
-
getVideoHeight
(self: depthai.node.Camera) → int¶ Get video height
-
getVideoSize
(self: depthai.node.Camera) → Tuple[int, int]¶ Get video size as tuple
-
getVideoWidth
(self: depthai.node.Camera) → int¶ Get video width
-
getWidth
(self: depthai.node.Camera) → int¶ Get sensor resolution width
-
property
initialControl
¶ Initial control options to apply to sensor
-
property
inputConfig
¶ Input for ImageManipConfig message, which can modify crop parameters in runtime
Default queue is non-blocking with size 8
-
property
inputControl
¶ Input for CameraControl message, which can modify camera parameters in runtime
Default queue is blocking with size 8
-
property
isp
¶ Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data.
Generated by the ISP engine, and the source for the ‘video’, ‘preview’ and ‘still’ outputs
-
loadMeshData
(self: depthai.node.Camera, warpMesh: buffer) → None¶ Specify mesh calibration data for undistortion See loadMeshFiles for the expected data format
-
loadMeshFile
(self: depthai.node.Camera, warpMesh: Path) → None¶ Specify local filesystem paths to the undistort mesh calibration files.
When a mesh calibration is set, it overrides the camera intrinsics/extrinsics matrices. Overrides useHomographyRectification behavior. Mesh format: a sequence of (y,x) points as ‘float’ with coordinates from the input image to be mapped in the output. The mesh can be subsampled, configured by setMeshStep.
With a 1280x800 resolution and the default (16,16) step, the required mesh size is:
width: 1280 / 16 + 1 = 81
height: 800 / 16 + 1 = 51
-
property
preview
¶ Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.
Suitable for use with NeuralNetwork node
-
property
raw
¶ Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
Captured directly from the camera sensor, and the source for the ‘isp’ output.
-
setBoardSocket
(self: depthai.node.Camera, boardSocket: depthai.CameraBoardSocket) → None¶ Specify which board socket to use
- Parameter
boardSocket
: Board socket to use
- Parameter
-
setCalibrationAlpha
(self: depthai.node.Camera, alpha: float) → None¶ Set calibration alpha parameter that determines FOV of undistorted frames
-
setCamera
(self: depthai.node.Camera, name: str) → None¶ Specify which camera to use by name
- Parameter
name
: Name of the camera to use
- Parameter
-
setFps
(self: depthai.node.Camera, fps: float) → None¶ Set rate at which camera should produce frames
- Parameter
fps
: Rate in frames per second
- Parameter
-
setImageOrientation
(self: depthai.node.Camera, imageOrientation: depthai.CameraImageOrientation) → None¶ Set camera image orientation
-
setIsp3aFps
(self: depthai.node.Camera, arg0: int) → None¶ Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.). Default (0) matches the camera FPS, meaning that 3A is running on each frame. Reducing the rate of 3A reduces the CPU usage on CSS, but also increases the convergence rate of 3A. Note that camera controls will be processed at this rate. E.g. if camera is running at 30 fps, and camera control is sent at every frame, but 3A fps is set to 15, the camera control messages will be processed at 15 fps rate, which will lead to queueing.
-
setMeshSource
(self: depthai.node.Camera, source: depthai.CameraProperties.WarpMeshSource) → None¶ Set the source of the warp mesh or disable
-
setMeshStep
(self: depthai.node.Camera, width: int, height: int) → None¶ Set the distance between mesh points. Default: (32, 32)
-
setPreviewSize
(*args, **kwargs)¶ Overloaded function.
setPreviewSize(self: depthai.node.Camera, width: int, height: int) -> None
Set preview output size
setPreviewSize(self: depthai.node.Camera, size: Tuple[int, int]) -> None
Set preview output size, as a tuple <width, height>
-
setRawOutputPacked
(self: depthai.node.Camera, packed: bool) → None¶ Configures whether the camera raw frames are saved as MIPI-packed to memory. The packed format is more efficient, consuming less memory on device, and less data to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes. When packing is disabled (false), data is saved lsb-aligned, e.g. a RAW10 pixel will be stored as uint16, on bits 9..0: 0b0000’00pp’pppp’pppp. Default is auto: enabled for standard color/monochrome cameras where ISP can work with both packed/unpacked, but disabled for other cameras like ToF.
-
setSize
(*args, **kwargs)¶ Overloaded function.
setSize(self: depthai.node.Camera, width: int, height: int) -> None
Set desired resolution. Sets sensor size to best fit
setSize(self: depthai.node.Camera, size: Tuple[int, int]) -> None
Set desired resolution. Sets sensor size to best fit
-
setStillSize
(*args, **kwargs)¶ Overloaded function.
setStillSize(self: depthai.node.Camera, width: int, height: int) -> None
Set still output size
setStillSize(self: depthai.node.Camera, size: Tuple[int, int]) -> None
Set still output size, as a tuple <width, height>
-
setVideoSize
(*args, **kwargs)¶ Overloaded function.
setVideoSize(self: depthai.node.Camera, width: int, height: int) -> None
Set video output size
setVideoSize(self: depthai.node.Camera, size: Tuple[int, int]) -> None
Set video output size, as a tuple <width, height>
-
property
still
¶ Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
The message is sent only when a CameraControl message arrives to inputControl with captureStill command set.
-
property
video
¶ Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
Suitable for use with VideoEncoder node
-
-
class
depthai.node.
ColorCamera
¶ Bases:
depthai.Node
ColorCamera node. For use with color sensors.
Classes:
alias of
depthai.ColorCameraProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getBoardSocket
(self)Retrieves which board socket to use
getCamId
(self)getCamera
(self)Retrieves which camera to use by name
getColorOrder
(self)Get color order of preview output frames.
getFp16
(self)Get fp16 (0..255) data of preview output frames
getFps
(self)Get rate at which camera should produce frames
getFrameEventFilter
(self)getImageOrientation
(self)Get camera image orientation
getInterleaved
(self)Get planar or interleaved data of preview output frames
getIspHeight
(self)Get ‘isp’ output height
getIspNumFramesPool
(self)Get number of frames in isp pool
getIspSize
(self)Get ‘isp’ output resolution as size, after scaling
getIspWidth
(self)Get ‘isp’ output width
getPreviewHeight
(self)Get preview height
See also
setPreviewKeepAspectRatio
getPreviewNumFramesPool
(self)Get number of frames in preview pool
getPreviewSize
(self)Get preview size as tuple
getPreviewWidth
(self)Get preview width
getRawNumFramesPool
(self)Get number of frames in raw pool
getResolution
(self)Get sensor resolution
getResolutionHeight
(self)Get sensor resolution height
getResolutionSize
(self)Get sensor resolution as size
getResolutionWidth
(self)Get sensor resolution width
getSensorCrop
(self)- returns
Sensor top left crop coordinates
getSensorCropX
(self)Get sensor top left x crop coordinate
getSensorCropY
(self)Get sensor top left y crop coordinate
getStillHeight
(self)Get still height
getStillNumFramesPool
(self)Get number of frames in still pool
getStillSize
(self)Get still size as tuple
getStillWidth
(self)Get still width
getVideoHeight
(self)Get video height
getVideoNumFramesPool
(self)Get number of frames in video pool
getVideoSize
(self)Get video size as tuple
getVideoWidth
(self)Get video width
getWaitForConfigInput
(self)See also
setWaitForConfigInput
sensorCenterCrop
(self)Specify sensor center crop.
setBoardSocket
(self, boardSocket)Specify which board socket to use
setCamId
(self, arg0)setCamera
(self, name)Specify which camera to use by name
setColorOrder
(self, colorOrder)Set color order of preview output images.
setFp16
(self, fp16)Set fp16 (0..255) data type of preview output frames
setFps
(self, fps)Set rate at which camera should produce frames
setFrameEventFilter
(self, events)setImageOrientation
(self, imageOrientation)Set camera image orientation
setInterleaved
(self, interleaved)Set planar or interleaved data of preview output frames
setIsp3aFps
(self, arg0)Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.).
setIspNumFramesPool
(self, arg0)Set number of frames in isp pool
setIspScale
(*args, **kwargs)Overloaded function.
setNumFramesPool
(self, raw, isp, preview, …)Set number of frames in all pools
setPreviewKeepAspectRatio
(self, keep)Specifies whether preview output should preserve aspect ratio, after downscaling from video size or not.
setPreviewNumFramesPool
(self, arg0)Set number of frames in preview pool
setPreviewSize
(*args, **kwargs)Overloaded function.
setRawNumFramesPool
(self, arg0)Set number of frames in raw pool
setRawOutputPacked
(self, packed)Configures whether the camera raw frames are saved as MIPI-packed to memory.
setResolution
(self, resolution)Set sensor resolution
setSensorCrop
(self, x, y)Specifies the cropping that happens when converting ISP to video output.
setStillNumFramesPool
(self, arg0)Set number of frames in preview pool
setStillSize
(*args, **kwargs)Overloaded function.
setVideoNumFramesPool
(self, arg0)Set number of frames in preview pool
setVideoSize
(*args, **kwargs)Overloaded function.
setWaitForConfigInput
(self, wait)Specify to wait until inputConfig receives a configuration message, before sending out a frame.
Attributes:
Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
Initial control options to apply to sensor
Input for ImageManipConfig message, which can modify crop parameters in runtime
Input for CameraControl message, which can modify camera parameters in runtime
Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data.
Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
-
Properties
¶ alias of
depthai.ColorCameraProperties
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
eventFilter
fp16
fps
imageOrientation
initialControl
interleaved
isp3aFps
ispScale
numFramesPoolIsp
numFramesPoolPreview
numFramesPoolRaw
numFramesPoolStill
numFramesPoolVideo
previewHeight
previewKeepAspectRatio
previewWidth
resolution
sensorCropX
sensorCropY
stillHeight
stillWidth
videoHeight
videoWidth
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
frameEvent
¶ Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
It’s sent on the MIPI SoF (start-of-frame) event, just after the exposure of the current frame has finished and before the exposure for next frame starts. Could be used to synchronize various processes with camera capture. Fields populated: camera id, sequence number, timestamp
-
getBoardSocket
(self: depthai.node.ColorCamera) → depthai.CameraBoardSocket¶ Retrieves which board socket to use
- Returns
Board socket to use
-
getCamId
(self: depthai.node.ColorCamera) → int¶
-
getCamera
(self: depthai.node.ColorCamera) → str¶ Retrieves which camera to use by name
- Returns
Name of the camera to use
-
getColorOrder
(self: depthai.node.ColorCamera) → depthai.ColorCameraProperties.ColorOrder¶ Get color order of preview output frames. RGB or BGR
-
getFp16
(self: depthai.node.ColorCamera) → bool¶ Get fp16 (0..255) data of preview output frames
-
getFps
(self: depthai.node.ColorCamera) → float¶ Get rate at which camera should produce frames
- Returns
Rate in frames per second
-
getFrameEventFilter
(self: depthai.node.ColorCamera) → List[depthai.FrameEvent]¶
-
getImageOrientation
(self: depthai.node.ColorCamera) → depthai.CameraImageOrientation¶ Get camera image orientation
-
getInterleaved
(self: depthai.node.ColorCamera) → bool¶ Get planar or interleaved data of preview output frames
-
getIspHeight
(self: depthai.node.ColorCamera) → int¶ Get ‘isp’ output height
-
getIspNumFramesPool
(self: depthai.node.ColorCamera) → int¶ Get number of frames in isp pool
-
getIspSize
(self: depthai.node.ColorCamera) → Tuple[int, int]¶ Get ‘isp’ output resolution as size, after scaling
-
getIspWidth
(self: depthai.node.ColorCamera) → int¶ Get ‘isp’ output width
-
getPreviewHeight
(self: depthai.node.ColorCamera) → int¶ Get preview height
-
getPreviewKeepAspectRatio
(self: depthai.node.ColorCamera) → bool¶ See also
setPreviewKeepAspectRatio
- Returns
Preview keep aspect ratio option
-
getPreviewNumFramesPool
(self: depthai.node.ColorCamera) → int¶ Get number of frames in preview pool
-
getPreviewSize
(self: depthai.node.ColorCamera) → Tuple[int, int]¶ Get preview size as tuple
-
getPreviewWidth
(self: depthai.node.ColorCamera) → int¶ Get preview width
-
getRawNumFramesPool
(self: depthai.node.ColorCamera) → int¶ Get number of frames in raw pool
-
getResolution
(self: depthai.node.ColorCamera) → depthai.ColorCameraProperties.SensorResolution¶ Get sensor resolution
-
getResolutionHeight
(self: depthai.node.ColorCamera) → int¶ Get sensor resolution height
-
getResolutionSize
(self: depthai.node.ColorCamera) → Tuple[int, int]¶ Get sensor resolution as size
-
getResolutionWidth
(self: depthai.node.ColorCamera) → int¶ Get sensor resolution width
-
getSensorCrop
(self: depthai.node.ColorCamera) → Tuple[float, float]¶ - Returns
Sensor top left crop coordinates
-
getSensorCropX
(self: depthai.node.ColorCamera) → float¶ Get sensor top left x crop coordinate
-
getSensorCropY
(self: depthai.node.ColorCamera) → float¶ Get sensor top left y crop coordinate
-
getStillHeight
(self: depthai.node.ColorCamera) → int¶ Get still height
-
getStillNumFramesPool
(self: depthai.node.ColorCamera) → int¶ Get number of frames in still pool
-
getStillSize
(self: depthai.node.ColorCamera) → Tuple[int, int]¶ Get still size as tuple
-
getStillWidth
(self: depthai.node.ColorCamera) → int¶ Get still width
-
getVideoHeight
(self: depthai.node.ColorCamera) → int¶ Get video height
-
getVideoNumFramesPool
(self: depthai.node.ColorCamera) → int¶ Get number of frames in video pool
-
getVideoSize
(self: depthai.node.ColorCamera) → Tuple[int, int]¶ Get video size as tuple
-
getVideoWidth
(self: depthai.node.ColorCamera) → int¶ Get video width
-
getWaitForConfigInput
(self: depthai.node.ColorCamera) → bool¶ See also
setWaitForConfigInput
- Returns
True if wait for inputConfig message, false otherwise
-
property
initialControl
¶ Initial control options to apply to sensor
-
property
inputConfig
¶ Input for ImageManipConfig message, which can modify crop parameters in runtime
Default queue is non-blocking with size 8
-
property
inputControl
¶ Input for CameraControl message, which can modify camera parameters in runtime
Default queue is blocking with size 8
-
property
isp
¶ Outputs ImgFrame message that carries YUV420 planar (I420/IYUV) frame data.
Generated by the ISP engine, and the source for the ‘video’, ‘preview’ and ‘still’ outputs
-
property
preview
¶ Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.
Suitable for use with NeuralNetwork node
-
property
raw
¶ Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
Captured directly from the camera sensor, and the source for the ‘isp’ output.
-
sensorCenterCrop
(self: depthai.node.ColorCamera) → None¶ Specify sensor center crop. Resolution size / video size
-
setBoardSocket
(self: depthai.node.ColorCamera, boardSocket: depthai.CameraBoardSocket) → None¶ Specify which board socket to use
- Parameter
boardSocket
: Board socket to use
- Parameter
-
setCamId
(self: depthai.node.ColorCamera, arg0: int) → None¶
-
setCamera
(self: depthai.node.ColorCamera, name: str) → None¶ Specify which camera to use by name
- Parameter
name
: Name of the camera to use
- Parameter
-
setColorOrder
(self: depthai.node.ColorCamera, colorOrder: depthai.ColorCameraProperties.ColorOrder) → None¶ Set color order of preview output images. RGB or BGR
-
setFp16
(self: depthai.node.ColorCamera, fp16: bool) → None¶ Set fp16 (0..255) data type of preview output frames
-
setFps
(self: depthai.node.ColorCamera, fps: float) → None¶ Set rate at which camera should produce frames
- Parameter
fps
: Rate in frames per second
- Parameter
-
setFrameEventFilter
(self: depthai.node.ColorCamera, events: List[depthai.FrameEvent]) → None¶
-
setImageOrientation
(self: depthai.node.ColorCamera, imageOrientation: depthai.CameraImageOrientation) → None¶ Set camera image orientation
-
setInterleaved
(self: depthai.node.ColorCamera, interleaved: bool) → None¶ Set planar or interleaved data of preview output frames
-
setIsp3aFps
(self: depthai.node.ColorCamera, arg0: int) → None¶ Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.). Default (0) matches the camera FPS, meaning that 3A is running on each frame. Reducing the rate of 3A reduces the CPU usage on CSS, but also increases the convergence rate of 3A. Note that camera controls will be processed at this rate. E.g. if camera is running at 30 fps, and camera control is sent at every frame, but 3A fps is set to 15, the camera control messages will be processed at 15 fps rate, which will lead to queueing.
-
setIspNumFramesPool
(self: depthai.node.ColorCamera, arg0: int) → None¶ Set number of frames in isp pool
-
setIspScale
(*args, **kwargs)¶ Overloaded function.
setIspScale(self: depthai.node.ColorCamera, numerator: int, denominator: int) -> None
Set ‘isp’ output scaling (numerator/denominator), preserving the aspect ratio. The fraction numerator/denominator is simplified first to a irreducible form, then a set of hardware scaler constraints applies: max numerator = 16, max denominator = 63
setIspScale(self: depthai.node.ColorCamera, scale: Tuple[int, int]) -> None
Set ‘isp’ output scaling, as a tuple <numerator, denominator>
setIspScale(self: depthai.node.ColorCamera, horizNum: int, horizDenom: int, vertNum: int, vertDenom: int) -> None
Set ‘isp’ output scaling, per each direction. If the horizontal scaling factor (horizNum/horizDen) is different than the vertical scaling factor (vertNum/vertDen), a distorted (stretched or squished) image is generated
setIspScale(self: depthai.node.ColorCamera, horizScale: Tuple[int, int], vertScale: Tuple[int, int]) -> None
Set ‘isp’ output scaling, per each direction, as <numerator, denominator> tuples
-
setNumFramesPool
(self: depthai.node.ColorCamera, raw: int, isp: int, preview: int, video: int, still: int) → None¶ Set number of frames in all pools
-
setPreviewKeepAspectRatio
(self: depthai.node.ColorCamera, keep: bool) → None¶ Specifies whether preview output should preserve aspect ratio, after downscaling from video size or not.
- Parameter
keep
: If true, a larger crop region will be considered to still be able to create the final image in the specified aspect ratio. Otherwise video size is resized to fit preview size
- Parameter
-
setPreviewNumFramesPool
(self: depthai.node.ColorCamera, arg0: int) → None¶ Set number of frames in preview pool
-
setPreviewSize
(*args, **kwargs)¶ Overloaded function.
setPreviewSize(self: depthai.node.ColorCamera, width: int, height: int) -> None
Set preview output size
setPreviewSize(self: depthai.node.ColorCamera, size: Tuple[int, int]) -> None
Set preview output size, as a tuple <width, height>
-
setRawNumFramesPool
(self: depthai.node.ColorCamera, arg0: int) → None¶ Set number of frames in raw pool
-
setRawOutputPacked
(self: depthai.node.ColorCamera, packed: bool) → None¶ Configures whether the camera raw frames are saved as MIPI-packed to memory. The packed format is more efficient, consuming less memory on device, and less data to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes. When packing is disabled (false), data is saved lsb-aligned, e.g. a RAW10 pixel will be stored as uint16, on bits 9..0: 0b0000’00pp’pppp’pppp. Default is auto: enabled for standard color/monochrome cameras where ISP can work with both packed/unpacked, but disabled for other cameras like ToF.
-
setResolution
(self: depthai.node.ColorCamera, resolution: depthai.ColorCameraProperties.SensorResolution) → None¶ Set sensor resolution
-
setSensorCrop
(self: depthai.node.ColorCamera, x: float, y: float) → None¶ Specifies the cropping that happens when converting ISP to video output. By default, video will be center cropped from the ISP output. Note that this doesn’t actually do on-sensor cropping (and MIPI-stream only that region), but it does postprocessing on the ISP (on RVC).
- Parameter
x
: Top left X coordinate
- Parameter
y
: Top left Y coordinate
- Parameter
-
setStillNumFramesPool
(self: depthai.node.ColorCamera, arg0: int) → None¶ Set number of frames in preview pool
-
setStillSize
(*args, **kwargs)¶ Overloaded function.
setStillSize(self: depthai.node.ColorCamera, width: int, height: int) -> None
Set still output size
setStillSize(self: depthai.node.ColorCamera, size: Tuple[int, int]) -> None
Set still output size, as a tuple <width, height>
-
setVideoNumFramesPool
(self: depthai.node.ColorCamera, arg0: int) → None¶ Set number of frames in preview pool
-
setVideoSize
(*args, **kwargs)¶ Overloaded function.
setVideoSize(self: depthai.node.ColorCamera, width: int, height: int) -> None
Set video output size
setVideoSize(self: depthai.node.ColorCamera, size: Tuple[int, int]) -> None
Set video output size, as a tuple <width, height>
-
setWaitForConfigInput
(self: depthai.node.ColorCamera, wait: bool) → None¶ Specify to wait until inputConfig receives a configuration message, before sending out a frame.
- Parameter
wait
: True to wait for inputConfig message, false otherwise
- Parameter
-
property
still
¶ Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
The message is sent only when a CameraControl message arrives to inputControl with captureStill command set.
-
property
video
¶ Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.
Suitable for use with VideoEncoder node
-
class
depthai.node.
DetectionNetwork
¶ Bases:
depthai.node.NeuralNetwork
DetectionNetwork, base for different network specializations
Classes:
alias of
depthai.DetectionNetworkProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getConfidenceThreshold
(self)Retrieves threshold at which to filter the rest of the detections.
setConfidenceThreshold
(self, thresh)Specifies confidence threshold at which to filter the rest of the detections.
Attributes:
Input message with data to be inferred upon Default queue is blocking with size 5
Outputs ImgDetections message that carries parsed detection results.
Outputs unparsed inference results.
Passthrough message on which the inference was performed.
-
Properties
¶ alias of
depthai.DetectionNetworkProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
parser
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getConfidenceThreshold
(self: depthai.node.DetectionNetwork) → float¶ Retrieves threshold at which to filter the rest of the detections.
- Returns
Detection confidence
-
property
input
¶ Input message with data to be inferred upon Default queue is blocking with size 5
-
property
out
¶ Outputs ImgDetections message that carries parsed detection results. Overrides NeuralNetwork ‘out’ with ImgDetections output message type.
-
property
outNetwork
¶ Outputs unparsed inference results.
-
property
passthrough
¶ Passthrough message on which the inference was performed.
Suitable for when input queue is set to non-blocking behavior.
-
setConfidenceThreshold
(self: depthai.node.DetectionNetwork, thresh: float) → None¶ Specifies confidence threshold at which to filter the rest of the detections.
- Parameter
thresh
: Detection confidence must be greater than specified threshold to be added to the list
- Parameter
-
-
class
depthai.node.
DetectionParser
¶ Bases:
depthai.Node
DetectionParser node. Parses detection results from different neural networks and is being used internally by MobileNetDetectionNetwork and YoloDetectionNetwork.
Classes:
alias of
depthai.DetectionParserProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getAnchorMasks
(self)Get anchor masks
getAnchors
(self)Get anchors
getConfidenceThreshold
(self)Retrieves threshold at which to filter the rest of the detections.
getCoordinateSize
(self)Get coordianate size
getIouThreshold
(self)Get Iou threshold
getNNFamily
(self)Gets NN Family to parse
getNumClasses
(self)Get num classes
getNumFramesPool
(self)Returns number of frames in pool
setAnchorMasks
(self, anchorMasks, List[int]])Set anchor masks
setAnchors
(self, anchors)Set anchors
setBlob
(self, blob)Retrieves some input tensor information from the blob
setConfidenceThreshold
(self, thresh)Specifies confidence threshold at which to filter the rest of the detections.
setCoordinateSize
(self, coordinates)Set coordianate size
setIouThreshold
(self, thresh)Set Iou threshold
setNNFamily
(self, type)Sets NN Family to parse
setNumClasses
(self, numClasses)Set num classes
setNumFramesPool
(self, numFramesPool)Specify number of frames in pool.
Attributes:
Input NN results with detection data to parse Default queue is blocking with size 5
Outputs image frame with detected edges
-
Properties
¶ alias of
depthai.DetectionParserProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
parser
Options for parser
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getAnchorMasks
(self: depthai.node.DetectionParser) → Dict[str, List[int]]¶ Get anchor masks
-
getAnchors
(self: depthai.node.DetectionParser) → List[float]¶ Get anchors
-
getConfidenceThreshold
(self: depthai.node.DetectionParser) → float¶ Retrieves threshold at which to filter the rest of the detections.
- Returns
Detection confidence
-
getCoordinateSize
(self: depthai.node.DetectionParser) → int¶ Get coordianate size
-
getIouThreshold
(self: depthai.node.DetectionParser) → float¶ Get Iou threshold
-
getNNFamily
(self: depthai.node.DetectionParser) → depthai.DetectionNetworkType¶ Gets NN Family to parse
-
getNumClasses
(self: depthai.node.DetectionParser) → int¶ Get num classes
-
getNumFramesPool
(self: depthai.node.DetectionParser) → int¶ Returns number of frames in pool
-
property
input
¶ Input NN results with detection data to parse Default queue is blocking with size 5
-
property
out
¶ Outputs image frame with detected edges
-
setAnchorMasks
(self: depthai.node.DetectionParser, anchorMasks: Dict[str, List[int]]) → None¶ Set anchor masks
-
setAnchors
(self: depthai.node.DetectionParser, anchors: List[float]) → None¶ Set anchors
-
setBlob
(self: depthai.node.DetectionParser, blob: depthai.OpenVINO.Blob) → None¶ Retrieves some input tensor information from the blob
- Parameter
blob
: OpenVINO blob to retrieve the information from
- Parameter
-
setConfidenceThreshold
(self: depthai.node.DetectionParser, thresh: float) → None¶ Specifies confidence threshold at which to filter the rest of the detections.
- Parameter
thresh
: Detection confidence must be greater than specified threshold to be added to the list
- Parameter
-
setCoordinateSize
(self: depthai.node.DetectionParser, coordinates: int) → None¶ Set coordianate size
-
setIouThreshold
(self: depthai.node.DetectionParser, thresh: float) → None¶ Set Iou threshold
-
setNNFamily
(self: depthai.node.DetectionParser, type: depthai.DetectionNetworkType) → None¶ Sets NN Family to parse
-
setNumClasses
(self: depthai.node.DetectionParser, numClasses: int) → None¶ Set num classes
-
setNumFramesPool
(self: depthai.node.DetectionParser, numFramesPool: int) → None¶ Specify number of frames in pool.
- Parameter
numFramesPool
: How many frames should the pool have
- Parameter
-
-
class
depthai.node.
EdgeDetector
¶ Bases:
depthai.Node
EdgeDetector node. Performs edge detection using 3x3 Sobel filter
Classes:
alias of
depthai.EdgeDetectorProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getWaitForConfigInput
(self)See also
setWaitForConfigInput
setMaxOutputFrameSize
(self, arg0)Specify maximum size of output image.
setNumFramesPool
(self, arg0)Specify number of frames in pool.
setWaitForConfigInput
(self, wait)Specify whether or not wait until configuration message arrives to inputConfig Input.
Attributes:
Initial config to use for edge detection.
Input EdgeDetectorConfig message with ability to modify parameters in runtime.
Input image on which edge detection is performed.
Outputs image frame with detected edges
-
Properties
¶ alias of
depthai.EdgeDetectorProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
initialConfig
Initial edge detector config
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.
-
getWaitForConfigInput
(self: depthai.node.EdgeDetector) → bool¶ See also
setWaitForConfigInput
- Returns
True if wait for inputConfig message, false otherwise
-
property
initialConfig
¶ Initial config to use for edge detection.
-
property
inputConfig
¶ Input EdgeDetectorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
inputImage
¶ Input image on which edge detection is performed. Default queue is non-blocking with size 4.
-
property
outputImage
¶ Outputs image frame with detected edges
-
setMaxOutputFrameSize
(self: depthai.node.EdgeDetector, arg0: int) → None¶ Specify maximum size of output image.
- Parameter
maxFrameSize
: Maximum frame size in bytes
- Parameter
-
setNumFramesPool
(self: depthai.node.EdgeDetector, arg0: int) → None¶ Specify number of frames in pool.
- Parameter
numFramesPool
: How many frames should the pool have
- Parameter
-
setWaitForConfigInput
(self: depthai.node.EdgeDetector, wait: bool) → None¶ Specify whether or not wait until configuration message arrives to inputConfig Input.
- Parameter
wait
: True to wait for configuration message, false otherwise.
- Parameter
-
-
class
depthai.node.
FeatureTracker
¶ Bases:
depthai.Node
FeatureTracker node. Performs feature tracking and reidentification using motion estimation between 2 consecutive frames.
Classes:
alias of
depthai.FeatureTrackerProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getWaitForConfigInput
(self)See also
setWaitForConfigInput
setHardwareResources
(self, numShaves, …)Specify allocated hardware resources for feature tracking.
setWaitForConfigInput
(self, wait)Specify whether or not wait until configuration message arrives to inputConfig Input.
Attributes:
Initial config to use for feature tracking.
Input FeatureTrackerConfig message with ability to modify parameters in runtime.
Input message with frame data on which feature tracking is performed.
Outputs TrackedFeatures message that carries tracked features results.
Passthrough message on which the calculation was performed.
-
Properties
¶ alias of
depthai.FeatureTrackerProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
initialConfig
Initial feature tracker config
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.
-
getWaitForConfigInput
(self: depthai.node.FeatureTracker) → bool¶ See also
setWaitForConfigInput
- Returns
True if wait for inputConfig message, false otherwise
-
property
initialConfig
¶ Initial config to use for feature tracking.
-
property
inputConfig
¶ Input FeatureTrackerConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
inputImage
¶ Input message with frame data on which feature tracking is performed. Default queue is non-blocking with size 4.
-
property
outputFeatures
¶ Outputs TrackedFeatures message that carries tracked features results.
-
property
passthroughInputImage
¶ Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
-
setHardwareResources
(self: depthai.node.FeatureTracker, numShaves: int, numMemorySlices: int) → None¶ Specify allocated hardware resources for feature tracking. 2 shaves/memory slices are required for optical flow, 1 for corner detection only.
- Parameter
numShaves
: Number of shaves. Maximum 2.
- Parameter
numMemorySlices
: Number of memory slices. Maximum 2.
- Parameter
-
setWaitForConfigInput
(self: depthai.node.FeatureTracker, wait: bool) → None¶ Specify whether or not wait until configuration message arrives to inputConfig Input.
- Parameter
wait
: True to wait for configuration message, false otherwise.
- Parameter
-
-
class
depthai.node.
IMU
¶ Bases:
depthai.Node
IMU node for BNO08X.
Classes:
alias of
depthai.IMUProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
enableFirmwareUpdate
(self, arg0)enableIMUSensor
(*args, **kwargs)Overloaded function.
getBatchReportThreshold
(self)Above this packet threshold data will be sent to host, if queue is not blocked
getMaxBatchReports
(self)Maximum number of IMU packets in a batch report
setBatchReportThreshold
(self, …)Above this packet threshold data will be sent to host, if queue is not blocked
setMaxBatchReports
(self, maxBatchReports)Maximum number of IMU packets in a batch report
Attributes:
Outputs IMUData message that carries IMU packets.
-
Properties
¶ alias of
depthai.IMUProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
batchReportThreshold
enableFirmwareUpdate
imuSensors
maxBatchReports
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
enableFirmwareUpdate
(self: depthai.node.IMU, arg0: bool) → None¶
-
enableIMUSensor
(*args, **kwargs)¶ Overloaded function.
enableIMUSensor(self: depthai.node.IMU, sensorConfig: depthai.IMUSensorConfig) -> None
Enable a new IMU sensor with explicit configuration
enableIMUSensor(self: depthai.node.IMU, sensorConfigs: List[depthai.IMUSensorConfig]) -> None
Enable a list of IMU sensors with explicit configuration
enableIMUSensor(self: depthai.node.IMU, sensor: depthai.IMUSensor, reportRate: int) -> None
Enable a new IMU sensor with default configuration
enableIMUSensor(self: depthai.node.IMU, sensors: List[depthai.IMUSensor], reportRate: int) -> None
Enable a list of IMU sensors with default configuration
-
getBatchReportThreshold
(self: depthai.node.IMU) → int¶ Above this packet threshold data will be sent to host, if queue is not blocked
-
getMaxBatchReports
(self: depthai.node.IMU) → int¶ Maximum number of IMU packets in a batch report
-
property
out
¶ Outputs IMUData message that carries IMU packets.
-
setBatchReportThreshold
(self: depthai.node.IMU, batchReportThreshold: int) → None¶ Above this packet threshold data will be sent to host, if queue is not blocked
-
setMaxBatchReports
(self: depthai.node.IMU, maxBatchReports: int) → None¶ Maximum number of IMU packets in a batch report
-
-
class
depthai.node.
ImageManip
¶ Bases:
depthai.Node
ImageManip node. Capability to crop, resize, warp, … incoming image frames
Methods:
__init__
(*args, **kwargs)Initialize self.
getWaitForConfigInput
(self)See also
setWaitForConfigInput
setCenterCrop
(self, arg0, arg1)setCropRect
(self, arg0, arg1, arg2, arg3)setFrameType
(self, arg0)setHorizontalFlip
(self, arg0)setKeepAspectRatio
(self, arg0)setMaxOutputFrameSize
(self, arg0)Specify maximum size of output image.
setNumFramesPool
(self, arg0)Specify number of frames in pool.
setResize
(self, arg0, arg1)setResizeThumbnail
(self, arg0, arg1, arg2, …)setWaitForConfigInput
(self, wait)Specify whether or not wait until configuration message arrives to inputConfig Input.
setWarpMesh
(*args, **kwargs)Overloaded function.
Attributes:
Initial config to use when manipulating frames
Input ImageManipConfig message with ability to modify parameters in runtime Default queue is blocking with size 8
Input image to be modified Default queue is blocking with size 8
Outputs ImgFrame message that carries modified image.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getWaitForConfigInput
(self: depthai.node.ImageManip) → bool¶ See also
setWaitForConfigInput
- Returns
True if wait for inputConfig message, false otherwise
-
property
initialConfig
¶ Initial config to use when manipulating frames
-
property
inputConfig
¶ Input ImageManipConfig message with ability to modify parameters in runtime Default queue is blocking with size 8
-
property
inputImage
¶ Input image to be modified Default queue is blocking with size 8
-
property
out
¶ Outputs ImgFrame message that carries modified image.
-
setCenterCrop
(self: depthai.node.ImageManip, arg0: float, arg1: float) → None¶
-
setCropRect
(self: depthai.node.ImageManip, arg0: float, arg1: float, arg2: float, arg3: float) → None¶
-
setFrameType
(self: depthai.node.ImageManip, arg0: depthai.RawImgFrame.Type) → None¶
-
setHorizontalFlip
(self: depthai.node.ImageManip, arg0: bool) → None¶
-
setKeepAspectRatio
(self: depthai.node.ImageManip, arg0: bool) → None¶
-
setMaxOutputFrameSize
(self: depthai.node.ImageManip, arg0: int) → None¶ Specify maximum size of output image.
- Parameter
maxFrameSize
: Maximum frame size in bytes
- Parameter
-
setNumFramesPool
(self: depthai.node.ImageManip, arg0: int) → None¶ Specify number of frames in pool.
- Parameter
numFramesPool
: How many frames should the pool have
- Parameter
-
setResize
(self: depthai.node.ImageManip, arg0: int, arg1: int) → None¶
-
setResizeThumbnail
(self: depthai.node.ImageManip, arg0: int, arg1: int, arg2: int, arg3: int, arg4: int) → None¶
-
setWaitForConfigInput
(self: depthai.node.ImageManip, wait: bool) → None¶ Specify whether or not wait until configuration message arrives to inputConfig Input.
- Parameter
wait
: True to wait for configuration message, false otherwise.
- Parameter
-
setWarpMesh
(*args, **kwargs)¶ Overloaded function.
setWarpMesh(self: depthai.node.ImageManip, arg0: List[depthai.Point2f], arg1: int, arg2: int) -> None
setWarpMesh(self: depthai.node.ImageManip, arg0: List[Tuple[float, float]], arg1: int, arg2: int) -> None
-
-
class
depthai.node.
MessageDemux
¶ Bases:
depthai.Node
Classes:
alias of
depthai.MessageDemuxProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Input message of type MessageGroup
A map of outputs, where keys are same as in the input MessageGroup
-
Properties
¶ alias of
depthai.MessageDemuxProperties
Methods:__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
input
¶ Input message of type MessageGroup
-
property
outputs
¶ A map of outputs, where keys are same as in the input MessageGroup
-
-
class
depthai.node.
MobileNetDetectionNetwork
¶ Bases:
depthai.node.DetectionNetwork
MobileNetDetectionNetwork node. Parses MobileNet results
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
depthai.node.
MobileNetSpatialDetectionNetwork
¶ Bases:
depthai.node.SpatialDetectionNetwork
MobileNetSpatialDetectionNetwork node. Mobilenet-SSD based network with spatial location data.
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
depthai.node.
MonoCamera
¶ Bases:
depthai.Node
MonoCamera node. For use with grayscale sensors.
Classes:
alias of
depthai.MonoCameraProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getBoardSocket
(self)Retrieves which board socket to use
getCamId
(self)getCamera
(self)Retrieves which camera to use by name
getFps
(self)Get rate at which camera should produce frames
getFrameEventFilter
(self)getImageOrientation
(self)Get camera image orientation
getNumFramesPool
(self)Get number of frames in main (ISP output) pool
getRawNumFramesPool
(self)Get number of frames in raw pool
getResolution
(self)Get sensor resolution
getResolutionHeight
(self)Get sensor resolution height
getResolutionSize
(self)Get sensor resolution as size
getResolutionWidth
(self)Get sensor resolution width
setBoardSocket
(self, boardSocket)Specify which board socket to use
setCamId
(self, arg0)setCamera
(self, name)Specify which camera to use by name
setFps
(self, fps)Set rate at which camera should produce frames
setFrameEventFilter
(self, events)setImageOrientation
(self, imageOrientation)Set camera image orientation
setIsp3aFps
(self, arg0)Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.).
setNumFramesPool
(self, arg0)Set number of frames in main (ISP output) pool
setRawNumFramesPool
(self, arg0)Set number of frames in raw pool
setRawOutputPacked
(self, packed)Configures whether the camera raw frames are saved as MIPI-packed to memory.
setResolution
(self, resolution)Set sensor resolution
Attributes:
Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
Initial control options to apply to sensor
Input for CameraControl message, which can modify camera parameters in runtime Default queue is blocking with size 8
Outputs ImgFrame message that carries RAW8 encoded (grayscale) frame data.
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
-
Properties
¶ alias of
depthai.MonoCameraProperties
Classes:SensorResolution
Select the camera sensor resolution: 1280×720, 1280×800, 640×400, 640×480, 1920×1200
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
boardSocket
eventFilter
fps
initialControl
isp3aFps
numFramesPool
numFramesPoolRaw
resolution
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
frameEvent
¶ Outputs metadata-only ImgFrame message as an early indicator of an incoming frame.
It’s sent on the MIPI SoF (start-of-frame) event, just after the exposure of the current frame has finished and before the exposure for next frame starts. Could be used to synchronize various processes with camera capture. Fields populated: camera id, sequence number, timestamp
-
getBoardSocket
(self: depthai.node.MonoCamera) → depthai.CameraBoardSocket¶ Retrieves which board socket to use
- Returns
Board socket to use
-
getCamId
(self: depthai.node.MonoCamera) → int¶
-
getCamera
(self: depthai.node.MonoCamera) → str¶ Retrieves which camera to use by name
- Returns
Name of the camera to use
-
getFps
(self: depthai.node.MonoCamera) → float¶ Get rate at which camera should produce frames
- Returns
Rate in frames per second
-
getFrameEventFilter
(self: depthai.node.MonoCamera) → List[depthai.FrameEvent]¶
-
getImageOrientation
(self: depthai.node.MonoCamera) → depthai.CameraImageOrientation¶ Get camera image orientation
-
getNumFramesPool
(self: depthai.node.MonoCamera) → int¶ Get number of frames in main (ISP output) pool
-
getRawNumFramesPool
(self: depthai.node.MonoCamera) → int¶ Get number of frames in raw pool
-
getResolution
(self: depthai.node.MonoCamera) → depthai.MonoCameraProperties.SensorResolution¶ Get sensor resolution
-
getResolutionHeight
(self: depthai.node.MonoCamera) → int¶ Get sensor resolution height
-
getResolutionSize
(self: depthai.node.MonoCamera) → Tuple[int, int]¶ Get sensor resolution as size
-
getResolutionWidth
(self: depthai.node.MonoCamera) → int¶ Get sensor resolution width
-
property
initialControl
¶ Initial control options to apply to sensor
-
property
inputControl
¶ Input for CameraControl message, which can modify camera parameters in runtime Default queue is blocking with size 8
-
property
out
¶ Outputs ImgFrame message that carries RAW8 encoded (grayscale) frame data.
Suitable for use StereoDepth node. Processed by ISP
-
property
raw
¶ Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.
Captured directly from the camera sensor
-
setBoardSocket
(self: depthai.node.MonoCamera, boardSocket: depthai.CameraBoardSocket) → None¶ Specify which board socket to use
- Parameter
boardSocket
: Board socket to use
- Parameter
-
setCamId
(self: depthai.node.MonoCamera, arg0: int) → None¶
-
setCamera
(self: depthai.node.MonoCamera, name: str) → None¶ Specify which camera to use by name
- Parameter
name
: Name of the camera to use
- Parameter
-
setFps
(self: depthai.node.MonoCamera, fps: float) → None¶ Set rate at which camera should produce frames
- Parameter
fps
: Rate in frames per second
- Parameter
-
setFrameEventFilter
(self: depthai.node.MonoCamera, events: List[depthai.FrameEvent]) → None¶
-
setImageOrientation
(self: depthai.node.MonoCamera, imageOrientation: depthai.CameraImageOrientation) → None¶ Set camera image orientation
-
setIsp3aFps
(self: depthai.node.MonoCamera, arg0: int) → None¶ Isp 3A rate (auto focus, auto exposure, auto white balance, camera controls etc.). Default (0) matches the camera FPS, meaning that 3A is running on each frame. Reducing the rate of 3A reduces the CPU usage on CSS, but also increases the convergence rate of 3A. Note that camera controls will be processed at this rate. E.g. if camera is running at 30 fps, and camera control is sent at every frame, but 3A fps is set to 15, the camera control messages will be processed at 15 fps rate, which will lead to queueing.
-
setNumFramesPool
(self: depthai.node.MonoCamera, arg0: int) → None¶ Set number of frames in main (ISP output) pool
-
setRawNumFramesPool
(self: depthai.node.MonoCamera, arg0: int) → None¶ Set number of frames in raw pool
-
setRawOutputPacked
(self: depthai.node.MonoCamera, packed: bool) → None¶ Configures whether the camera raw frames are saved as MIPI-packed to memory. The packed format is more efficient, consuming less memory on device, and less data to send to host: RAW10: 4 pixels saved on 5 bytes, RAW12: 2 pixels saved on 3 bytes. When packing is disabled (false), data is saved lsb-aligned, e.g. a RAW10 pixel will be stored as uint16, on bits 9..0: 0b0000’00pp’pppp’pppp. Default is auto: enabled for standard color/monochrome cameras where ISP can work with both packed/unpacked, but disabled for other cameras like ToF.
-
setResolution
(self: depthai.node.MonoCamera, resolution: depthai.MonoCameraProperties.SensorResolution) → None¶ Set sensor resolution
-
-
class
depthai.node.
NeuralNetwork
¶ Bases:
depthai.Node
NeuralNetwork node. Runs a neural inference on input data.
Classes:
alias of
depthai.NeuralNetworkProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getNumInferenceThreads
(self)How many inference threads will be used to run the network
setBlob
(*args, **kwargs)Overloaded function.
setBlobPath
(self, path)Load network blob into assets and use once pipeline is started.
setNumInferenceThreads
(self, numThreads)How many threads should the node use to run the network.
setNumNCEPerInferenceThread
(self, …)How many Neural Compute Engines should a single thread use for inference
setNumPoolFrames
(self, numFrames)Specifies how many frames will be available in the pool
Attributes:
Input message with data to be inferred upon Default queue is blocking with size 5
Inputs mapped to network inputs.
Outputs NNData message that carries inference results
Passthrough message on which the inference was performed.
Passthroughs which correspond to specified input
-
Properties
¶ alias of
depthai.NeuralNetworkProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
blobSize
blobUri
numFrames
numNCEPerThread
numThreads
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getNumInferenceThreads
(self: depthai.node.NeuralNetwork) → int¶ How many inference threads will be used to run the network
- Returns
Number of threads, 0, 1 or 2. Zero means AUTO
-
property
input
¶ Input message with data to be inferred upon Default queue is blocking with size 5
-
property
inputs
¶ Inputs mapped to network inputs. Useful for inferring from separate data sources Default input is non-blocking with queue size 1 and waits for messages
-
property
out
¶ Outputs NNData message that carries inference results
-
property
passthrough
¶ Passthrough message on which the inference was performed.
Suitable for when input queue is set to non-blocking behavior.
-
property
passthroughs
¶ Passthroughs which correspond to specified input
-
setBlob
(*args, **kwargs)¶ Overloaded function.
setBlob(self: depthai.node.NeuralNetwork, blob: depthai.OpenVINO.Blob) -> None
Load network blob into assets and use once pipeline is started.
- Parameter
blob
: Network blob
setBlob(self: depthai.node.NeuralNetwork, path: Path) -> None
Same functionality as the setBlobPath(). Load network blob into assets and use once pipeline is started.
- Throws:
Error if file doesn’t exist or isn’t a valid network blob.
- Parameter
path
: Path to network blob
-
setBlobPath
(self: depthai.node.NeuralNetwork, path: Path) → None¶ Load network blob into assets and use once pipeline is started.
- Throws:
Error if file doesn’t exist or isn’t a valid network blob.
- Parameter
path
: Path to network blob
-
setNumInferenceThreads
(self: depthai.node.NeuralNetwork, numThreads: int) → None¶ How many threads should the node use to run the network.
- Parameter
numThreads
: Number of threads to dedicate to this node
- Parameter
-
setNumNCEPerInferenceThread
(self: depthai.node.NeuralNetwork, numNCEPerThread: int) → None¶ How many Neural Compute Engines should a single thread use for inference
- Parameter
numNCEPerThread
: Number of NCE per thread
- Parameter
-
setNumPoolFrames
(self: depthai.node.NeuralNetwork, numFrames: int) → None¶ Specifies how many frames will be available in the pool
- Parameter
numFrames
: How many frames will pool have
- Parameter
-
-
class
depthai.node.
ObjectTracker
¶ Bases:
depthai.Node
ObjectTracker node. Performs object tracking using Kalman filter and hungarian algorithm.
Classes:
alias of
depthai.ObjectTrackerProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
setDetectionLabelsToTrack
(self, labels)Specify detection labels to track.
setMaxObjectsToTrack
(self, maxObjectsToTrack)Specify maximum number of object to track.
setTrackerIdAssignmentPolicy
(self, type)Specify tracker ID assignment policy.
setTrackerThreshold
(self, threshold)Specify tracker threshold.
setTrackerType
(self, type)Specify tracker type algorithm.
setTrackingPerClass
(self, trackingPerClass)Whether tracker should take into consideration class label for tracking.
Attributes:
Input ImgFrame message on which object detection was performed.
Input message with image detection from neural network.
Input ImgFrame message on which tracking will be performed.
Outputs Tracklets message that carries object tracking results.
Passthrough ImgFrame message on which object detection was performed.
Passthrough image detections message from neural network output.
Passthrough ImgFrame message on which tracking was performed.
-
Properties
¶ alias of
depthai.ObjectTrackerProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
detectionLabelsToTrack
Which detections labels to track.
maxObjectsToTrack
Maximum number of objects to track.
trackerIdAssignmentPolicy
New ID assignment policy.
trackerThreshold
Confidence threshold for tracklets.
trackerType
Tracking method.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
inputDetectionFrame
¶ Input ImgFrame message on which object detection was performed. Default queue is non-blocking with size 4.
-
property
inputDetections
¶ Input message with image detection from neural network. Default queue is non- blocking with size 4.
-
property
inputTrackerFrame
¶ Input ImgFrame message on which tracking will be performed. RGBp, BGRp, NV12, YUV420p types are supported. Default queue is non-blocking with size 4.
-
property
out
¶ Outputs Tracklets message that carries object tracking results.
-
property
passthroughDetectionFrame
¶ Passthrough ImgFrame message on which object detection was performed. Suitable for when input queue is set to non-blocking behavior.
-
property
passthroughDetections
¶ Passthrough image detections message from neural network output. Suitable for when input queue is set to non-blocking behavior.
-
property
passthroughTrackerFrame
¶ Passthrough ImgFrame message on which tracking was performed. Suitable for when input queue is set to non-blocking behavior.
-
setDetectionLabelsToTrack
(self: depthai.node.ObjectTracker, labels: List[int]) → None¶ Specify detection labels to track.
- Parameter
labels
: Detection labels to track. Default every label is tracked from image detection network output.
- Parameter
-
setMaxObjectsToTrack
(self: depthai.node.ObjectTracker, maxObjectsToTrack: int) → None¶ Specify maximum number of object to track.
- Parameter
maxObjectsToTrack
: Maximum number of object to track. Maximum 60 in case of SHORT_TERM_KCF, otherwise 1000.
- Parameter
-
setTrackerIdAssignmentPolicy
(self: depthai.node.ObjectTracker, type: depthai.TrackerIdAssignmentPolicy) → None¶ Specify tracker ID assignment policy.
- Parameter
type
: Tracker ID assignment policy.
- Parameter
-
setTrackerThreshold
(self: depthai.node.ObjectTracker, threshold: float) → None¶ Specify tracker threshold.
- Parameter
threshold
: Above this threshold the detected objects will be tracked. Default 0, all image detections are tracked.
- Parameter
-
setTrackerType
(self: depthai.node.ObjectTracker, type: depthai.TrackerType) → None¶ Specify tracker type algorithm.
- Parameter
type
: Tracker type.
- Parameter
-
setTrackingPerClass
(self: depthai.node.ObjectTracker, trackingPerClass: bool) → None¶ Whether tracker should take into consideration class label for tracking.
-
-
class
depthai.node.
PointCloud
¶ Bases:
depthai.Node
PointCloud node. Computes point cloud from depth frames.
Classes:
alias of
depthai.PointCloudProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
setNumFramesPool
(self, arg0)Specify number of frames in pool.
Attributes:
Initial config to use when computing the point cloud.
Input PointCloudConfig message with ability to modify parameters in runtime.
Input message with depth data used to create the point cloud.
Outputs PointCloudData message
Passthrough depth from which the point cloud was calculated.
-
Properties
¶ alias of
depthai.PointCloudProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
initialConfig
numFramesPool
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
initialConfig
¶ Initial config to use when computing the point cloud.
-
property
inputConfig
¶ Input PointCloudConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
inputDepth
¶ Input message with depth data used to create the point cloud. Default queue is non-blocking with size 4.
-
property
outputPointCloud
¶ Outputs PointCloudData message
-
property
passthroughDepth
¶ Passthrough depth from which the point cloud was calculated. Suitable for when input queue is set to non-blocking behavior.
-
setNumFramesPool
(self: depthai.node.PointCloud, arg0: int) → None¶ Specify number of frames in pool.
- Parameter
numFramesPool
: How many frames should the pool have
- Parameter
-
-
class
depthai.node.
SPIIn
¶ Bases:
depthai.Node
SPIIn node. Receives messages over SPI.
Classes:
alias of
depthai.SPIInProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getBusId
(self)Get bus id
getMaxDataSize
(self)Get maximum messages size in bytes
getNumFrames
(self)Get number of frames in pool
getStreamName
(self)Get stream name
setBusId
(self, id)Specifies SPI Bus number to use
setMaxDataSize
(self, maxDataSize)Set maximum message size it can receive
setNumFrames
(self, numFrames)Set number of frames in pool for sending messages forward
setStreamName
(self, name)Specifies stream name over which the node will receive data
Attributes:
Outputs message of same type as send from host.
-
Properties
¶ alias of
depthai.SPIInProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
busId
maxDataSize
numFrames
streamName
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getBusId
(self: depthai.node.SPIIn) → int¶ Get bus id
-
getMaxDataSize
(self: depthai.node.SPIIn) → int¶ Get maximum messages size in bytes
-
getNumFrames
(self: depthai.node.SPIIn) → int¶ Get number of frames in pool
-
getStreamName
(self: depthai.node.SPIIn) → str¶ Get stream name
-
property
out
¶ Outputs message of same type as send from host.
-
setBusId
(self: depthai.node.SPIIn, id: int) → None¶ Specifies SPI Bus number to use
- Parameter
id
: SPI Bus id
- Parameter
-
setMaxDataSize
(self: depthai.node.SPIIn, maxDataSize: int) → None¶ Set maximum message size it can receive
- Parameter
maxDataSize
: Maximum size in bytes
- Parameter
-
setNumFrames
(self: depthai.node.SPIIn, numFrames: int) → None¶ Set number of frames in pool for sending messages forward
- Parameter
numFrames
: Maximum number of frames in pool
- Parameter
-
setStreamName
(self: depthai.node.SPIIn, name: str) → None¶ Specifies stream name over which the node will receive data
- Parameter
name
: Stream name
- Parameter
-
-
class
depthai.node.
SPIOut
¶ Bases:
depthai.Node
SPIOut node. Sends messages over SPI.
Classes:
alias of
depthai.SPIOutProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
setBusId
(self, id)Specifies SPI Bus number to use
setStreamName
(self, name)Specifies stream name over which the node will send data
Attributes:
Input for any type of messages to be transferred over SPI stream
-
Properties
¶ alias of
depthai.SPIOutProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
busId
streamName
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
input
¶ Input for any type of messages to be transferred over SPI stream
Default queue is blocking with size 8
-
setBusId
(self: depthai.node.SPIOut, id: int) → None¶ Specifies SPI Bus number to use
- Parameter
id
: SPI Bus id
- Parameter
-
setStreamName
(self: depthai.node.SPIOut, name: str) → None¶ Specifies stream name over which the node will send data
- Parameter
name
: Stream name
- Parameter
-
-
class
depthai.node.
Script
¶ Bases:
depthai.Node
Classes:
alias of
depthai.ScriptProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getProcessor
(self)Get on which processor the script should run
getScriptName
(self)Get the script name in utf-8.
setProcessor
(self, arg0)Set on which processor the script should run
setScript
(*args, **kwargs)Overloaded function.
setScriptPath
(*args, **kwargs)Overloaded function.
Attributes:
-
Properties
¶ alias of
depthai.ScriptProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
processor
Which processor should execute the script
scriptName
Name of script
scriptUri
Uri which points to actual script
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getProcessor
(self: depthai.node.Script) → depthai.ProcessorType¶ Get on which processor the script should run
- Returns
Processor type - Leon CSS or Leon MSS
-
getScriptName
(self: depthai.node.Script) → str¶ Get the script name in utf-8.
When name set with setScript() or setScriptPath(), returns that name. When script loaded with setScriptPath() with name not provided, returns the utf-8 string of that path. Otherwise, returns “<script>”
- Returns
std::string of script name in utf-8
-
property
inputs
¶
-
property
outputs
¶
-
setProcessor
(self: depthai.node.Script, arg0: depthai.ProcessorType) → None¶ Set on which processor the script should run
- Parameter
type
: Processor type - Leon CSS or Leon MSS
- Parameter
-
setScript
(*args, **kwargs)¶ Overloaded function.
setScript(self: depthai.node.Script, script: str, name: str = ‘’) -> None
Sets script data to be interpreted
- Parameter
script
: Script string to be interpreted
- Parameter
name
: Optionally set a name of this script
setScript(self: depthai.node.Script, data: List[int], name: str = ‘’) -> None
Sets script data to be interpreted
- Parameter
data
: Binary data that represents the script to be interpreted
- Parameter
name
: Optionally set a name of this script
-
setScriptPath
(*args, **kwargs)¶ Overloaded function.
setScriptPath(self: depthai.node.Script, arg0: Path, arg1: str) -> None
Specify local filesystem path to load the script
- Parameter
path
: Filesystem path to load the script
- Parameter
name
: Optionally set a name of this script, otherwise the name defaults to the path
setScriptPath(self: depthai.node.Script, path: Path, name: str = ‘’) -> None
Specify local filesystem path to load the script
- Parameter
path
: Filesystem path to load the script
- Parameter
name
: Optionally set a name of this script, otherwise the name defaults to the path
-
-
class
depthai.node.
SpatialDetectionNetwork
¶ Bases:
depthai.node.DetectionNetwork
SpatialDetectionNetwork node. Runs a neural inference on input image and calculates spatial location data.
Classes:
Methods:
__init__
(*args, **kwargs)Initialize self.
setBoundingBoxScaleFactor
(self, scaleFactor)Specifies scale factor for detected bounding boxes.
setDepthLowerThreshold
(self, lowerThreshold)Specifies lower threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
setDepthUpperThreshold
(self, upperThreshold)Specifies upper threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
setSpatialCalculationAlgorithm
(self, …)Specifies spatial location calculator algorithm: Average/Min/Max
setSpatialCalculationStepSize
(self, stepSize)Specifies spatial location calculator step size for depth calculation.
Attributes:
Outputs mapping of detected bounding boxes relative to depth map
Input message with data to be inferred upon Default queue is blocking with size 5
Input message with depth data used to retrieve spatial information about detected object Default queue is non-blocking with size 4
Outputs ImgDetections message that carries parsed detection results.
Passthrough message on which the inference was performed.
Passthrough message for depth frame on which the spatial location calculation was performed.
Output of SpatialLocationCalculator node, which is used internally by SpatialDetectionNetwork.
-
Properties
¶ alias of
depthai.SpatialDetectionNetworkProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
depthThresholds
detectedBBScaleFactor
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
boundingBoxMapping
¶ Outputs mapping of detected bounding boxes relative to depth map
Suitable for when displaying remapped bounding boxes on depth frame
-
property
input
¶ Input message with data to be inferred upon Default queue is blocking with size 5
-
property
inputDepth
¶ Input message with depth data used to retrieve spatial information about detected object Default queue is non-blocking with size 4
-
property
out
¶ Outputs ImgDetections message that carries parsed detection results.
-
property
passthrough
¶ Passthrough message on which the inference was performed.
Suitable for when input queue is set to non-blocking behavior.
-
property
passthroughDepth
¶ Passthrough message for depth frame on which the spatial location calculation was performed.
Suitable for when input queue is set to non-blocking behavior.
-
setBoundingBoxScaleFactor
(self: depthai.node.SpatialDetectionNetwork, scaleFactor: float) → None¶ Specifies scale factor for detected bounding boxes.
- Parameter
scaleFactor
: Scale factor must be in the interval (0,1].
- Parameter
-
setDepthLowerThreshold
(self: depthai.node.SpatialDetectionNetwork, lowerThreshold: int) → None¶ Specifies lower threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
- Parameter
lowerThreshold
: LowerThreshold must be in the interval [0,upperThreshold] and less than upperThreshold.
- Parameter
-
setDepthUpperThreshold
(self: depthai.node.SpatialDetectionNetwork, upperThreshold: int) → None¶ Specifies upper threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
- Parameter
upperThreshold
: UpperThreshold must be in the interval (lowerThreshold,65535].
- Parameter
-
setSpatialCalculationAlgorithm
(self: depthai.node.SpatialDetectionNetwork, calculationAlgorithm: depthai.SpatialLocationCalculatorAlgorithm) → None¶ Specifies spatial location calculator algorithm: Average/Min/Max
- Parameter
calculationAlgorithm
: Calculation algorithm.
- Parameter
-
setSpatialCalculationStepSize
(self: depthai.node.SpatialDetectionNetwork, stepSize: int) → None¶ Specifies spatial location calculator step size for depth calculation. Step size 1 means that every pixel is taken into calculation, size 2 means every second etc.
- Parameter
stepSize
: Step size.
- Parameter
-
property
spatialLocationCalculatorOutput
¶ Output of SpatialLocationCalculator node, which is used internally by SpatialDetectionNetwork. Suitable when extra information is required from SpatialLocationCalculator node, e.g. minimum, maximum distance.
-
-
class
depthai.node.
SpatialLocationCalculator
¶ Bases:
depthai.Node
SpatialLocationCalculator node. Calculates spatial location data on a set of ROIs on depth map.
Classes:
Methods:
__init__
(*args, **kwargs)Initialize self.
getWaitForConfigInput
(self)See also
setWaitForConfigInput
setWaitForConfigInput
(self, wait)Specify whether or not wait until configuration message arrives to inputConfig Input.
Attributes:
Initial config to use when calculating spatial location data.
Input SpatialLocationCalculatorConfig message with ability to modify parameters in runtime.
Input message with depth data used to retrieve spatial information about detected object.
Outputs SpatialLocationCalculatorData message that carries spatial location results.
Passthrough message on which the calculation was performed.
-
Properties
¶ alias of
depthai.SpatialLocationCalculatorProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
roiConfig
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getWaitForConfigInput
(self: depthai.node.SpatialLocationCalculator) → bool¶ See also
setWaitForConfigInput
- Returns
True if wait for inputConfig message, false otherwise
-
property
initialConfig
¶ Initial config to use when calculating spatial location data.
-
property
inputConfig
¶ Input SpatialLocationCalculatorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
inputDepth
¶ Input message with depth data used to retrieve spatial information about detected object. Default queue is non-blocking with size 4.
-
property
out
¶ Outputs SpatialLocationCalculatorData message that carries spatial location results.
-
property
passthroughDepth
¶ Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
-
setWaitForConfigInput
(self: depthai.node.SpatialLocationCalculator, wait: bool) → None¶ Specify whether or not wait until configuration message arrives to inputConfig Input.
- Parameter
wait
: True to wait for configuration message, false otherwise.
- Parameter
-
-
class
depthai.node.
StereoDepth
¶ Bases:
depthai.Node
StereoDepth node. Compute stereo disparity and depth from left-right image pair.
Classes:
Preset modes for stereo depth.
alias of
depthai.StereoDepthProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
enableDistortionCorrection
(self, arg0)Equivalent to useHomographyRectification(!enableDistortionCorrection)
getMaxDisparity
(self)Useful for normalization of the disparity map.
loadMeshData
(self, dataLeft, dataRight)Specify mesh calibration data for ‘left’ and ‘right’ inputs, as vectors of bytes.
loadMeshFiles
(self, pathLeft, pathRight)Specify local filesystem paths to the mesh calibration files for ‘left’ and ‘right’ inputs.
setAlphaScaling
(self, arg0)Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image).
setBaseline
(self, arg0)Override baseline from calibration.
setConfidenceThreshold
(self, arg0)Confidence threshold for disparity calculation
setDefaultProfilePreset
(self, arg0)Sets a default preset based on specified option.
setDepthAlign
(*args, **kwargs)Overloaded function.
setDepthAlignmentUseSpecTranslation
(self, arg0)Use baseline information for depth alignment from specs (design data) or from calibration.
setDisparityToDepthUseSpecTranslation
(self, arg0)Use baseline information for disparity to depth conversion from specs (design data) or from calibration.
setEmptyCalibration
(self)Specify that a passthrough/dummy calibration should be used, when input frames are already rectified (e.g.
setExtendedDisparity
(self, enable)Disparity range increased from 0-95 to 0-190, combined from full resolution and downscaled images.
setFocalLength
(self, arg0)Override focal length from calibration.
setFocalLengthFromCalibration
(self, arg0)Whether to use focal length from calibration intrinsics or calculate based on calibration FOV.
setInputResolution
(*args, **kwargs)Overloaded function.
setLeftRightCheck
(self, enable)Computes and combines disparities in both L-R and R-L directions, and combine them.
setMedianFilter
(self, arg0)Parameter
median
:setMeshStep
(self, width, height)Set the distance between mesh points.
setNumFramesPool
(self, arg0)Specify number of frames in pool.
setOutputDepth
(self, arg0)setOutputKeepAspectRatio
(self, keep)Specifies whether the frames resized by setOutputSize should preserve aspect ratio, with potential cropping when enabled.
setOutputRectified
(self, arg0)setOutputSize
(self, width, height)Specify disparity/depth output resolution size, implemented by scaling.
setPostProcessingHardwareResources
(self, …)Specify allocated hardware resources for stereo depth.
setRectification
(self, enable)Rectify input images or not.
setRectificationUseSpecTranslation
(self, arg0)Obtain rectification matrices using spec translation (design data) or from calibration in calculations.
setRectifyEdgeFillColor
(self, color)Fill color for missing data at frame edges
setRectifyMirrorFrame
(self, arg0)DEPRECATED function.
setRuntimeModeSwitch
(self, arg0)Enable runtime stereo mode switch, e.g.
setSubpixel
(self, enable)Computes disparity with sub-pixel interpolation (3 fractional bits by default).
setSubpixelFractionalBits
(self, …)Number of fractional bits for subpixel mode.
useHomographyRectification
(self, arg0)Use 3x3 homography matrix for stereo rectification instead of sparse mesh generated on device.
Attributes:
Outputs ImgFrame message that carries RAW8 confidence map.
Outputs ImgFrame message that carries cost dump of disparity map.
Outputs ImgFrame message that carries left-right check first iteration (before combining with second iteration) disparity map.
Outputs ImgFrame message that carries left-right check second iteration (before combining with first iteration) disparity map.
Outputs ImgFrame message that carries extended left-right check first iteration (downscaled frame, before combining with second iteration) disparity map.
Outputs ImgFrame message that carries extended left-right check second iteration (downscaled frame, before combining with first iteration) disparity map.
Outputs ImgFrame message that carries RAW16 encoded (0..65535) depth data in depth units (millimeter by default).
RAW8 encoded (0..95) for standard mode; RAW8 encoded (0..190) for extended disparity mode; RAW16 encoded for subpixel disparity mode: - 0..760 for 3 fractional bits (by default) - 0..1520 for 4 fractional bits - 0..3040 for 5 fractional bits
Initial config to use for StereoDepth.
Input StereoDepthConfig message with ability to modify parameters in runtime.
Input for left ImgFrame of left-right pair
Outputs StereoDepthConfig message that contains current stereo configuration.
Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
Input for right ImgFrame of left-right pair
Passthrough ImgFrame message from ‘left’ Input.
Passthrough ImgFrame message from ‘right’ Input.
-
class
PresetMode
¶ Bases:
pybind11_builtins.pybind11_object
Preset modes for stereo depth.
Members:
HIGH_ACCURACY : Prefers accuracy over density. More invalid depth values, but less outliers.
HIGH_DENSITY : Prefers density over accuracy. Less invalid depth values, but more outliers.
Attributes:
Methods:
__init__
(self, value)-
HIGH_ACCURACY
= <PresetMode.HIGH_ACCURACY: 0>¶
-
HIGH_DENSITY
= <PresetMode.HIGH_DENSITY: 1>¶
-
__init__
(self: depthai.node.StereoDepth.PresetMode, value: int) → None¶
-
property
name
¶
-
property
value
¶
-
-
Properties
¶ alias of
depthai.StereoDepthProperties
Classes:DepthAlign
Align the disparity/depth to the perspective of a rectified output, or center it
MedianFilter
Median filter config
RectificationMesh
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
alphaScaling
Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image).
baseline
Override baseline from calibration.
depthAlignCamera
Which camera to align disparity/depth to.
depthAlignmentUseSpecTranslation
Use baseline information for depth alignment from specs (design data) or from calibration.
disparityToDepthUseSpecTranslation
Use baseline information for disparity to depth conversion from specs (design data) or from calibration.
enableRectification
Enable stereo rectification/dewarp or not.
enableRuntimeStereoModeSwitch
Whether to enable switching stereo modes at runtime or not.
focalLength
Override focal length from calibration.
focalLengthFromCalibration
Whether to use horizontal focal length from calibration intrinsics (fx) or calculate based on calibration FOV.
height
Input frame height.
initialConfig
Initial stereo config
mesh
Specify a direct warp mesh to be used for rectification, instead of intrinsics + extrinsic matrices
numFramesPool
Num frames in output pool
numPostProcessingMemorySlices
Number of memory slices reserved for stereo depth post processing.
numPostProcessingShaves
Number of shaves reserved for stereo depth post processing.
outHeight
Output disparity/depth height.
outKeepAspectRatio
Whether to keep aspect ratio of the input (rectified) or not
outWidth
Output disparity/depth width.
rectificationUseSpecTranslation
Obtain rectification matrices using spec translation (design data) or from calibration in calculations.
rectifyEdgeFillColor
Fill color for missing data at frame edges - grayscale 0..255, or -1 to replicate pixels
useHomographyRectification
Use 3x3 homography matrix for stereo rectification instead of sparse mesh generated on device.
width
Input frame width.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
confidenceMap
¶ Outputs ImgFrame message that carries RAW8 confidence map. Lower values means higher confidence of the calculated disparity value. RGB alignment, left-right check or any postproccessing (e.g. median filter) is not performed on confidence map.
-
property
debugDispCostDump
¶ Outputs ImgFrame message that carries cost dump of disparity map. Useful for debugging/fine tuning.
-
property
debugDispLrCheckIt1
¶ Outputs ImgFrame message that carries left-right check first iteration (before combining with second iteration) disparity map. Useful for debugging/fine tuning.
-
property
debugDispLrCheckIt2
¶ Outputs ImgFrame message that carries left-right check second iteration (before combining with first iteration) disparity map. Useful for debugging/fine tuning.
-
property
debugExtDispLrCheckIt1
¶ Outputs ImgFrame message that carries extended left-right check first iteration (downscaled frame, before combining with second iteration) disparity map. Useful for debugging/fine tuning.
-
property
debugExtDispLrCheckIt2
¶ Outputs ImgFrame message that carries extended left-right check second iteration (downscaled frame, before combining with first iteration) disparity map. Useful for debugging/fine tuning.
-
property
depth
¶ Outputs ImgFrame message that carries RAW16 encoded (0..65535) depth data in depth units (millimeter by default).
Non-determined / invalid depth values are set to 0
-
property
disparity
¶ RAW8 encoded (0..95) for standard mode; RAW8 encoded (0..190) for extended disparity mode; RAW16 encoded for subpixel disparity mode: - 0..760 for 3 fractional bits (by default) - 0..1520 for 4 fractional bits - 0..3040 for 5 fractional bits
- Type
Outputs ImgFrame message that carries RAW8 / RAW16 encoded disparity data
-
enableDistortionCorrection
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Equivalent to useHomographyRectification(!enableDistortionCorrection)
-
getMaxDisparity
(self: depthai.node.StereoDepth) → float¶ Useful for normalization of the disparity map.
- Returns
Maximum disparity value that the node can return
-
property
initialConfig
¶ Initial config to use for StereoDepth.
-
property
inputConfig
¶ Input StereoDepthConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
left
¶ Input for left ImgFrame of left-right pair
Default queue is non-blocking with size 8
-
loadMeshData
(self: depthai.node.StereoDepth, dataLeft: List[int], dataRight: List[int]) → None¶ Specify mesh calibration data for ‘left’ and ‘right’ inputs, as vectors of bytes. Overrides useHomographyRectification behavior. See loadMeshFiles for the expected data format
-
loadMeshFiles
(self: depthai.node.StereoDepth, pathLeft: Path, pathRight: Path) → None¶ Specify local filesystem paths to the mesh calibration files for ‘left’ and ‘right’ inputs.
When a mesh calibration is set, it overrides the camera intrinsics/extrinsics matrices. Overrides useHomographyRectification behavior. Mesh format: a sequence of (y,x) points as ‘float’ with coordinates from the input image to be mapped in the output. The mesh can be subsampled, configured by setMeshStep.
With a 1280x800 resolution and the default (16,16) step, the required mesh size is:
width: 1280 / 16 + 1 = 81
height: 800 / 16 + 1 = 51
-
property
outConfig
¶ Outputs StereoDepthConfig message that contains current stereo configuration.
-
property
rectifiedLeft
¶ Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
-
property
rectifiedRight
¶ Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
-
property
right
¶ Input for right ImgFrame of left-right pair
Default queue is non-blocking with size 8
-
setAlphaScaling
(self: depthai.node.StereoDepth, arg0: float) → None¶ Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image). On some high distortion lenses, and/or due to rectification (image rotated) invalid areas may appear even with alpha=0, in these cases alpha < 0.0 helps removing invalid areas. See getOptimalNewCameraMatrix from opencv for more details.
-
setBaseline
(self: depthai.node.StereoDepth, arg0: float) → None¶ Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
-
setConfidenceThreshold
(self: depthai.node.StereoDepth, arg0: int) → None¶ Confidence threshold for disparity calculation
- Parameter
confThr
: Confidence threshold value 0..255
- Parameter
-
setDefaultProfilePreset
(self: depthai.node.StereoDepth, arg0: depthai.node.StereoDepth.PresetMode) → None¶ Sets a default preset based on specified option.
- Parameter
mode
: Stereo depth preset mode
- Parameter
-
setDepthAlign
(*args, **kwargs)¶ Overloaded function.
setDepthAlign(self: depthai.node.StereoDepth, align: depthai.RawStereoDepthConfig.AlgorithmControl.DepthAlign) -> None
- Parameter
align
: Set the disparity/depth alignment: centered (between the ‘left’ and ‘right’ inputs), or from the perspective of a rectified output stream
setDepthAlign(self: depthai.node.StereoDepth, camera: depthai.CameraBoardSocket) -> None
- Parameter
camera
: Set the camera from whose perspective the disparity/depth will be aligned
-
setDepthAlignmentUseSpecTranslation
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Use baseline information for depth alignment from specs (design data) or from calibration. Default: true
-
setDisparityToDepthUseSpecTranslation
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Use baseline information for disparity to depth conversion from specs (design data) or from calibration. Default: true
-
setEmptyCalibration
(self: depthai.node.StereoDepth) → None¶ Specify that a passthrough/dummy calibration should be used, when input frames are already rectified (e.g. sourced from recordings on the host)
-
setExtendedDisparity
(self: depthai.node.StereoDepth, enable: bool) → None¶ Disparity range increased from 0-95 to 0-190, combined from full resolution and downscaled images.
Suitable for short range objects. Currently incompatible with sub-pixel disparity
-
setFocalLength
(self: depthai.node.StereoDepth, arg0: float) → None¶ Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
-
setFocalLengthFromCalibration
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Whether to use focal length from calibration intrinsics or calculate based on calibration FOV. Default value is true.
-
setInputResolution
(*args, **kwargs)¶ Overloaded function.
setInputResolution(self: depthai.node.StereoDepth, width: int, height: int) -> None
Specify input resolution size
Optional if MonoCamera exists, otherwise necessary
setInputResolution(self: depthai.node.StereoDepth, resolution: Tuple[int, int]) -> None
Specify input resolution size
Optional if MonoCamera exists, otherwise necessary
-
setLeftRightCheck
(self: depthai.node.StereoDepth, enable: bool) → None¶ Computes and combines disparities in both L-R and R-L directions, and combine them.
For better occlusion handling, discarding invalid disparity values
-
setMedianFilter
(self: depthai.node.StereoDepth, arg0: depthai.MedianFilter) → None¶ - Parameter
median
: Set kernel size for disparity/depth median filtering, or disable
- Parameter
-
setMeshStep
(self: depthai.node.StereoDepth, width: int, height: int) → None¶ Set the distance between mesh points. Default: (16, 16)
-
setNumFramesPool
(self: depthai.node.StereoDepth, arg0: int) → None¶ Specify number of frames in pool.
- Parameter
numFramesPool
: How many frames should the pool have
- Parameter
-
setOutputDepth
(self: depthai.node.StereoDepth, arg0: bool) → None¶
-
setOutputKeepAspectRatio
(self: depthai.node.StereoDepth, keep: bool) → None¶ Specifies whether the frames resized by setOutputSize should preserve aspect ratio, with potential cropping when enabled. Default true
-
setOutputRectified
(self: depthai.node.StereoDepth, arg0: bool) → None¶
-
setOutputSize
(self: depthai.node.StereoDepth, width: int, height: int) → None¶ Specify disparity/depth output resolution size, implemented by scaling.
Currently only applicable when aligning to RGB camera
-
setPostProcessingHardwareResources
(self: depthai.node.StereoDepth, arg0: int, arg1: int) → None¶ Specify allocated hardware resources for stereo depth. Suitable only to increase post processing runtime.
- Parameter
numShaves
: Number of shaves.
- Parameter
numMemorySlices
: Number of memory slices.
- Parameter
-
setRectification
(self: depthai.node.StereoDepth, enable: bool) → None¶ Rectify input images or not.
-
setRectificationUseSpecTranslation
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Should be used only for debugging. Default: false
-
setRectifyEdgeFillColor
(self: depthai.node.StereoDepth, color: int) → None¶ Fill color for missing data at frame edges
- Parameter
color
: Grayscale 0..255, or -1 to replicate pixels
- Parameter
-
setRectifyMirrorFrame
(self: depthai.node.StereoDepth, arg0: bool) → None¶ DEPRECATED function. It was removed, since rectified images are not flipped anymore. Mirror rectified frames, only when LR-check mode is disabled. Default true. The mirroring is required to have a normal non-mirrored disparity/depth output.
A side effect of this option is disparity alignment to the perspective of left or right input: false: mapped to left and mirrored, true: mapped to right. With LR-check enabled, this option is ignored, none of the outputs are mirrored, and disparity is mapped to right.
- Parameter
enable
: True for normal disparity/depth, otherwise mirrored
- Parameter
-
setRuntimeModeSwitch
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Enable runtime stereo mode switch, e.g. from standard to LR-check. Note: when enabled resources allocated for worst case to enable switching to any mode.
-
setSubpixel
(self: depthai.node.StereoDepth, enable: bool) → None¶ Computes disparity with sub-pixel interpolation (3 fractional bits by default).
Suitable for long range. Currently incompatible with extended disparity
-
setSubpixelFractionalBits
(self: depthai.node.StereoDepth, subpixelFractionalBits: int) → None¶ Number of fractional bits for subpixel mode. Default value: 3. Valid values: 3,4,5. Defines the number of fractional disparities: 2^x. Median filter postprocessing is supported only for 3 fractional bits.
-
property
syncedLeft
¶ Passthrough ImgFrame message from ‘left’ Input.
-
property
syncedRight
¶ Passthrough ImgFrame message from ‘right’ Input.
-
useHomographyRectification
(self: depthai.node.StereoDepth, arg0: bool) → None¶ Use 3x3 homography matrix for stereo rectification instead of sparse mesh generated on device. Default behaviour is AUTO, for lenses with FOV over 85 degrees sparse mesh is used, otherwise 3x3 homography. If custom mesh data is provided through loadMeshData or loadMeshFiles this option is ignored.
- Parameter
useHomographyRectification
: true: 3x3 homography matrix generated from calibration data is used for stereo rectification, can’t correct lens distortion. false: sparse mesh is generated on-device from calibration data with mesh step specified with setMeshStep (Default: (16, 16)), can correct lens distortion. Implementation for generating the mesh is same as opencv’s initUndistortRectifyMap function. Only the first 8 distortion coefficients are used from calibration data.
- Parameter
-
class
-
class
depthai.node.
Sync
¶ Bases:
depthai.Node
Classes:
alias of
depthai.SyncProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getSyncAttempts
(self)Gets the number of sync attempts
getSyncThreshold
(self)Gets the maximal interval between messages in the group in milliseconds
setSyncAttempts
(self, maxDataSize)Set the number of attempts to get the specified max interval between messages in the group
setSyncThreshold
(self, syncThreshold)Set the maximal interval between messages in the group
Attributes:
A map of inputs
Output message of type MessageGroup
-
Properties
¶ alias of
depthai.SyncProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
syncAttempts
syncThresholdNs
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getSyncAttempts
(self: depthai.node.Sync) → int¶ Gets the number of sync attempts
-
getSyncThreshold
(self: depthai.node.Sync) → datetime.timedelta¶ Gets the maximal interval between messages in the group in milliseconds
-
property
inputs
¶ A map of inputs
-
property
out
¶ Output message of type MessageGroup
-
setSyncAttempts
(self: depthai.node.Sync, maxDataSize: int) → None¶ Set the number of attempts to get the specified max interval between messages in the group
- Parameter
syncAttempts
: Number of attempts to get the specified max interval between messages in the group: - if syncAttempts = 0 then the node sends a message as soon at the group is filled - if syncAttempts > 0 then the node will make syncAttemts attempts to synchronize before sending out a message - if syncAttempts = -1 (default) then the node will only send a message if successfully synchronized
- Parameter
-
setSyncThreshold
(self: depthai.node.Sync, syncThreshold: datetime.timedelta) → None¶ Set the maximal interval between messages in the group
- Parameter
syncThreshold
: Maximal interval between messages in the group
- Parameter
-
-
class
depthai.node.
SystemLogger
¶ Bases:
depthai.Node
SystemLogger node. Send system information periodically.
Methods:
__init__
(*args, **kwargs)Initialize self.
getRate
(self)Gets logging rate, at which messages will be sent out
setRate
(self, hz)Specify logging rate, at which messages will be sent out
Attributes:
Outputs SystemInformation message that carries various system information like memory and CPU usage, temperatures, …
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getRate
(self: depthai.node.SystemLogger) → float¶ Gets logging rate, at which messages will be sent out
-
property
out
¶ Outputs SystemInformation message that carries various system information like memory and CPU usage, temperatures, …
-
setRate
(self: depthai.node.SystemLogger, hz: float) → None¶ Specify logging rate, at which messages will be sent out
- Parameter
hz
: Sending rate in hertz (messages per second)
- Parameter
-
-
class
depthai.node.
ToF
¶ Bases:
depthai.Node
ToF node
Classes:
alias of
depthai.ToFProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
Outputs ImgFrame message that carries modified image.
Initial config to use for depth calculation.
Input ToF message with ability to modify parameters in runtime.
-
Properties
¶ alias of
depthai.ToFProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
initialConfig
Initial ToF config
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
amplitude
¶
-
property
depth
¶ Outputs ImgFrame message that carries modified image.
-
property
error
¶
-
property
initialConfig
¶ Initial config to use for depth calculation.
-
property
input
¶
-
property
inputConfig
¶ Input ToF message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
-
property
intensity
¶
-
-
class
depthai.node.
UVC
¶ Bases:
depthai.Node
UVC (USB Video Class) node
Classes:
alias of
depthai.UVCProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
setGpiosOnInit
(self, list, int])Set GPIO list <gpio_number, value> for GPIOs to set (on/off) at init
setGpiosOnStreamOff
(self, list, int])Set GPIO list <gpio_number, value> for GPIOs to set when streaming is disabled
setGpiosOnStreamOn
(self, list, int])Set GPIO list <gpio_number, value> for GPIOs to set when streaming is enabled
Attributes:
Input for image frames to be streamed over UVC
-
Properties
¶ alias of
depthai.UVCProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
gpioInit
gpioStreamOff
gpioStreamOn
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
input
¶ Input for image frames to be streamed over UVC
Default queue is blocking with size 8
-
setGpiosOnInit
(self: depthai.node.UVC, list: Dict[int, int]) → None¶ Set GPIO list <gpio_number, value> for GPIOs to set (on/off) at init
-
setGpiosOnStreamOff
(self: depthai.node.UVC, list: Dict[int, int]) → None¶ Set GPIO list <gpio_number, value> for GPIOs to set when streaming is disabled
-
setGpiosOnStreamOn
(self: depthai.node.UVC, list: Dict[int, int]) → None¶ Set GPIO list <gpio_number, value> for GPIOs to set when streaming is enabled
-
-
class
depthai.node.
VideoEncoder
¶ Bases:
depthai.Node
VideoEncoder node. Encodes frames into MJPEG, H264 or H265.
Classes:
alias of
depthai.VideoEncoderProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getBitrate
(self)Get bitrate in bps
getBitrateKbps
(self)Get bitrate in kbps
getFrameRate
(self)Get frame rate
getHeight
(self)Get input height
getKeyframeFrequency
(self)Get keyframe frequency
getLossless
(self)Get lossless mode.
getMaxOutputFrameSize
(self)getNumBFrames
(self)Get number of B frames
getNumFramesPool
(self)Get number of frames in pool
getProfile
(self)Get profile
getQuality
(self)Get quality
getRateControlMode
(self)Get rate control mode
getSize
(self)Get input size
getWidth
(self)Get input width
setBitrate
(self, bitrate)Set output bitrate in bps, for CBR rate control mode.
setBitrateKbps
(self, bitrateKbps)Set output bitrate in kbps, for CBR rate control mode.
setDefaultProfilePreset
(*args, **kwargs)Overloaded function.
setFrameRate
(self, frameRate)Sets expected frame rate
setKeyframeFrequency
(self, freq)Set keyframe frequency.
setLossless
(self, arg0)Set lossless mode.
setMaxOutputFrameSize
(self, maxFrameSize)Specifies maximum output encoded frame size
setNumBFrames
(self, numBFrames)Set number of B frames to be inserted
setNumFramesPool
(self, frames)Set number of frames in pool
setProfile
(*args, **kwargs)Overloaded function.
setQuality
(self, quality)Set quality
setRateControlMode
(self, mode)Set rate control mode
Attributes:
Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data.
Input for NV12 ImgFrame to be encoded Default queue is blocking with size set by ‘setNumFramesPool’ (4).
Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data.
-
Properties
¶ alias of
depthai.VideoEncoderProperties
Classes:Profile
Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG
RateControlMode
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
Methods:
__init__
(*args, **kwargs)Initialize self.
Attributes:
bitrate
keyframeFrequency
maxBitrate
numBFrames
numFramesPool
outputFrameSize
profile
quality
rateCtrlMode
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
property
bitstream
¶ Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with out.
-
getBitrate
(self: depthai.node.VideoEncoder) → int¶ Get bitrate in bps
-
getBitrateKbps
(self: depthai.node.VideoEncoder) → int¶ Get bitrate in kbps
-
getFrameRate
(self: depthai.node.VideoEncoder) → float¶ Get frame rate
-
getHeight
(self: depthai.node.VideoEncoder) → int¶ Get input height
-
getKeyframeFrequency
(self: depthai.node.VideoEncoder) → int¶ Get keyframe frequency
-
getLossless
(self: depthai.node.VideoEncoder) → bool¶ Get lossless mode. Applies only when using [M]JPEG profile.
-
getMaxOutputFrameSize
(self: depthai.node.VideoEncoder) → int¶
-
getNumBFrames
(self: depthai.node.VideoEncoder) → int¶ Get number of B frames
-
getNumFramesPool
(self: depthai.node.VideoEncoder) → int¶ Get number of frames in pool
- Returns
Number of pool frames
-
getProfile
(self: depthai.node.VideoEncoder) → depthai.VideoEncoderProperties.Profile¶ Get profile
-
getQuality
(self: depthai.node.VideoEncoder) → int¶ Get quality
-
getRateControlMode
(self: depthai.node.VideoEncoder) → depthai.VideoEncoderProperties.RateControlMode¶ Get rate control mode
-
getSize
(self: depthai.node.VideoEncoder) → Tuple[int, int]¶ Get input size
-
getWidth
(self: depthai.node.VideoEncoder) → int¶ Get input width
-
property
input
¶ Input for NV12 ImgFrame to be encoded Default queue is blocking with size set by ‘setNumFramesPool’ (4).
-
property
out
¶ Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with bitstream.
-
setBitrate
(self: depthai.node.VideoEncoder, bitrate: int) → None¶ Set output bitrate in bps, for CBR rate control mode. 0 for auto (based on frame size and FPS)
-
setBitrateKbps
(self: depthai.node.VideoEncoder, bitrateKbps: int) → None¶ Set output bitrate in kbps, for CBR rate control mode. 0 for auto (based on frame size and FPS)
-
setDefaultProfilePreset
(*args, **kwargs)¶ Overloaded function.
setDefaultProfilePreset(self: depthai.node.VideoEncoder, fps: float, profile: depthai.VideoEncoderProperties.Profile) -> None
Sets a default preset based on specified frame rate and profile
- Parameter
fps
: Frame rate in frames per second
- Parameter
profile
: Encoding profile
setDefaultProfilePreset(self: depthai.node.VideoEncoder, arg0: int, arg1: int, arg2: float, arg3: depthai.VideoEncoderProperties.Profile) -> None
Sets a default preset based on specified input size, frame rate and profile
- Parameter
width
: Input frame width
- Parameter
height
: Input frame height
- Parameter
fps
: Frame rate in frames per second
- Parameter
profile
: Encoding profile
setDefaultProfilePreset(self: depthai.node.VideoEncoder, arg0: Tuple[int, int], arg1: float, arg2: depthai.VideoEncoderProperties.Profile) -> None
Sets a default preset based on specified input size, frame rate and profile
- Parameter
size
: Input frame size
- Parameter
fps
: Frame rate in frames per second
- Parameter
profile
: Encoding profile
-
setFrameRate
(self: depthai.node.VideoEncoder, frameRate: float) → None¶ Sets expected frame rate
- Parameter
frameRate
: Frame rate in frames per second
- Parameter
-
setKeyframeFrequency
(self: depthai.node.VideoEncoder, freq: int) → None¶ Set keyframe frequency. Every Nth frame a keyframe is inserted.
Applicable only to H264 and H265 profiles
Examples:
30 FPS video, keyframe frequency: 30. Every 1s a keyframe will be inserted
60 FPS video, keyframe frequency: 180. Every 3s a keyframe will be inserted
-
setLossless
(self: depthai.node.VideoEncoder, arg0: bool) → None¶ Set lossless mode. Applies only to [M]JPEG profile
- Parameter
lossless
: True to enable lossless jpeg encoding, false otherwise
- Parameter
-
setMaxOutputFrameSize
(self: depthai.node.VideoEncoder, maxFrameSize: int) → None¶ Specifies maximum output encoded frame size
-
setNumBFrames
(self: depthai.node.VideoEncoder, numBFrames: int) → None¶ Set number of B frames to be inserted
-
setNumFramesPool
(self: depthai.node.VideoEncoder, frames: int) → None¶ Set number of frames in pool
- Parameter
frames
: Number of pool frames
- Parameter
-
setProfile
(*args, **kwargs)¶ Overloaded function.
setProfile(self: depthai.node.VideoEncoder, profile: depthai.VideoEncoderProperties.Profile) -> None
Set encoding profile
setProfile(self: depthai.node.VideoEncoder, arg0: Tuple[int, int], arg1: depthai.VideoEncoderProperties.Profile) -> None
Set encoding profile
setProfile(self: depthai.node.VideoEncoder, arg0: int, arg1: int, arg2: depthai.VideoEncoderProperties.Profile) -> None
Set encoding profile
-
setQuality
(self: depthai.node.VideoEncoder, quality: int) → None¶ Set quality
- Parameter
quality
: Value between 0-100%. Approximates quality
- Parameter
-
setRateControlMode
(self: depthai.node.VideoEncoder, mode: depthai.VideoEncoderProperties.RateControlMode) → None¶ Set rate control mode
-
-
class
depthai.node.
Warp
¶ Bases:
depthai.Node
Warp node. Capability to crop, resize, warp, … incoming image frames
Classes:
alias of
depthai.WarpProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getHwIds
(self)Retrieve which hardware warp engines to use
getInterpolation
(self)Retrieve which interpolation method to use
setHwIds
(self, arg0)Specify which hardware warp engines to use
setInterpolation
(self, arg0)Specify which interpolation method to use
setMaxOutputFrameSize
(self, arg0)Specify maximum size of output image.
setNumFramesPool
(self, arg0)Specify number of frames in pool.
setOutputSize
(*args, **kwargs)Overloaded function.
setWarpMesh
(*args, **kwargs)Overloaded function.
Attributes:
Input image to be modified Default queue is blocking with size 8
Outputs ImgFrame message that carries warped image.
-
Properties
¶ alias of
depthai.WarpProperties
Classes:Interpolation
Interpolation type
Methods:
__init__
(*args, **kwargs)Initialize self.
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getHwIds
(self: depthai.node.Warp) → List[int]¶ Retrieve which hardware warp engines to use
-
getInterpolation
(self: depthai.node.Warp) → depthai.Interpolation¶ Retrieve which interpolation method to use
-
property
inputImage
¶ Input image to be modified Default queue is blocking with size 8
-
property
out
¶ Outputs ImgFrame message that carries warped image.
-
setHwIds
(self: depthai.node.Warp, arg0: List[int]) → None¶ Specify which hardware warp engines to use
- Parameter
ids
: Which warp engines to use (0, 1, 2)
- Parameter
-
setInterpolation
(self: depthai.node.Warp, arg0: depthai.Interpolation) → None¶ Specify which interpolation method to use
- Parameter
interpolation
: type of interpolation
- Parameter
-
setMaxOutputFrameSize
(self: depthai.node.Warp, arg0: int) → None¶ Specify maximum size of output image.
- Parameter
maxFrameSize
: Maximum frame size in bytes
- Parameter
-
setNumFramesPool
(self: depthai.node.Warp, arg0: int) → None¶ Specify number of frames in pool.
- Parameter
numFramesPool
: How many frames should the pool have
- Parameter
-
setOutputSize
(*args, **kwargs)¶ Overloaded function.
setOutputSize(self: depthai.node.Warp, arg0: int, arg1: int) -> None
Sets output frame size in pixels
- Parameter
size
: width and height in pixels
setOutputSize(self: depthai.node.Warp, arg0: Tuple[int, int]) -> None
-
setWarpMesh
(*args, **kwargs)¶ Overloaded function.
setWarpMesh(self: depthai.node.Warp, arg0: List[depthai.Point2f], arg1: int, arg2: int) -> None
setWarpMesh(self: depthai.node.Warp, arg0: List[Tuple[float, float]], arg1: int, arg2: int) -> None
-
-
class
depthai.node.
XLinkIn
¶ Bases:
depthai.Node
XLinkIn node. Receives messages over XLink.
Classes:
alias of
depthai.XLinkInProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getMaxDataSize
(self)Get maximum messages size in bytes
getNumFrames
(self)Get number of frames in pool
getStreamName
(self)Get stream name
setMaxDataSize
(self, maxDataSize)Set maximum message size it can receive
setNumFrames
(self, numFrames)Set number of frames in pool for sending messages forward
setStreamName
(self, streamName)Specifies XLink stream name to use.
Attributes:
Outputs message of same type as send from host.
-
Properties
¶ alias of
depthai.XLinkInProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
maxDataSize
numFrames
streamName
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getMaxDataSize
(self: depthai.node.XLinkIn) → int¶ Get maximum messages size in bytes
-
getNumFrames
(self: depthai.node.XLinkIn) → int¶ Get number of frames in pool
-
getStreamName
(self: depthai.node.XLinkIn) → str¶ Get stream name
-
property
out
¶ Outputs message of same type as send from host.
-
setMaxDataSize
(self: depthai.node.XLinkIn, maxDataSize: int) → None¶ Set maximum message size it can receive
- Parameter
maxDataSize
: Maximum size in bytes
- Parameter
-
setNumFrames
(self: depthai.node.XLinkIn, numFrames: int) → None¶ Set number of frames in pool for sending messages forward
- Parameter
numFrames
: Maximum number of frames in pool
- Parameter
-
setStreamName
(self: depthai.node.XLinkIn, streamName: str) → None¶ Specifies XLink stream name to use.
The name should not start with double underscores ‘__’, as those are reserved for internal use.
- Parameter
name
: Stream name
- Parameter
-
-
class
depthai.node.
XLinkOut
¶ Bases:
depthai.Node
XLinkOut node. Sends messages over XLink.
Classes:
alias of
depthai.XLinkOutProperties
Methods:
__init__
(*args, **kwargs)Initialize self.
getFpsLimit
(self)Get rate limit in messages per second
getMetadataOnly
(self)Get whether to transfer only messages attributes and not buffer data
getStreamName
(self)Get stream name
setFpsLimit
(self, fpsLimit)Specifies a message sending limit.
setMetadataOnly
(self, arg0)Specify whether to transfer only messages attributes and not buffer data
setStreamName
(self, streamName)Specifies XLink stream name to use.
Attributes:
Input for any type of messages to be transferred over XLink stream
-
Properties
¶ alias of
depthai.XLinkOutProperties
Methods:__init__
(*args, **kwargs)Initialize self.
Attributes:
maxFpsLimit
metadataOnly
streamName
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getFpsLimit
(self: depthai.node.XLinkOut) → float¶ Get rate limit in messages per second
-
getMetadataOnly
(self: depthai.node.XLinkOut) → bool¶ Get whether to transfer only messages attributes and not buffer data
-
getStreamName
(self: depthai.node.XLinkOut) → str¶ Get stream name
-
property
input
¶ Input for any type of messages to be transferred over XLink stream
Default queue is blocking with size 8
-
setFpsLimit
(self: depthai.node.XLinkOut, fpsLimit: float) → None¶ Specifies a message sending limit. It’s approximated from specified rate.
- Parameter
fps
: Approximate rate limit in messages per second
- Parameter
-
setMetadataOnly
(self: depthai.node.XLinkOut, arg0: bool) → None¶ Specify whether to transfer only messages attributes and not buffer data
-
setStreamName
(self: depthai.node.XLinkOut, streamName: str) → None¶ Specifies XLink stream name to use.
The name should not start with double underscores ‘__’, as those are reserved for internal use.
- Parameter
name
: Stream name
- Parameter
-
-
class
depthai.node.
YoloDetectionNetwork
¶ Bases:
depthai.node.DetectionNetwork
YoloDetectionNetwork node. Parses Yolo results
Methods:
__init__
(*args, **kwargs)Initialize self.
getAnchorMasks
(self)Get anchor masks
getAnchors
(self)Get anchors
getCoordinateSize
(self)Get coordianate size
getIouThreshold
(self)Get Iou threshold
getNumClasses
(self)Get num classes
setAnchorMasks
(self, anchorMasks, List[int]])Set anchor masks
setAnchors
(self, anchors)Set anchors
setCoordinateSize
(self, coordinates)Set coordianate size
setIouThreshold
(self, thresh)Set Iou threshold
setNumClasses
(self, numClasses)Set num classes
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getAnchorMasks
(self: depthai.node.YoloDetectionNetwork) → Dict[str, List[int]]¶ Get anchor masks
-
getAnchors
(self: depthai.node.YoloDetectionNetwork) → List[float]¶ Get anchors
-
getCoordinateSize
(self: depthai.node.YoloDetectionNetwork) → int¶ Get coordianate size
-
getIouThreshold
(self: depthai.node.YoloDetectionNetwork) → float¶ Get Iou threshold
-
getNumClasses
(self: depthai.node.YoloDetectionNetwork) → int¶ Get num classes
-
setAnchorMasks
(self: depthai.node.YoloDetectionNetwork, anchorMasks: Dict[str, List[int]]) → None¶ Set anchor masks
-
setAnchors
(self: depthai.node.YoloDetectionNetwork, anchors: List[float]) → None¶ Set anchors
-
setCoordinateSize
(self: depthai.node.YoloDetectionNetwork, coordinates: int) → None¶ Set coordianate size
-
setIouThreshold
(self: depthai.node.YoloDetectionNetwork, thresh: float) → None¶ Set Iou threshold
-
setNumClasses
(self: depthai.node.YoloDetectionNetwork, numClasses: int) → None¶ Set num classes
-
-
class
depthai.node.
YoloSpatialDetectionNetwork
¶ Bases:
depthai.node.SpatialDetectionNetwork
YoloSpatialDetectionNetwork node. Yolo-based network with spatial location data.
Methods:
__init__
(*args, **kwargs)Initialize self.
getAnchorMasks
(self)Get anchor masks
getAnchors
(self)Get anchors
getCoordinateSize
(self)Get coordianate size
getIouThreshold
(self)Get Iou threshold
getNumClasses
(self)Get num classes
setAnchorMasks
(self, anchorMasks, List[int]])Set anchor masks
setAnchors
(self, anchors)Set anchors
setCoordinateSize
(self, coordinates)Set coordianate size
setIouThreshold
(self, thresh)Set Iou threshold
setNumClasses
(self, numClasses)Set num classes
-
__init__
(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
getAnchorMasks
(self: depthai.node.YoloSpatialDetectionNetwork) → Dict[str, List[int]]¶ Get anchor masks
-
getAnchors
(self: depthai.node.YoloSpatialDetectionNetwork) → List[float]¶ Get anchors
-
getCoordinateSize
(self: depthai.node.YoloSpatialDetectionNetwork) → int¶ Get coordianate size
-
getIouThreshold
(self: depthai.node.YoloSpatialDetectionNetwork) → float¶ Get Iou threshold
-
getNumClasses
(self: depthai.node.YoloSpatialDetectionNetwork) → int¶ Get num classes
-
setAnchorMasks
(self: depthai.node.YoloSpatialDetectionNetwork, anchorMasks: Dict[str, List[int]]) → None¶ Set anchor masks
-
setAnchors
(self: depthai.node.YoloSpatialDetectionNetwork, anchors: List[float]) → None¶ Set anchors
-
setCoordinateSize
(self: depthai.node.YoloSpatialDetectionNetwork, coordinates: int) → None¶ Set coordianate size
-
setIouThreshold
(self: depthai.node.YoloSpatialDetectionNetwork, thresh: float) → None¶ Set Iou threshold
-
setNumClasses
(self: depthai.node.YoloSpatialDetectionNetwork, numClasses: int) → None¶ Set num classes
-