DepthAI Python API
最后更新
package
depthai
package
beta
Experimental APIs
package
filters
Parameters for filters
module
modelzoo
Model Zoo
package
package
module
utility
Utility functions
class
Timestamp
Timestamp structure
class
Point2f
Point2f structure x and y coordinates that define a 2D point.
class
Point3f
Point3f structure x,y,z coordinates that define a 3D point.
class
Point3fRGBA
Point3fRGBA structure x,y,z coordinates and RGB color values that define a 3D point with color and alpha.
class
Point3d
Point3d structure x,y,z coordinates that define a 3D point.
class
Quaterniond
Quaterniond structure qx,qy,qz,qw coordinates that define a 3D point orientation.
class
Size2f
Size2f structure width, height values define the size of the shape/frame
class
CameraBoardSocket
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 VERTICAL CAM_E CAM_F CAM_G CAM_H CBA : Experimental feature. This API might change or be removed in a future release. 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
class
HousingCoordinateSystem
Which Housing to use. AUTO denotes that the decision will be made by device Members: CAM_A CAM_B CAM_C CAM_D CAM_E CAM_F CAM_G CAM_H CAM_I CAM_J FRONT_CAM_A FRONT_CAM_B FRONT_CAM_C FRONT_CAM_D FRONT_CAM_E FRONT_CAM_F FRONT_CAM_G FRONT_CAM_H FRONT_CAM_I FRONT_CAM_J VESA_A VESA_B VESA_C VESA_D VESA_E VESA_F VESA_G VESA_H VESA_I VESA_J IMU
class
ExternalFrameSyncRole
Which external frame sync role the device should have. AUTO_DETECT denotes that the decision will be made by device. It will choose between MASTER and SLAVE. Members: AUTO_DETECT MASTER SLAVE
class
connectionInterface
Members: USB ETHERNET WIFI
class
CameraSensorType
Camera sensor type Members: COLOR MONO TOF THERMAL
class
CameraImageOrientation
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
class
CameraSensorConfig
Sensor config
class
CameraFeatures
CameraFeatures structure Characterizes detected cameras on board
class
MemoryInfo
MemoryInfo structure Free, remaining and total memory stats
class
ChipTemperature
Chip temperature information. Multiple temperature measurement points and their average
class
ChipTemperatureRVC4
Chip temperature information. Multiple temperature measurement points and their average
class
CpuUsage
CpuUsage structure Average usage in percent and time span of the average (since last query)
class
CameraModel
Projection model of a camera. `Perspective`, `Fisheye` and `RadialDivision` are pinhole cameras whose distortion is applied on the normalized image plane. `Equirectangular` and `Cylindrical` are the surfaces panoramas are rendered onto; they carry no distortion coefficients, and their intrinsic matrix (fx, fy, cx, cy) maps the angular coordinates of a direction (x, y, z) in the camera frame to a pixel instead of the normalized image plane: - Equirectangular: u = fx * atan2(x, z) + cx, v = fy * asin(y / sqrt(x^2 + y^2 + z^2)) + cy - Cylindrical: u = fx * atan2(x, z) + cx, v = fy * y / sqrt(x^2 + z^2) + cy so fx and fy are the radius of the sphere or cylinder in pixels, and (cx, cy) is the pixel the camera Z axis projects to. Members: Perspective Fisheye Equirectangular RadialDivision Cylindrical
class
StereoRectification
StereoRectification structure
class
Extrinsics
Extrinsics structure
class
MultiDeviceExtrinsics
A directed cross-device calibration edge. The source coordinate system is identified by fromDeviceId/fromSocket. The destination coordinate system is identified by extrinsics.toDeviceId and extrinsics.toCameraSocket.
class
CameraInfo
CameraInfo structure
class
EepromData
EepromData structure Contains the Calibration and Board data stored on device
class
ImuNoiseParameters
Allan-variance-derived IMU noise parameters.
class
ImuCalibrationParams
Complete IMU parameter payload: noise + per-sensor canonical affine calibration.
class
class
class
class
class
UsbSpeed
Get USB Speed Members: UNKNOWN LOW FULL HIGH SUPER SUPER_PLUS
class
ProcessorType
Members: LEON_CSS LEON_MSS CPU DSP
class
DetectionNetworkType
Members: YOLO MOBILENET
class
LengthUnit
Measurement unit for depth and calibration data. Members: METER CENTIMETER MILLIMETER INCH FOOT CUSTOM
class
AngleUnit
Measurement unit for angular quantities stored in radians. Members: RADIAN DEGREE
class
YoloDecodingFamily
Members: TLBR v5AB v3AB R1AF
class
SerializationType
Members: LIBNOP JSON JSON_MSGPACK
class
DetectionParserOptions
DetectionParserOptions Specifies how to parse output of detection networks
class
RotatedRect
RotatedRect structure
class
Rect
Rect structure x,y coordinates together with width and height that define a rectangle. Can be either normalized [0,1] or absolute representation.
class
StereoPair
Describes which camera sockets can be used for stereo and their baseline.
class
CameraExposureOffset
Members: START MIDDLE END
class
Color
Color structure r,g,b,a color values with values in range [0.0, 1.0]
class
Colormap
Camera sensor type Members: NONE JET TURBO STEREO_JET STEREO_TURBO
class
FrameEvent
Members: NONE READOUT_START READOUT_END
class
class
Interpolation
Interpolation type Members: BILINEAR BICUBIC NEAREST_NEIGHBOR BYPASS DEFAULT DEFAULT_DISPARITY_DEPTH
class
DeviceModelZoo
On device models, relevant for RVC4 platform Members: NEURAL_DEPTH_1248X780 NEURAL_DEPTH_1056X660 NEURAL_DEPTH_960X600 NEURAL_DEPTH_864X540 NEURAL_DEPTH_768X480 NEURAL_DEPTH_576X360 NEURAL_DEPTH_480X300 NEURAL_DEPTH_384X240 NEURAL_DEPTH_288X180 NEURAL_DEPTH_192X120 NEURAL_DEPTH_EXTRA_LARGE NEURAL_DEPTH_LARGE NEURAL_DEPTH_MEDIUM NEURAL_DEPTH_SMALL NEURAL_DEPTH_NANO
class
class
class
class
SpatialKeypointsList
List of spatial keypoints. All `SpatialKeypoint::spatialCoordinates` values stored in this list are expressed in `unit` units. Mixed spatial units within a single list are not supported.
class
DatatypeEnum
Members: ADatatype Buffer Transformable ImgFrame EncodedFrame NNData ImageManipConfig CameraControl ImgDetections SpatialImgDetections DetectionParserConfig SegmentationParserConfig SegmentationMask SystemInformation SystemInformationRVC4 SpatialLocationCalculatorConfig SpatialLocationCalculatorData EdgeDetectorConfig AprilTagConfig AprilTags Tracklets IMUData StereoDepthConfig GPUStereoConfig FeatureTrackerConfig ThermalConfig ToFConfig VppConfig TrackedFeatures BenchmarkReport MessageGroup TransformData Odometry PointCloudConfig PointCloudData ImageAlignConfig AlignConfig ImgAnnotations MapData RGBDData PipelineEvent PipelineState ImageFiltersConfig ToFDepthConfidenceFilterConfig DynamicCalibrationControl DynamicCalibrationResult AutoCalibrationConfig AutoCalibrationResult CalibrationQuality ImgDetectionsFilterConfig Classifications Keypoints Clusters Map2D Lines Predictions FastSAMParserConfig HRNetParserConfig MLSDParserConfig MPPalmDetectionParserConfig PPTextDetectionParserConfig RFDETRParserConfig SCRFDParserConfig SuperAnimalParserConfig YuNetParserConfig ClassificationSequenceParserConfig MapOutputParserConfig XFeatMonoParserConfig XFeatStereoParserConfig MultiDeviceCalibrationControl MultiDeviceCalibrationResult CoverageData
class
ADatatype
Abstract message
class
Buffer
Base message - buffer of binary data
class
class
Transformable
Interface for messages that carry image transformation metadata and can be remapped to another image transformation.
class
TransformableBuffer
Base message type for custom transformable messages. This class combines Buffer storage with the Transformable interface and provides a virtual transformTo() entry point for host-side polymorphic dispatch. Python users should inherit from TransformableBuffer, not Transformable, when implementing custom messages that need transformation support.
class
AprilTagConfig
AprilTagConfig message.
class
AprilTag
AprilTag structure.
class
AprilTags
AprilTags message.
class
CameraControl
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.
class
class
EdgeDetectorConfig
EdgeDetectorConfig message. Carries sobel edge filter config.
class
FeatureTrackerConfig
FeatureTrackerConfig message. Carries config for feature tracking algorithm
class
ThermalConfig
ThermalConfig message. Currently unused.
class
class
class
ThermalAmbientParams
Ambient factors that affect the temperature measurement of a Thermal sensor.
class
ThermalGainMode
Thermal sensor gain mode. Use low gain in high energy environments. Members: LOW : HIGH :
class
ToFConfig
ToFConfig message. Carries config for feature tracking algorithm
class
ImageManipConfig
ImageManipConfig message. Specifies image manipulation options like: - Crop - Resize - Warp - ...
class
ImgDetections
ImgDetections message. Carries normalized detections and optional segmentation mask. The segmentation mask is stored as a single-channel INT8 2-d array, where the value represents the instance index in the list of detections. The value 255 is treated as a background pixel (no instance).
class
class
class
ImgTransformation
ImgTransformation struct. Holds information of how a ImgFrame or related message was transformed from their source. Useful for remapping from one ImgFrame to another.
class
class
class
IMUReportAccelerometer
Accelerometer Units are [m/s^2]
class
IMUReportGyroscope
Gyroscope Units are [rad/s]
class
IMUReportMagneticField
Magnetic field Units are [uTesla]
class
IMUReportRotationVectorWAcc
Rotation Vector with Accuracy Contains quaternion components: i,j,k,real
class
IMUPacket
IMU output Contains combined output for all possible modes. Only the enabled outputs are populated.
class
IMUData
IMUData message. Carries normalized detection results
class
class
TensorInfo
TensorInfo structure
class
NNData
NNData message. Carries tensors and their metadata
class
NeuralDepthConfig
NeuralDepthConfig message.
class
GPUStereoConfig
Configuration for the GPUStereo node.
class
SpatialImgDetection
SpatialImgDetection structure Contains image detection results together with spatial location data.
class
SpatialImgDetections
SpatialImgDetections message. Carries detection results together with spatial location data
class
DetectionParserConfig
Runtime thresholds for DetectionParser. Send to inputConfig to update subsequent detections. Model layout, labels and decoding family remain configured on the node.
class
class
SegmentationMask
SegmentationMask message. Segmentation mask of an image is stored as a single-channel UINT8 array, where each value represents a class or instance index. The value 255 is treated as background pixels (no class/instance).
class
SpatialLocationCalculatorConfigThresholds
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.
class
SpatialLocationCalculatorAlgorithm
SpatialLocationCalculatorAlgorithm configuration modes Contains calculation method used to obtain spatial locations. Members: AVERAGE MEAN MIN MAX MODE MEDIAN
class
SpatialLocationCalculatorConfigData
SpatialLocation configuration data structure
class
SpatialLocationCalculatorConfig
Configuration for SpatialLocationCalculator. Holds global parameters and optional per-ROI entries used to compute 3D spatial locations from a depth map. Global parameters (defaults): - Lower depth threshold [mm]: 0 - Upper depth threshold [mm]: 65535 - Calculation algorithm: MEDIAN - Step size: AUTO - Keypoint radius [px]: 10 - Calculate spatial keypoints: true - Use segmentation for ImgDetections: true - Segmentation passthrough: true - Bounding box scale factor: 1.0 An optional list of per-ROI configurations is available via `config`. ROI settings override the corresponding global values where specified.
class
SpatialLocationCalculatorData
SpatialLocationCalculatorData message. Carries spatial information (X,Y,Z) and their configuration parameters
class
SpatialLocations
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).
class
StereoDepthConfig
StereoDepthConfig message.
class
SystemInformation
SystemInformation message. Carries memory usage, cpu usage and chip temperatures.
class
SystemInformationRVC4
SystemInformation message Carries memory usage, cpu usage and chip temperatures.
class
TrackedFeature
TrackedFeature structure
class
TrackedFeatures
TrackedFeatures message. Carries position (X, Y) of tracked features and their ID.
class
Tracklet
Tracklet structure Contains tracklets from object tracker output.
class
Tracklets
Tracklets message. Carries object tracking information.
class
BenchmarkReport
BenchmarkReport message.
class
PointCloudConfig
PointCloudConfig message. Carries point cloud output settings.
class
PointCloudData
PointCloudData message. Carries point cloud data.
class
PipelineEvent
Pipeline event message.
class
class
PipelineState
Pipeline event message.
class
TransformData
TransformData message. Carries transform in x,y,z,qx,qy,qz,qw format.
class
Odometry
Odometry message. Carries a pose and the linear velocity of the tracked body. The pose is inherited from TransformData. Velocity is expressed in the same reference coordinate system as the pose translation and is measured in m/s.
class
ImageAlignConfig
ImageAlignConfig configuration structure
class
AlignConfig
AlignConfig configuration structure
class
class
class
PointsAnnotationType
Members: UNKNOWN POINTS LINE_LOOP LINE_STRIP LINE_LIST
class
class
class
class
class
class
class
class
class
class
RGBDData
RGBD message. Carries RGB and Depth frames. Frames can be either of type ImgFrame or EncodedFrame.
class
MapData
MapData message. Carries grid map data and minX/minY messages to help place it in 3D space.
class
VppConfig
VppConfig message. Carries config for Virtual Projection Pattern algorithm
class
class
class
class
class
class
class
class
class
AutoCalibrationConfig
AutoCalibrationConfig message. Carries configuration for the automatic camera calibration algorithm. Defines parameters for periodic or one-time recalibration of the camera sensors.
class
class
ModelType
Neural network model type Members: BLOB SUPERBLOB DLC NNARCHIVE OTHER
class
LogLevel
Members: TRACE DEBUG INFO WARN ERR CRITICAL OFF
class
class
Version
Version structure
class
MessageQueue
Thread safe queue to send messages between nodes
class
OpenVINO
Support for basic OpenVINO related actions like version identification of neural network blobs,...
class
class
class
class
NNArchiveConfigVersion
Members: V1
class
class
class
class
class
class
class
class
ImgResizeMode
Members: CROP STRETCH LETTERBOX
class
Node
Abstract Node
class
Properties
Base Properties structure
class
class
class
class
class
class
class
ColorCameraProperties
Specify properties for ColorCamera such as camera ID, ...
class
MonoCameraProperties
Specify properties for MonoCamera such as camera ID, ...
class
StereoDepthProperties
Specify properties for StereoDepth
class
NeuralNetworkProperties
Specify properties for NeuralNetwork such as blob path, ...
class
VideoEncoderProperties
Specify properties for VideoEncoder such as profile, bitrate, ...
class
ImageManipProperties
Specify properties for ImageManip
class
WarpProperties
Specify properties for Warp
class
SPIOutProperties
Specify properties for SPIOut node
class
SPIInProperties
Properties for SPIIn node
class
SystemLoggerProperties
SystemLoggerProperties structure
class
ScriptProperties
Specify ScriptProperties options such as script uri, script name, ...
class
SpatialLocationCalculatorProperties
Specify properties for SpatialLocationCalculator
class
SpatialDetectionNetworkProperties
Specify properties for SpatialDetectionNetwork
class
TrackerType
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.
class
TrackerIdAssignmentPolicy
Members: UNIQUE_ID SMALLEST_ID
class
ObjectTrackerProperties
Specify properties for ObjectTracker
class
IMUSensor
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 Raw accelerometer measurement in the sensor-native frame. No IMU extrinsics or affine calibration are applied. Units are [m/s^2] @note Prior firmware versions incorrectly delivered frame-aligned data on this stream (equivalent to what is now ACCELEROMETER_UNCALIBRATED). This stream now correctly provides the unprocessed sensor output. ACCELEROMETER_UNCALIBRATED : DepthAI synthetic accelerometer stream. Acceleration of the device including gravity, aligned to the DepthAI IMU frame without the stored affine calibration applied. Units are [m/s^2] ACCELEROMETER_CALIBRATED : Section 2.1.1 Acceleration of the device including gravity, aligned to the DepthAI IMU frame and corrected with the stored affine calibration. Units are [m/s^2] ACCELEROMETER : Deprecated: use ACCELEROMETER_CALIBRATED LINEAR_ACCELERATION : Deprecated: calibration is incorrect for this gravity-stripped output; use ACCELEROMETER_CALIBRATED and subtract gravity on the host GRAVITY : Deprecated: calibration is incorrect for this gravity-only output; use ACCELEROMETER_CALIBRATED and estimate gravity on the host GYROSCOPE_RAW : Section 2.1.2 Raw gyroscope measurement in the sensor-native frame. DepthAI does not apply IMU extrinsics or affine calibration on this stream. Units are [rad/s] GYROSCOPE_CALIBRATED : Section 2.1.2 Angular velocity aligned to the DepthAI IMU frame and corrected with the stored affine calibration. Units are [rad/s] GYROSCOPE_UNCALIBRATED : Section 2.1.2 Angular velocity aligned to the DepthAI IMU frame without the stored affine calibration applied. Units are [rad/s] MAGNETOMETER_RAW : Section 2.1.3 Raw magnetometer measurement in the sensor-native frame. DepthAI does not apply IMU extrinsics on this stream. Units are [uTesla] MAGNETOMETER_CALIBRATED : Section 2.1.3 Magnetic field measurement aligned to the DepthAI IMU frame. Units are [uTesla] MAGNETOMETER_UNCALIBRATED : Section 2.1.3 Magnetic field measurement aligned to the DepthAI IMU frame 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.
class
class
class
EdgeDetectorProperties
Specify properties for EdgeDetector
class
FeatureTrackerProperties
Specify properties for FeatureTracker
class
AprilTagProperties
Specify properties for AprilTag
class
DetectionParserProperties
Specify properties for DetectionParser
class
SegmentationParserProperties
Specify properties for SegmentationParser @property labels Vector of class labels associated with the segmentation mask. The label at index $i$ in the `labels` vector corresponds to the value $i$-th channel in the segmentation mask data array. Parameter ``networkOutputName``: Name of the output tensor from the neural network to parse. If empty, the first output will be used. Parameter ``classesInOneLayer``: If true, assumes that the segmentation classes are already encoded in a single layer as integer values. If false, an argmax operation is performed across multiple channels. Parameter ``backgroundClass``: If true, the first class (index 0) is considered as background.
class
UVCProperties
Properties for UVC node
class
ThermalProperties
Specify properties for Thermal
class
ToFProperties
Specify properties for ToF
class
PointCloudProperties
Specify properties for PointCloud
class
SyncProperties
Specify properties for Sync.
class
MessageDemuxProperties
Specify properties for MessageDemux.
class
class
class
class
class
ImageAlignProperties
Specify properties for ImageAlign
class
AlignProperties
Specify properties for Align
class
class
NeuralDepthProperties
Specify properties for NeuralDepth
class
class
VppProperties
Specify properties for Vpp node
class
GateProperties
Specify properties for Gate.
class
class
class
DynamicCalibrationProperties
Specify properties for Dynamic calibration.
class
class
Asset
Asset is identified with string key and can store arbitrary binary data
class
AssetManager
AssetManager can store assets and serialize
class
GlobalProperties
Specify properties which apply for whole pipeline
class
DeviceProperties
Specify properties which apply for a device
class
RecordConfig
Configuration for recording and replaying messages
class
class
DeviceState
State of a device that is part of a running pipeline. Members: RUNNING DISCONNECTED RECONNECTING FAILED
class
NodesStateApi
pipeline.getState().nodes({nodeId1}).summary() -> std::unordered_map<std::string, TimingStats>; pipeline.getState().nodes({nodeId1}).detailed() -> std::unordered_map<std::string, NodeState>; pipeline.getState().nodes(nodeId1).detailed() -> NodeState; pipeline.getState().nodes({nodeId1}).outputs() -> std::unordered_map<std::string, TimingStats>; pipeline.getState().nodes({nodeId1}).outputs({outputName1}) -> std::unordered_map<std::string, TimingStats>; pipeline.getState().nodes({nodeId1}).outputs(outputName) -> TimingStats; pipeline.getState().nodes({nodeId1}).events(); pipeline.getState().nodes({nodeId1}).inputs() -> std::unordered_map<std::string, QueueState>; pipeline.getState().nodes({nodeId1}).inputs({inputName1}) -> std::unordered_map<std::string, QueueState>; pipeline.getState().nodes({nodeId1}).inputs(inputName) -> QueueState; pipeline.getState().nodes({nodeId1}).otherStats() -> std::unordered_map<std::string, TimingStats>; pipeline.getState().nodes({nodeId1}).otherStats({statName1}) -> std::unordered_map<std::string, TimingStats>; pipeline.getState().nodes({nodeId1}).outputs(statName) -> TimingStats;class
class
class
DeviceInfo
Describes a connected device
class
class
XLinkDeviceState
Members: X_LINK_ANY_STATE X_LINK_BOOTED X_LINK_UNBOOTED X_LINK_BOOTLOADER X_LINK_FLASH_BOOTED X_LINK_BOOTED_NON_EXCLUSIVE X_LINK_GATE X_LINK_GATE_BOOTED X_LINK_GATE_SETUP
class
XLinkProtocol
Members: X_LINK_USB_VSC X_LINK_USB_CDC X_LINK_PCIE X_LINK_IPC X_LINK_TCP_IP X_LINK_LOCAL_SHDMEM X_LINK_TCP_IP_OR_LOCAL_SHDMEM X_LINK_USB_EP X_LINK_NMB_OF_PROTOCOLS X_LINK_ANY_PROTOCOL
class
XLinkPlatform
Members: X_LINK_ANY_PLATFORM X_LINK_MYRIAD_2 X_LINK_MYRIAD_X X_LINK_RVC3 X_LINK_RVC4
class
XLinkError_t
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
class
XLinkConnection
Represents connection between host and device over XLink protocol
exception
exception
exception
class
Platform
Hardware platform type Members: RVC2 : RVC3 : RVC4 :
class
CrashDump
Base class for platform-specific crash dumps Crash dumps are serialized as tar files with the following structure: - crash_dump.tar.gz - metadata.json (basic crash information - depthai specific) - extra.json (user-defined extra crashdump information) - platform specific files...
class
class
class
class
Device
Represents the DepthAI device with the methods to interact with it. Implements the host-side queues to connect with XLinkIn and XLinkOut nodes
class
HealthCheckConfig
Configures which device health-check steps should run.
class
HealthCheckIssue
Health check issue, which contains the details of the issue
class
HealthCheckMetrics
Device health-check results.
class
HealthCheckIssueType
Health check issue type Members: Warning : Error :
class
HealthCheckIssueStage
Health check issue stage Members: Connection : DeviceAvailability : UsbGeneration : Bandwidth : CameraFunctionality : CameraCalibration : ImuFunctionality : ImuCalibration : PowerSupply :
class
UsbGeneration
USB generation reported by the device health check. Members: UNKNOWN : USB_1_0 : USB_1_1 : USB_2_0 : USB_3_0 : USB_3_1 :
class
HealthCheckResult
Health check result reported by the device health check. Members: NOT_RUN : PASS : FAIL :
class
class
exception
class
DeviceBootloader
Represents the DepthAI bootloader with the methods to interact with it.
class
class
CBACalibrationHandler
CBACalibrationHandler is a single-camera calibration interface for calibration data read from a CBA EEPROM. It preserves the underlying EepromData layout, including the cameraData map, but camera-specific APIs use CameraBoardSocket::CBA as the logical single-camera data key without requiring the caller to pass it again. .. warning:: Experimental feature. This API might change or be removed in a future release.
class
class
class
class
class
SendSnapCallbackStatus
Members: SUCCESS FILE_BATCH_PREPARATION_FAILED GROUP_CONTAINS_REJECTED_FILES FILE_UPLOAD_FAILED SEND_EVENT_FAILED EVENT_REJECTED
class
class
class
ImageFiltersPresetMode
Members: TOF_LOW_RANGE TOF_MID_RANGE TOF_HIGH_RANGE
function
function
function
downloadModelsFromZoo(path: os.PathLike, cacheDirectory: os.PathLike = '', apiKey: str = '', progressFormat: str = 'none') -> bool: boolHelper function allowing one to download all models specified in yaml files in the given path and store them in the cache directory Parameter ``path:``: Path to the directory containing yaml files Parameter ``cacheDirectory:``: Cache directory where the cached models are stored, default is "". If cacheDirectory is set to "", this function checks the DEPTHAI_ZOO_CACHE_PATH environment variable and uses that if set, otherwise the default is used (see getDefaultCachePath). Parameter ``apiKey:``: API key for the model zoo, default is "". If apiKey is set to "", this function checks the DEPTHAI_ZOO_API_KEY environment variable and uses that if set. Otherwise, no API key is used. Parameter ``progressFormat:``: Format to use for progress output (possible values: pretty, json, none), default is "pretty" Returns: bool: True if all models were downloaded successfully, false otherwise
function
getModelFromZoo(modelDescription: NNModelDescription, useCached: bool = True, cacheDirectory: os.PathLike = '', apiKey: str = '', progressFormat: str = 'none') -> os.PathLike: os.PathLikeGet model from model zoo Parameter ``modelDescription:``: Model description Parameter ``useCached:``: Use cached model if present, default is true Parameter ``cacheDirectory:``: Cache directory where the cached models are stored, default is "". If cacheDirectory is set to "", this function checks the DEPTHAI_ZOO_CACHE_PATH environment variable and uses that if set, otherwise the default value is used (see getDefaultCachePath). Parameter ``apiKey:``: API key for the model zoo, default is "". If apiKey is set to "", this function checks the DEPTHAI_ZOO_API_KEY environment variable and uses that if set. Otherwise, no API key is used. Parameter ``progressFormat:``: Format to use for progress output (possible values: pretty, json, none), default is "pretty" Returns: std::filesystem::path: Path to the model in cache
function
function
platform2string(arg0: Platform) -> str: strConvert Platform enum to string Parameter ``platform``: Platform enum Returns: std::string String representation of Platform
function
readModelType(modelPath: os.PathLike) -> ModelType: ModelTypeRead model type from model path Parameter ``modelPath``: Path to model Returns: ModelType
function
string2platform(arg0: str) -> Platform: PlatformConvert string to Platform enum Parameter ``platform``: String representation of Platform Returns: Platform Platform enum
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
package
depthai.beta
module
node
Experimental nodes
class
Classifications
Classifications message. Carries classification class names and their corresponding scores. The classes and scores vectors are index-aligned. Parsers emit them sorted in descending order of score, so the first entry is the most probable class.
class
Cluster
Cluster of 2D points. Serialized value type contained by the Clusters message.
class
Clusters
Clusters message. Carries clusters of 2D points, each cluster with an integer label. Parsers emit clusters with sequential labels starting at 0 and point image coordinates normalized to [0, 1]. Clusters may be empty, e.g. lanes without enough detected points.
class
Keypoints
Keypoints message. Streamable wrapper around the native dai::KeypointsList, carrying 2D or 3D keypoints together with optional skeleton edges connecting them. Keypoint image coordinates are normalized to [0, 1] by the keypoint parsers. 2D keypoints carry a z coordinate of 0.
class
Line
Detected line segment. Serialized value type contained by the Lines message.
class
Lines
Lines message. Carries detected line segments, each with a start point, an end point and a confidence score. Parsers emit line point image coordinates normalized to [0, 1] and confidences clipped to [0, 1]. The message may carry no lines when nothing passes the detection thresholds.
class
Map2D
Map2D message. Carries a dense 2D map of 32-bit floats, such as a depth map, a density map or a heat map, together with image transformation metadata. The map values are stored row-major in the buffer payload; the map dimensions are carried in the serialized metadata.
class
Prediction
Single predicted value. Serialized value type contained by the Predictions message.
class
Predictions
Predictions message. Carries the predicted value(s) of a regression model in the order the model emitted them. The message may carry no predictions when the parsed tensor is empty.
class
MultiDeviceCalibrationControl
One-shot lifecycle commands for the MultiDeviceCalibration node. Configuration belongs to the node and must be set before start. The control message intentionally contains no performance or device-mutation commands.
class
MultiDeviceCalibrationResult
Final result of running multi-device calibration. Includes: - the estimated cross-device calibration graph (only when the run passed) - metrics evaluating the reliability of the estimate and the quality of the data used to compute it - a human-readable description of why a run did not pass The calibration graph is a snapshot and is never applied to a device or pipeline by the node. Use getHandler() to resolve it or store it on a pipeline with Pipeline::setMultiDeviceCalibration.
class
ClassificationSequenceParserConfig
Runtime configuration for ClassificationSequenceParser.
class
FastSAMParserConfig
Runtime configuration for FastSAMParser.
class
HRNetParserConfig
Runtime configuration for HRNetParser.
class
MLSDParserConfig
Runtime configuration for MLSDParser.
class
MPPalmDetectionParserConfig
Runtime configuration for MPPalmDetectionParser.
class
MapOutputParserConfig
Runtime configuration for MapOutputParser.
class
PPTextDetectionParserConfig
Runtime configuration for PPTextDetectionParser.
class
RFDETRParserConfig
Runtime configuration for RFDETRParser.
class
SCRFDParserConfig
Runtime configuration for SCRFDParser.
class
SuperAnimalParserConfig
Runtime configuration for SuperAnimalParser.
class
XFeatMonoParserConfig
Runtime configuration for XFeatMonoParser.
class
XFeatStereoParserConfig
Runtime configuration for XFeatStereoParser.
class
YuNetParserConfig
Runtime configuration for YuNetParser.
class
class
class
class
class
class
class
class
class
class
class
class
class
StitchingProperties
Serializable properties for the Stitching node.
class
class
class
class
MultiDeviceCalibrationHandler
Resolves cross-device calibration edges into a common origin for each connected component. The input graph is a forest. Every edge endpoint must be a device's local calibration origin. The component origin is selected automatically as the lowest (device ID, socket) coordinate-system pair.
module
depthai.beta.node
class
ToFStereoFusion
Experimental node that fuses aligned ToF and neural stereo-depth measurements. The node configures its internal ToF, neural-depth, alignment, synchronization, and fusion-network stages when built from a left and right camera. @note This node is supported on RVC4 devices only. Creating it for an RVC2 device throws an exception.
class
ClassificationParser
ClassificationParser node. Parses the raw output of a classification neural network into a dai::beta::Classifications message with class names and scores sorted in descending order of score. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. Raw scores are dequantized and flattened; when the model output is not already softmaxed, the parser applies softmax to convert the scores to probabilities.
class
ClassificationSequenceParser
ClassificationSequenceParser node. Parses the raw output of a classification sequence neural network into a dai::beta::Classifications message with class names and scores ordered by their position in the sequence. The model predicts the classes multiple times and returns a list of predicted classes, where each item corresponds to the relative step in the sequence. In addition to time series classification, this parser can also be used for text recognition models where words can be interpreted as a sequence of characters (classes). The parser consumes a single output tensor of shape (sequenceLength, nClasses), (1, sequenceLength, nClasses) or (sequenceLength, nClasses, 1). When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. Raw scores are dequantized; when the model output is not already softmaxed, the parser applies softmax along each sequence step to convert the scores to probabilities.
class
EmbeddingsParser
EmbeddingsParser node. Validates the raw output of an embeddings neural network model head and forwards it unchanged as a dai::NNData message. The parser expects a single output tensor carrying the embedding vector. When the output layer name is left unconfigured, every incoming NNData must contain exactly one tensor; otherwise the message is rejected. The message itself is forwarded without modification, so all tensors, sequence number, timestamps, and image transformation metadata are preserved.
class
FastSAMParser
FastSAMParser node. Parses the output of the FastSAM segmentation model (https://github.com/CASIA-IVA-Lab/FastSAM) into a dai::SegmentationMask message where each pixel holds the index of the instance it belongs to and 255 marks background. The parser consumes the model's YOLO detection outputs (NCHW tensors of shape (1, numClasses + 5, gridH, gridW), sorted by layer name and decoded anchorless with strides 8/16/32), the per-head mask-coefficient outputs (NCHW tensors of shape (1, numPrototypes, gridH, gridW), sorted by layer name) and the prototype masks output (NCHW tensor of shape (1, numPrototypes, protoH, protoW)). The model input size is derived from the first (stride-8) YOLO output's grid times 8; the number of prototypes from the protos tensor's channel count. Boxes pass confidence filtering and non-maximum suppression, boxes within 20 pixels of the image border are snapped to it, and a box overlapping the full image with IoU > 0.9 is replaced by the full-image box. Each kept detection's mask is combined from the prototypes, resized to the model input size with nearest-neighbor interpolation, cropped to its box and binarized with the mask confidence threshold. The prompt selects the emitted instances: "everything" keeps all detections (later, lower-confidence instances overwrite earlier ones on overlapping pixels), "bbox" keeps the single mask with the highest IoU against the prompt bounding box, and "point" combines the masks containing the prompt point (added for point label 1, subtracted for 0). With no detections, a fully-background mask is emitted.
class
HRNetParser
HRNetParser node. Parses the heatmap output of an HRNet pose estimation neural network into a dai::beta::Keypoints message. The decoding is inspired by https://github.com/ibaiGorordo/ONNX-HRNET-Human-Pose-Estimation. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in NCHW orientation regardless of its stored order; after squeezing a leading batch dimension of 1 it must be a 3D tensor of shape (numKeypoints, height, width). The number of keypoints and the heatmap size are derived from the tensor shape. Per heatmap, the keypoint is the position of the maximum value normalized by the heatmap size and the keypoint's score is the maximum value clipped to [0, 1]. Keypoints with a score below the score threshold are dropped and the skeleton edges are remapped to the kept keypoints.
class
ImageOutputParser
ImageOutputParser node. Parses the output of image-to-image models (e.g. DnCNN3, zero-dce) where the output is a modified image (denoised, enhanced etc.) into a dai::ImgFrame message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order; after squeezing a leading batch dimension of 1 it must be a 3D image tensor in CHW or HWC orientation, with the channel dimension equal to 1 (grayscale) or 3 (color). All dimensions are derived from the runtime tensor descriptor. The values are min-max normalized and scaled to the [0, 255] 8-bit range. A grayscale image is emitted as a GRAY8 frame. A color image is emitted as a BGR888p frame when the pipeline's default device platform is RVC2 and as a BGR888i frame otherwise, including in a device-less pipeline. The model output is treated as RGB and converted to BGR unless the BGR-output flag marks it as already BGR.
class
ImgDetectionsFilter
Experimental node for filtering image detections.
class
KeypointParser
KeypointParser node. Parses the raw output of a 2D or 3D keypoints neural network into a dai::beta::Keypoints message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The number of keypoints must be configured before the pipeline starts. The number of coordinates per keypoint (2 or 3) is derived from the tensor size and the configured number of keypoints. Keypoint coordinates are divided by the configured scale factor and clipped to [0, 1].
class
LaneDetectionParser
LaneDetectionParser node. Parses the output of an Ultra-Fast-Lane-Detection (UFLD) neural network, e.g. the CULane and TuSimple variants, into a dai::beta::Clusters message with one cluster of normalized points per lane, including empty clusters for lanes without enough detected points. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order and must be a 4D tensor of shape (batch, gridingNum + 1, clsNumPerLane, numLanes); the first batch entry is decoded. The row anchors, griding number and number of points per lane must be configured before the pipeline starts, either explicitly or through an NNArchive head. The input size must also be configured before the pipeline starts: building from a full NNArchive derives it from the model input's declared shape and layout (NHWC or NCHW), while building from a specific head requires setInputSize() because a head carries no model input metadata.
class
MapOutputParser
MapOutputParser node. Parses the output of models that produce map outputs, such as depth maps (e.g. DepthAnything), density maps (e.g. DM-Count), heat maps, and similar, into a dai::beta::Map2D message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order; leading dimensions of 1 are squeezed and the tensor must then be a 2D HW map, or a 3D HWN map with a singleton trailing dimension that is squeezed as well. All map dimensions are derived from the runtime tensor descriptor. When min-max scaling is enabled, the map values are scaled to the [0, 1] range; a constant map is left unchanged.
class
MLSDParser
MLSDParser node. Parses the output of the M-LSD line segment detection model into a dai::beta::Lines message with the detected lines and their confidence scores, ordered by descending score. The parser consumes two output tensors that must be configured before the pipeline starts, either explicitly or through an NNArchive head: the tpMap tensor, read in NCHW orientation as a 4D tensor of shape (batch, channels, height, width) whose channels 1 to 4 hold the line displacement maps of the first batch entry, and the heat tensor, flattened to one score per (height, width) grid position. The topK highest-scoring grid positions are decoded into candidate lines and kept when their score and length are strictly above the score and distance thresholds. Ties between equal heat scores are ordered following numpy's portable argpartition/argsort semantics. The emitted line coordinates are normalized by the model input size, which defaults to 512x512 (the input size of all known M-LSD models, hard-coded by the source parser); building from a full NNArchive derives it from the model input's declared shape and layout (NHWC or NCHW), and setInputSize() overrides it.
class
MPPalmDetectionParser
MPPalmDetectionParser node. Parses the output of the MediaPipe palm detection model into a dai::ImgDetections message containing the rotated bounding boxes, labels and confidence scores of the detected hands. The decoding is based on https://github.com/geaxgx/depthai_hand_tracker (MIT License). The parser consumes two output tensors and identifies them by their last dimension: the tensor with the larger last dimension holds the raw bounding boxes and is reshaped to (numAnchors, 18) rows of bounding box center/size plus 7 palm keypoint coordinate pairs; the tensor with the smaller last dimension holds the raw scores and is flattened to (numAnchors,). The scores are passed through a sigmoid and filtered with the confidence threshold, the kept rows are decoded against the model's SSD anchors generated from the configured scale (the model input size), converted to rectangles rotated to align the wrist to middle- finger direction with the rectangle's y-axis and expanded to squares, and non- maximum suppression keeps at most the configured maximum number of detections. The emitted bounding boxes are normalized to [0, 1].
class
MultiDeviceCalibration
Estimates metric cross-device calibration from synchronized camera images. The node is host-only and one-shot. Configuration is supplied before the `start` control command; the node emits a pure-data result and enters its completed state. A `reset` command clears the cycle and permits another run.
class
PPTextDetectionParser
PPTextDetectionParser node. Parses the output of the PaddlePaddle OCR text detection model into a dai::ImgDetections message containing the rotated bounding boxes and confidence scores of the detected text. The parser consumes a single probability-map output tensor of shape (1, 1, H, W) or (1, H, W, 1). The map is thresholded with the mask threshold into a binary text mask, the mask is dilated and its contours become rotated-rectangle candidates; when more contours than the maximum number of detections remain, the largest by area are kept. Rectangles smaller than 8 pixels on their smaller side are dropped, each candidate is scored with the mean probability inside its (slightly shrunk) corner polygon, candidates scoring below the confidence threshold are dropped, and the kept rectangles are expanded by sqrt(2) in both dimensions. The emitted bounding boxes are normalized to [0, 1] with angles in degrees rounded to whole numbers; the detections carry no labels.
class
RegressionParser
RegressionParser node. Parses the output of a model with regression output (e.g. age-gender) into a dai::beta::Predictions message with the predicted value(s) in the order the model emitted them. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is dequantized and all its singleton dimensions are squeezed; the remaining values become the predictions, so any tensor with at most one non-singleton dimension is accepted regardless of rank (for example (1, 1, 1, 3), (1, 1) or (1,)) and an empty tensor yields a message with no predictions. A tensor with more than one non-singleton dimension after squeezing is rejected.
class
RFDETRParser
RFDETRParser node. Parses the output of RF-DETR object detection models (https://github.com/roboflow/rf-detr) into a dai::ImgDetections message containing the bounding boxes, labels, confidence scores and, in segmentation mode, an instance segmentation mask, everything normalized to [0, 1]. The parser consumes 2 output tensors for detection (boxes, class logits) or 3 for instance segmentation (boxes, class logits, mask logits), in that order. When no output layer names are configured, all layer names of the incoming NNData are used in their reported order. The boxes tensor squeezes to (N, 4) with normalized (xCenter, yCenter, width, height) boxes, the logits tensor is (1, N, C) and the mask logits tensor squeezes to (N, maskHeight, maskWidth). Class probabilities are the sigmoid of the logits; per query the maximum probability is the score and its class the label. Detections are ordered by descending score, truncated to the maximum number of detections and kept when their score is strictly greater than the confidence threshold. In segmentation mode at most 255 instances fit into the mask, so the truncation is additionally capped at 255. Each detection's mask logits are passed through a sigmoid, cropped to its bounding box, binarized with the mask confidence threshold and resized to the model input size with nearest-neighbor interpolation; the pixels not claimed by an earlier (higher-scoring) detection receive the detection's index, with 255 marking background.
class
SCRFDParser
SCRFDParser node. Parses the output of SCRFD detection models (e.g. SCRFD face and person detection) into a dai::ImgDetections message containing the bounding boxes, labels, confidence scores and 5 keypoints per detected object, everything normalized to [0, 1]. The parser consumes three output tensors per configured feature stride, named score_{stride}, bbox_{stride} and kps_{stride}. The score tensor is flattened, the bbox tensor is paired 4 values per score (left, top, right, bottom distances from the anchor center) and the kps tensor 10 values per score (5 keypoint coordinate pairs), accepting both batched (1, N, C) and unbatched (N, C) tensors. Scores greater than or equal to the confidence threshold (inclusive) are kept, decoded against the anchor centers derived from the input size, the stride and the number of anchors, sorted by descending score and suppressed with the original SCRFD non-maximum suppression (+1 offset box areas, overlaps at most the IoU threshold survive). The anchor centers are cached across messages and refreshed when the input size, feature strides or number of anchors change.class
SuperAnimalParser
SuperAnimalParser node. Parses the heatmap output of the SuperAnimal landmark neural network into a dai::beta::Keypoints message. The parser consumes a single output tensor. When the incoming NNData contains exactly one tensor, it is selected automatically; otherwise the output layer name must be configured explicitly or through an NNArchive head. The tensor is read in its stored order and must be a 4D tensor of shape (batch, height, width, numKeypoints) with a batch size of exactly 1. The number of keypoints and the heatmap size are derived from the tensor shape; the configured number of keypoints is informational only and does not affect the decoding. Per keypoint, the keypoint is the position of the maximum heatmap value with a 0.5-pixel center offset, mapped to input-image pixels and normalized by the configured scale factor without clipping, and the keypoint's score is the heatmap value at that position, which must lie in [0, 1]. Keypoints with a score strictly below the score threshold are dropped and the skeleton edges are remapped to the kept keypoints.
class
Stitching
Stitching node. Combines N time-synced image streams into a single stitched image. The node runs on the host by default and can run on an RVC4 device when selected with `setRunOnHost(false)`. Host execution requires depthai-core OpenCV support. Inputs are fixed at build() time and synced by an internal Sync subnode that follows the node's execution side, so host-mode sources may come from different devices. Two independent stitching modes are available: - `Mode::PANORAMA` wraps OpenCV's cv::Stitcher and registers the images from their content, so no calibration is needed, but the cameras have to overlap. - `Mode::PLANAR_PROJECTION` projects the images onto a plane given in the common origin frame of the inputs (bird's-eye view), driven purely by the calibration carried in the messages, so it also works without overlap. All input transformations must have the same origin camera socket. The stitched frame carries an ImgTransformation describing the virtual camera that rendered it, so that the image can be placed in space, e.g. wrapped onto a cylinder next to a point cloud. In `Mode::PLANAR_PROJECTION` that is the pinhole view of `setView()`, relative to the common origin of the inputs. In `Mode::PANORAMA` the camera model follows `setCameraModel()`: dai::CameraModel::Perspective, Cylindrical or Equirectangular (see dai::CameraModel for their projection formulas), the focal length is the radius of the projection surface in pixels and the principal point is the pixel the panorama Z axis projects to. A panorama composed from the input calibration is expressed in the destination coordinate system of the inputs, centered at the mean of their camera centers. A visually registered panorama is only known relative to its inputs, so it is expressed through the first contributing input: in the destination coordinate system of that input's extrinsics when it carries some, and relative to that input's camera, with an AUTO socket, otherwise.
class
XFeatMonoParser
XFeatMonoParser node. Parses the output of the XFeat model from one source (e.g. one camera) into a dai::TrackedFeatures message with the keypoints of a reference frame matched to the keypoints of the current frame. The parser consumes three output tensors, assigned from an NNArchive head by name substring or configured explicitly: the feature map (layer name containing "feats"), read in NCHW orientation as (1, descriptor size, height, width), the keypoint logits (name containing "keypoints"), read as (1, channels >= 64, height, width), and the reliability heat map (name containing "heatmaps"), read as (1, 1, height, width). Every frame is decoded into keypoints, scores and descriptors; the strongest keypoints (up to the maximum count) with a positive score are kept and their positions are scaled from the model input size to the original image size. The parser keeps a reference frame state: calling setTrigger() stores the next decoded result as the reference after that frame's message is emitted. Frames decoded while no reference is stored produce an empty TrackedFeatures message; afterwards each frame's keypoints are matched to the reference by mutual nearest-neighbor cosine similarity and emitted as feature pairs, where match i produces the reference position with id i and age 0 followed by the matched current position with id i and age 1. A frame whose keypoint heat map has no candidate produces an empty message and leaves the reference and the pending trigger untouched. The original image size must be configured before the pipeline starts, either through head metadata or with setOriginalSize().
class
XFeatStereoParser
XFeatStereoParser node. Parses the output of the XFeat model from two sources (e.g. two cameras - left and right) into a dai::TrackedFeatures message with the keypoints of the reference frame matched to the keypoints of the target frame. The parser consumes three output tensors per source, assigned from an NNArchive head by name substring or configured explicitly: the feature map (layer name containing "feats"), read in NCHW orientation as (1, descriptor size, height, width), the keypoint logits (name containing "keypoints"), read as (1, channels >= 64, height, width), and the reliability heat map (name containing "heatmaps"), read as (1, 1, height, width). Both sources share one layer, size and keypoint-count configuration. Each iteration consumes one reference message followed by one target message; the node performs no synchronization beyond these two sequential blocking reads. Both messages are decoded into keypoints, scores and descriptors; the strongest keypoints (up to the maximum count) with a positive score are kept and their positions are scaled from the model input size to the original image size. When the reference (checked first) or the target frame's keypoint heat map has no candidate, an empty TrackedFeatures message is emitted carrying that frame's timestamps and the reference frame's sequence number. Otherwise the reference keypoints are matched to the target keypoints by mutual nearest-neighbor cosine similarity and emitted as feature pairs, where match i produces the reference position with id i and age 0 followed by the matched target position with id i and age 1; the message carries the target frame's timestamps and the reference frame's sequence number, like the source parser. The original image size must be configured before the pipeline starts, either through head metadata or with setOriginalSize().
class
YuNetParser
YuNetParser node. Parses the output of the YuNet face detection model into a dai::ImgDetections message containing the bounding boxes, labels, confidence scores and 5 facial keypoints per detected face, everything normalized to [0, 1]. The decoding is based on https://github.com/Kazuhito00/YuNet-ONNX-TFLite- Sample (Apache License 2.0). The parser consumes three output tensors: a loc tensor with 14 values per anchor (2 bounding box center offsets, 2 bounding box size values and 5 keypoint coordinate offset pairs), a conf tensor with 2 values per anchor (non-face and face scores) and an iou tensor with 1 value per anchor. When a layer name is not configured, it is auto-detected from the incoming NNData as the single layer name starting with "loc", "conf" or "iou" respectively. The candidate scores are sqrt(conf face score * iou score clipped to [0, 1]); candidates with a score strictly greater than the confidence threshold are decoded against the YuNet anchors generated from the input size, suppressed with cv2.dnn.NMSBoxes- semantics non-maximum suppression (IoU threshold, maximum number of detections as the top-k limit) and emitted in descending score order. Keypoint coordinates are truncated to whole pixels before normalization, mirroring the source parser. The anchors are cached across messages and refreshed when the input size changes.
class
depthai.beta.node.ToFStereoFusion(depthai.DeviceNode)
method
build(self, left: depthai.node.Camera, right: depthai.node.Camera, fps: float = 30.0) -> ToFStereoFusion: ToFStereoFusionConfigures fusion from a synchronized left and right camera pair. @note This node is supported on RVC4 devices only. Parameter ``left``: Left camera node. Parameter ``right``: Right camera node. Parameter ``fps``: Frame rate for the neural-depth camera inputs and ToF subnode. Must be finite and positive. Defaults to 30 FPS. Returns: This node.
property
confidence
Confidence output produced by the ToF-neural fusion network, with the same optional crop and transformation as depth.
property
depth
Fused depth output, aligned to the ToF sensor. Optional cropping updates intrinsics and preserves the ToF camera pose.
property
property
inputLeft
Left camera input used when the node runs outside the RVC4 device build.
property
inputRight
Right camera input used when the node runs outside the RVC4 device build.
property
property
property
class
depthai.beta.node.ClassificationParser(depthai.DeviceNode)
method
method
getClasses(self) -> list[str]: list[str]Returns the class names to link with the classification scores.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getSoftmax(self) -> bool: boolReturns whether the model output is treated as already softmaxed.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setClasses(self, classes: list[str])Sets the class names to link with the classification scores. The class names are expected to be in the same order as the neural network's output. The number of class names must match the number of scores produced by the model. Parameter ``classes``: Vector of class names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one ClassificationParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a ClassificationParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setSoftmax(self, isSoftmax: bool)Sets whether the model output is already softmaxed. When false, the parser applies softmax to convert the raw scores to probabilities. Parameter ``isSoftmax``: True when the model output is already softmaxed
property
input
Input NN results with classification data to parse.
property
out
Outputs Classifications message with classes and scores sorted in descending order of score.
class
depthai.beta.node.ClassificationSequenceParser(depthai.DeviceNode)
method
method
getClasses(self) -> list[str]: list[str]Returns the class names to link with the per-step classification scores.
method
getConcatenateClasses(self) -> bool: boolReturns whether the remaining classes are concatenated.
method
getIgnoredIndexes(self) -> list[int]: list[int]Returns the class indexes ignored during classification sequence generation.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getRemoveDuplicates(self) -> bool: boolReturns whether consecutive duplicate classes are removed from the sequence.
method
getSoftmax(self) -> bool: boolReturns whether the model output is treated as already softmaxed.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setClasses(self, classes: list[str])Sets the class names to link with the per-step classification scores. The class names are expected to be in the same order as the neural network's output. The number of class names must match the number of scores produced by the model at each sequence step. Parameter ``classes``: Vector of class names
method
setConcatenateClasses(self, concatenateClasses: bool)Sets whether the remaining classes are concatenated. Used mostly for text processing. When true and more than one class remains: when all remaining class names are at most one character long, they are joined and split on whitespace into words with a per-word mean score; otherwise all class names are joined into a single string with a " " separator and one mean score. Parameter ``concatenateClasses``: True to concatenate the remaining classes @note Configures startup behavior. Send ClassificationSequenceParserConfig to inputConfig after the pipeline starts.
method
setIgnoredIndexes(self, ignoredIndexes: list[int])Sets the class indexes to ignore during classification sequence generation (e.g. background class, blank space). Sequence steps whose most probable class index is listed here are dropped from the output. Every index must be within [0, nClasses - 1]. Parameter ``ignoredIndexes``: Vector of class indexes to ignore @note Configures startup behavior. Send ClassificationSequenceParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one ClassificationSequenceParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a ClassificationSequenceParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRemoveDuplicates(self, removeDuplicates: bool)Sets whether consecutive duplicate classes are removed from the sequence. Only consecutive duplicates are removed; repeated classes separated by other classes are kept. Parameter ``removeDuplicates``: True to remove consecutive duplicates from the sequence @note Configures startup behavior. Send ClassificationSequenceParserConfig to inputConfig after the pipeline starts.
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setSoftmax(self, isSoftmax: bool)Sets whether the model output is already softmaxed. When false, the parser applies softmax along each sequence step to convert the raw scores to probabilities. Parameter ``isSoftmax``: True when the model output is already softmaxed
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with classification sequence data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Classifications message with classes and scores ordered by their position in the sequence.
class
depthai.beta.node.EmbeddingsParser(depthai.DeviceNode)
method
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer carrying the embeddings.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one EmbeddingsParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an EmbeddingsParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer carrying the embeddings. When left empty, the parser requires the incoming NNData to contain exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with embeddings data to validate and forward.
property
out
Outputs the unchanged NNData message containing the embeddings output layer.
class
depthai.beta.node.FastSAMParser(depthai.DeviceNode)
method
method
getBoundingBox(self) -> typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|None: typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|NoneReturns the prompt bounding box as (x1, y1, x2, y2), or std::nullopt when it is not set.
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected objects.
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression overlap threshold.
method
getMaskConfidence(self) -> float: floatReturns the mask confidence threshold.
method
getMaskOutputs(self) -> list[str]: list[str]Returns the names of the model's mask-coefficient output layers.
method
getNumClasses(self) -> int: intReturns the number of classes in the model.
method
getPointLabel(self) -> int|None: int|NoneReturns the prompt point label, or std::nullopt when it is not set.
method
getPoints(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the prompt point as (x, y), or std::nullopt when it is not set.
method
getPrompt(self) -> str: strReturns the prompt type.
method
getProtosOutput(self) -> str: strReturns the name of the model's prototype-masks output layer.
method
getYoloOutputs(self) -> list[str]: list[str]Returns the names of the model's YOLO output layers.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setBoundingBox(self, bbox: typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)])Sets the prompt bounding box as (x1, y1, x2, y2) in model-input pixels, used by the "bbox" prompt. Unset by default; the "bbox" prompt requires it and its x2 and y2 coordinates must not be 0. Parameter ``bbox``: Bounding box as (x1, y1, x2, y2) @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected objects. Detections whose score is strictly greater than the threshold are kept. Defaults to 0.5. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setIouThreshold(self, iouThreshold: float)Sets the non-maximum suppression overlap threshold. Boxes whose overlap with a kept box is strictly greater than the threshold are suppressed. Defaults to 0.5. Parameter ``iouThreshold``: Overlap threshold, must be between 0 and 1 @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setMaskConfidence(self, maskConfidence: float)Sets the mask confidence threshold used to binarize instance masks. Mask pixels with a sigmoid probability strictly greater than the threshold belong to the instance. Defaults to 0.5. Parameter ``maskConfidence``: Mask confidence threshold, must be between 0 and 1 @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setMaskOutputs(self, maskOutputs: list[str])Sets the names of the model's mask-coefficient output layers. Only names containing "mask" are used, sorted by name and index-aligned with the sorted YOLO output layers; when empty, all layer names of the incoming NNData containing "mask" are used. Defaults to ["output1_masks", "output2_masks", "output3_masks"]. Parameter ``maskOutputs``: Names of the mask output layers
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one FastSAMParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head's output layer names containing "_yolo" configure the YOLO output layers and those containing "_masks" the mask output layers (each only when at least one matches). The confidence threshold, number of classes, NMS threshold, mask confidence, prompt, points, point label and bounding box are read from the head metadata when present. Parameter ``head:``: NNArchive head to set
method
setNumClasses(self, numClasses: int)Sets the number of classes in the model. The YOLO output tensors must have numClasses + 5 channels. Defaults to 1. Parameter ``numClasses``: Number of classes, must be greater than 0
method
setPointLabel(self, pointLabel: int)Sets the prompt point label, used by the "point" prompt: 1 adds the instance masks containing the point, 0 subtracts them. Unset by default; the "point" prompt requires it. Parameter ``pointLabel``: Point label @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setPoints(self, x: int, y: int)Sets the prompt point as (x, y) in model-input pixels, used by the "point" prompt. Unset by default; the "point" prompt requires it. Parameter ``x``: Point x coordinate Parameter ``y``: Point y coordinate @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setPrompt(self, prompt: str)Sets the prompt type: "everything" emits every detected instance, "bbox" the single instance mask with the highest IoU against the prompt bounding box (see setBoundingBox()), and "point" the combination of the instance masks containing the prompt point (see setPoints() and setPointLabel()). Defaults to "everything". Parameter ``prompt``: Prompt type, one of "everything", "bbox" or "point" @note Configures startup behavior. Send FastSAMParserConfig to inputConfig after the pipeline starts.
method
setProtosOutput(self, protosOutput: str)Sets the name of the model's prototype-masks output layer; when empty, "protos_output" is used. Defaults to "protos_output". Parameter ``protosOutput``: Name of the protos output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setYoloOutputs(self, yoloOutputs: list[str])Sets the names of the model's YOLO output layers. The layers are processed sorted by name, so the stride-8 head must come first in sort order. Defaults to ["output1_yolov8", "output2_yolov8", "output3_yolov8"]. Parameter ``yoloOutputs``: Names of the YOLO output layers
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with FastSAM data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs SegmentationMask message with the resulting segmentation masks given the prompt.
class
depthai.beta.node.HRNetParser(depthai.DeviceNode)
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the keypoints.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getScoreThreshold(self) -> float: floatReturns the confidence score threshold for detected keypoints.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setEdges(self, edges: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]])Sets the skeleton edges as pairs of keypoint indices used for visualizing the skeleton. Example: {{0, 1}, {1, 2}, {2, 3}, {3, 0}} connects keypoint 0 to keypoint 1, keypoint 1 to keypoint 2, etc. Parameter ``edges``: Vector of keypoint index pairsmethod
setLabelNames(self, labelNames: list[str])Sets the label names for the keypoints, indexed by keypoint index. Parameter ``labelNames``: Vector of label names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one HRNetParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an HRNetParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScoreThreshold(self, threshold: float)Sets the confidence score threshold for detected keypoints. Keypoints with a score strictly below the threshold are dropped. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send HRNetParserConfig to inputConfig after the pipeline starts.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with heatmaps data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Keypoints message with the detected body keypoints.
class
depthai.beta.node.ImageOutputParser(depthai.DeviceNode)
method
method
getBGROutput(self) -> bool: boolReturns the flag indicating whether the model output image is in BGR (Blue- Green-Red) channel order.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setBGROutput(self, outputIsBGR: bool = True)Sets the flag indicating whether the model output image is in BGR (Blue-Green- Red) channel order. When false (the default), a color model output is treated as RGB and its channels are swapped to BGR before being emitted. Parameter ``outputIsBGR``: True when the model output image is already BGR, defaults to true
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one ImageOutputParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an ImageOutputParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with image tensor data to parse.
property
out
Outputs ImgFrame message with the model output image, e.g. a denoised or enhanced image.
class
depthai.beta.node.ImgDetectionsFilter(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used until a message is received on inputConfig. The default configuration forwards detections unchanged.
property
input
Image detections to filter.
property
inputConfig
Runtime filter configuration. The most recently received configuration is reused for subsequent detection messages.
property
output
Filtered image detections.
class
depthai.beta.node.KeypointParser(depthai.DeviceNode)
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the keypoints.
method
getNumKeypoints(self) -> int|None: int|NoneReturns the number of keypoints the model detects, or std::nullopt when not configured.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getScaleFactor(self) -> float: floatReturns the scale factor to divide the keypoint coordinates by.
method
getScoreThreshold(self) -> float|None: float|NoneReturns the confidence score threshold for detected keypoints, or std::nullopt when not configured.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setEdges(self, edges: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]])Sets the skeleton edges as pairs of keypoint indices used for visualizing the skeleton. Example: {{0, 1}, {1, 2}, {2, 3}, {3, 0}} connects keypoint 0 to keypoint 1, keypoint 1 to keypoint 2, etc. Parameter ``edges``: Vector of keypoint index pairsmethod
setLabelNames(self, labelNames: list[str])Sets the label names for the keypoints, indexed by keypoint index. Parameter ``labelNames``: Vector of label names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one KeypointParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a KeypointParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setNumKeypoints(self, nKeypoints: int)Sets the number of keypoints the model detects. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``nKeypoints``: Number of keypoints, must be greater than 0
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScaleFactor(self, scaleFactor: float)Sets the scale factor to divide the keypoint coordinates by. Parameter ``scaleFactor``: Scale factor, must be greater than 0
method
setScoreThreshold(self, threshold: float)Sets the confidence score threshold for detected keypoints. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1
property
input
Input NN results with keypoints data to parse.
property
out
Outputs Keypoints message with the parsed 2D or 3D keypoints.
class
depthai.beta.node.LaneDetectionParser(depthai.DeviceNode)
method
method
getClsNumPerLane(self) -> int|None: int|NoneReturns the number of points per lane, or std::nullopt when not configured.
method
getGridingNum(self) -> int|None: int|NoneReturns the griding number, or std::nullopt when not configured.
method
getInputSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the model input image size as (width, height), or std::nullopt when not configured.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getRowAnchors(self) -> list[int]: list[int]Returns the row anchors, or an empty vector when not configured.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setClsNumPerLane(self, clsNumPerLane: int)Sets the number of points per lane. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``clsNumPerLane``: Number of points per lane, must be greater than 0
method
setGridingNum(self, gridingNum: int)Sets the griding number, the number of column samples the model predicts lane positions over. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``gridingNum``: Griding number, must be greater than 1
method
setInputSize(self, width: int, height: int)Sets the model input image size the emitted points are computed against and normalized by. Must be configured before the pipeline starts. Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one LaneDetectionParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a LaneDetectionParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size must additionally be configured with setInputSize().
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRowAnchors(self, rowAnchors: list[int])Sets the row anchors, the image rows at which the model predicts lane positions. Must be configured before the pipeline starts, either explicitly or through an NNArchive head, and must contain at least as many entries as the number of points per lane. Parameter ``rowAnchors``: Row anchors, must not be empty
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with lane detection data to parse.
property
out
Outputs Clusters message with the detected lanes represented as clusters of points.
class
depthai.beta.node.MapOutputParser(depthai.DeviceNode)
method
method
getMinMaxScaling(self) -> bool: boolReturns the flag indicating whether the map is scaled to the [0, 1] range.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setMinMaxScaling(self, minMaxScaling: bool = True)Sets the flag indicating whether the map is scaled to the [0, 1] range. When true, the map values are min-max scaled to [0, 1]; a constant map is left unchanged. Defaults to false. Parameter ``minMaxScaling``: True to scale the map to the [0, 1] range, defaults to true @note Configures startup behavior. Send MapOutputParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one MapOutputParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a MapOutputParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with map tensor data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Map2D message with the parsed 2D map, e.g. a depth or density map.
class
depthai.beta.node.MLSDParser(depthai.DeviceNode)
method
method
getDistanceThreshold(self) -> float: floatReturns the distance threshold for detected lines.
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getOutputLayerHeat(self) -> str: strReturns the name of the output layer containing the heat tensor, or an empty string when not configured.
method
getOutputLayerTPMap(self) -> str: strReturns the name of the output layer containing the tpMap tensor, or an empty string when not configured.
method
getScoreThreshold(self) -> float: floatReturns the confidence score threshold for detected lines.
method
getTopK(self) -> int: intReturns the number of top candidates to keep.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setDistanceThreshold(self, distanceThreshold: float)Sets the distance threshold for detected lines. Candidates whose length in heat map grid units is strictly above the threshold are kept. Parameter ``distanceThreshold``: Distance threshold @note Configures startup behavior. Send MLSDParserConfig to inputConfig after the pipeline starts.
method
setInputSize(self, width: int, height: int)Sets the model input image size the emitted line coordinates are normalized by, x coordinates by the width and y coordinates by the height. Defaults to 512x512, the input size of all known M-LSD models. Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one MLSDParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an MLSDParser head with exactly two output layers; the layer whose name contains "tpMap" is used as the tpMap layer and the layer whose name contains "heat" as the heat layer. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value (512x512 by default); use setInputSize() for models with a different input size.
method
setOutputLayerHeat(self, outputLayerHeat: str)Sets the name of the output layer containing the heat tensor. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``outputLayerHeat``: Name of the output layer containing the heat tensor
method
setOutputLayerTPMap(self, outputLayerTPMap: str)Sets the name of the output layer containing the tpMap tensor. Must be configured before the pipeline starts, either explicitly or through an NNArchive head. Parameter ``outputLayerTPMap``: Name of the output layer containing the tpMap tensor
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScoreThreshold(self, scoreThreshold: float)Sets the confidence score threshold for detected lines. Candidates with a heat score strictly above the threshold are kept. Parameter ``scoreThreshold``: Confidence score threshold @note Configures startup behavior. Send MLSDParserConfig to inputConfig after the pipeline starts.
method
setTopK(self, topK: int)Sets the number of top candidates to keep. The number of candidates is capped at the heat map size when decoding. Parameter ``topK``: Number of top candidates to keep, must be positive @note Configures startup behavior. Send MLSDParserConfig to inputConfig after the pipeline starts.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with line detection data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Lines message with the detected lines and confidence scores.
class
depthai.beta.node.MPPalmDetectionParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected hands.
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression (IoU) threshold.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected hands.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getOutputLayerNames(self) -> list[str]: list[str]Returns the names of the model output layers relevant to the parser.
method
getScale(self) -> int: intReturns the scale of the model input image in pixels.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected hands. Detections with a sigmoid score strictly above the threshold are kept. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send MPPalmDetectionParserConfig to inputConfig after the pipeline starts.
method
setIouThreshold(self, threshold: float)Sets the non-maximum suppression (IoU) threshold. Parameter ``threshold``: Non-maximum suppression threshold @note Configures startup behavior. Send MPPalmDetectionParserConfig to inputConfig after the pipeline starts.
method
setLabelNames(self, labelNames: list[str])Sets the label names for the detected hands. The first label name is assigned to every detection (all detections carry label 0). When empty, no label name is assigned. Parameter ``labelNames``: List of label names
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep. Parameter ``maxDetections``: Maximum number of detections to keep @note Configures startup behavior. Send MPPalmDetectionParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one MPPalmDetectionParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an MPPalmDetectionParser head with exactly two output layers. Parameter ``head:``: NNArchive head to set
method
setOutputLayerNames(self, outputLayerNames: list[str])Sets the names of the model output layers relevant to the parser. Exactly two layer names are required. Parameter ``outputLayerNames``: Names of the output layers
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
method
setScale(self, scale: int)Sets the scale of the model input image in pixels (e.g. 192 for a 192x192 model). The SSD anchors used for decoding are generated from the scale; a scale that does not match the model input size fails decoding with an anchor count mismatch. Parameter ``scale``: Scale of the input image
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with palm detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the rotated bounding boxes, labels and confidence scores of the detected hands.
class
depthai.beta.node.MultiDeviceCalibration(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
method
property
property
property
property
property
class
depthai.beta.node.PPTextDetectionParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for the detected text bounding boxes.
method
getMaskThreshold(self) -> float: floatReturns the mask threshold for creating the binary text mask from the model output probabilities.
method
getMaxDetections(self) -> int: intReturns the maximum number of candidate bounding boxes.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer holding the text probability map.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for the detected text bounding boxes. Candidates with a score strictly below the threshold are dropped. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send PPTextDetectionParserConfig to inputConfig after the pipeline starts.
method
setMaskThreshold(self, maskThreshold: float)Sets the mask threshold for creating the binary text mask from the model output probabilities. Probabilities strictly above the threshold belong to the mask. Parameter ``maskThreshold``: Mask threshold @note Configures startup behavior. Send PPTextDetectionParserConfig to inputConfig after the pipeline starts.
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of candidate bounding boxes. When more candidate contours are found, only the largest by area are kept. Parameter ``maxDetections``: Maximum number of candidate bounding boxes @note Configures startup behavior. Send PPTextDetectionParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one PPTextDetectionParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head configures the confidence threshold, the mask threshold and the maximum number of detections when present in its metadata. The head's declared output names are not consumed: the parser resolves the single runtime output tensor by itself (or uses the explicitly configured output layer name), mirroring the source parser; archives whose head output name differs from the model's declared output name therefore parse correctly. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer holding the text probability map. When empty (the default), the layer is resolved automatically from single-tensor NN results; multi-tensor results require an explicit name. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with text detection probability map to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the rotated bounding boxes and confidence scores of the detected text.
class
depthai.beta.node.RegressionParser(depthai.DeviceNode)
method
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one RegressionParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a RegressionParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
input
Input NN results with regression data to parse.
property
out
Outputs Predictions message with the predicted value(s).
class
depthai.beta.node.RFDETRParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected objects.
method
getInputSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the model input image size as (width, height), or std::nullopt when it is not set.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected objects.
method
getMaskConfidence(self) -> float: floatReturns the mask confidence threshold.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getOutputLayerNames(self) -> list[str]: list[str]Returns the names of the model output layers.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected objects. Detections with a score strictly greater than the threshold are kept. Defaults to 0.5. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send RFDETRParserConfig to inputConfig after the pipeline starts.
method
setInputSize(self, width: int, height: int)Sets the model input image size the segmentation mask is emitted at. Unset by default; segmentation mode requires it to be configured from an NNArchive or with this setter before the parser processes messages. Detection mode does not use it. Configuring from a full NNArchive derives it from the first model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setLabelNames(self, labelNames: list[str])Sets the label names for the detected objects, indexed by the class label. A detection whose label is out of range receives the name "class_<label>". When empty, no label names are assigned. Defaults to empty. Parameter ``labelNames``: List of label names
method
setMaskConfidence(self, maskConfidence: float)Sets the mask confidence threshold used to binarize instance segmentation masks in segmentation mode. Mask pixels with a sigmoid probability strictly greater than the threshold belong to the instance. Defaults to 0.5. Parameter ``maskConfidence``: Mask confidence threshold, must be between 0 and 1 @note Configures startup behavior. Send RFDETRParserConfig to inputConfig after the pipeline starts.
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep, applied to the detections ordered by descending score. In segmentation mode the applied limit is additionally capped at 255, the maximum number of instances the segmentation mask can encode. Defaults to 300. Parameter ``maxDetections``: Maximum number of detections to keep, must be greater than 0 @note Configures startup behavior. Send RFDETRParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one RFDETRParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the first model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an RFDETRParser head with 2 output layers (boxes, class logits) for detection or 3 (boxes, class logits, mask logits) for segmentation. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value; segmentation mode requires it to be configured with setInputSize() when it is not set yet.
method
setOutputLayerNames(self, outputLayerNames: list[str])Sets the names of the model output layers, positionally: the boxes layer, the class logits layer and, in segmentation mode, the mask logits layer. Must hold 2 or 3 names. When left empty, all layer names of the incoming NNData are used in their reported order. Parameter ``outputLayerNames``: Names of the output layers
method
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with RF-DETR detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the bounding boxes, labels and confidence scores of the detected objects and, in segmentation mode, the instance segmentation mask.
class
depthai.beta.node.SCRFDParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected objects.
method
getFeatStrideFPN(self) -> list[int]: list[int]Returns the feature strides of the FPN.
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression (IoU) threshold.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected objects.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getNumAnchors(self) -> int: intReturns the number of anchors per feature map position.
method
getOutputLayerNames(self) -> list[str]: list[str]Returns the names of the model output layers relevant to the parser.
method
runOnHost(self) -> bool: boolReturns true when this node runs on the host. Host-only pipelines always run the node on the host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected objects. Detections with a score greater than or equal to the threshold (inclusive) are kept. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send SCRFDParserConfig to inputConfig after the pipeline starts.
method
setFeatStrideFPN(self, featStrideFpn: list[int])Sets the feature strides of the FPN. One score_{stride}, bbox_{stride} and kps_{stride} layer triple is parsed per stride. Defaults to (8, 16, 32). Parameter ``featStrideFpn``: Feature strides, every stride must be greater than 0method
setInputSize(self, width: int, height: int)Sets the model input image size the anchor centers are computed against and the emitted coordinates are normalized by. Defaults to (640, 640). Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setIouThreshold(self, threshold: float)Sets the non-maximum suppression (IoU) threshold. Candidates whose overlap with a kept detection is at most the threshold (inclusive) survive suppression. Parameter ``threshold``: Non-maximum suppression threshold @note Configures startup behavior. Send SCRFDParserConfig to inputConfig after the pipeline starts.
method
setLabelNames(self, labelNames: list[str])Sets the label names for the detected objects. The first label name is assigned to every detection (all detections carry label 0). When empty, no label name is assigned. Defaults to ("Face"). Parameter ``labelNames``: List of label namesmethod
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep. Parameter ``maxDetections``: Maximum number of detections to keep @note Configures startup behavior. Send SCRFDParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one SCRFDParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an SCRFDParser head with an equal number of score, bbox and kps output layers. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value; configure it with setInputSize() when it differs from the default.
method
setNumAnchors(self, numAnchors: int)Sets the number of anchors per feature map position. Defaults to 2. Parameter ``numAnchors``: Number of anchors; values of 1 or less yield one anchor per position, mirroring the source behavior
method
setOutputLayerNames(self, outputLayerNames: list[str])Sets the names of the model output layers relevant to the parser. The parser looks up the per-stride score_{stride}, bbox_{stride} and kps_{stride} layer names in this list. When left empty, the list is resolved from the layer names of the first incoming NNData. Parameter ``outputLayerNames``: Names of the output layersmethod
setRunOnHost(self, runOnHost: bool)Select whether the node runs on the host or device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with SCRFD detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the bounding boxes, labels, confidence scores and keypoints of the detected objects.
class
depthai.beta.node.SuperAnimalParser(depthai.DeviceNode)
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the keypoints.
method
getNumKeypoints(self) -> int: intReturns the number of keypoints the model detects.
method
getOutputLayerName(self) -> str: strReturns the name of the model output layer to parse.
method
getScaleFactor(self) -> float: floatReturns the scale factor the keypoint coordinates are scaled and normalized by.
method
getScoreThreshold(self) -> float: floatReturns the confidence score threshold for detected keypoints.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setEdges(self, edges: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]])Sets the skeleton edges as pairs of keypoint indices used for visualizing the skeleton. Example: {{0, 1}, {1, 2}, {2, 3}, {3, 0}} connects keypoint 0 to keypoint 1, keypoint 1 to keypoint 2, etc. Parameter ``edges``: Vector of keypoint index pairsmethod
setLabelNames(self, labelNames: list[str])Sets the label names for the keypoints, indexed by keypoint index. Parameter ``labelNames``: Vector of label names
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one SuperAnimalParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a SuperAnimalParser head with exactly one output layer. Parameter ``head:``: NNArchive head to set
method
setNumKeypoints(self, nKeypoints: int)Sets the number of keypoints the model detects. Informational only: the decoding derives the number of keypoints from the heatmap tensor's last dimension. Parameter ``nKeypoints``: Number of keypoints, must be greater than 0
method
setOutputLayerName(self, outputLayerName: str)Sets the name of the model output layer to parse. When left empty, the parser selects the tensor automatically if the incoming NNData contains exactly one tensor and fails otherwise. Parameter ``outputLayerName``: Name of the output layer
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
method
setScaleFactor(self, scaleFactor: float)Sets the scale factor the keypoint coordinates are scaled and normalized by, typically the model input size. Parameter ``scaleFactor``: Scale factor, must be greater than 0
method
setScoreThreshold(self, threshold: float)Sets the confidence score threshold for detected keypoints. Keypoints with a score strictly below the threshold are dropped. Parameter ``threshold``: Confidence score threshold, must be between 0 and 1 @note Configures startup behavior. Send SuperAnimalParserConfig to inputConfig after the pipeline starts.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with heatmaps data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs Keypoints message with the detected animal keypoints.
class
depthai.beta.node.Stitching(depthai.DeviceNode)
class
Mode
Stitching mode. Members: PANORAMA PLANAR_PROJECTION
class
SeamFinder
Seam estimation method. Members: NONE VORONOI DP_COLOR DP_COLOR_GRAD GRAPHCUT_COLOR GRAPHCUT_COLOR_GRAD
class
Plane
A plane used by planar projection stitching.
class
VirtualCamera
The pinhole camera used to render a planar projection.
method
method
method
method
method
method
method
method
getNumInputs(self) -> int: intNumber of inputs the node was built with.
method
method
method
method
getUseInputCalibration(self) -> bool: boolReturn whether panorama composition uses the calibration carried by the input ImgTransformations.
method
method
resetTransform(self)Discard the fixed transform and composition state and re-run the estimation. In `Mode::PLANAR_PROJECTION` the projection maps, seams and exposure gains are rebuilt from the next synced group. In non-continuous `Mode::PANORAMA`, registration is repeated and the fixed maps, regions, seams and exposure parameters are rebuilt.
method
runOnHost(self) -> bool: boolCheck whether the node is configured to run on host.
method
setCameraModel(self, model: depthai.CameraModel)Set the projection surface the images are warped onto. Defaults to Equirectangular (a sphere), same as OpenCV. Only used in `Mode::PANORAMA`. Parameter ``model``: dai::CameraModel::Equirectangular, Cylindrical or Perspective Throws: std::invalid_argument for any other model
method
setContinuous(self, continuous: bool)Re-estimate the camera parameters on every frame. Only used in `Mode::PANORAMA`. When true, registration runs for every synced group, which is slow but tolerates cameras that move relative to each other. When false, registration evaluates getEstimationFrames() complete candidates without composing them, selects the one with the strongest geometrically consistent feature-match score, and then starts emitting panoramas using that transform. Projection maps, output regions, seam masks and exposure parameters are prepared with the first emitted panorama and reused for subsequent groups.
method
setEstimationFrames(self, frames: int)Number of complete registration candidates evaluated before the strongest transform is fixed. Failed registrations, oversized candidates, and candidates that omit an input do not count. No panorama is emitted while the candidates are being evaluated. Only used when continuous is false.
method
setMaxPanoramaSize(self, width: int, height: int)Reject panorama registrations whose projected canvas exceeds this size before OpenCV allocates and composes it. This protects against degenerate feature matches producing extremely large canvases. By default the size is unbounded.
method
setMaxRange(self, range: float, unit: depthai.LengthUnit = ...)Distance from a camera center beyond which the plane is not painted anymore. Bounds the automatic view and cuts off the region around the horizon, where a few pixels are stretched over a large part of the plane. Defaults to 10 meters.
method
setMaxViewSize(self, width: int, height: int)Upper bound on the size of the automatically computed view, in pixels. Defaults to 1920x1920.
method
setMinIncidenceAngle(self, degrees: float)Smallest angle between a camera ray and the plane for the ray to still be used. Rays hitting the plane at a shallower angle are heavily stretched, so they are dropped. Defaults to 5 degrees.
method
setMode(self, mode: Stitching.Mode)Set the stitching mode. `Mode::PLANAR_PROJECTION` additionally needs a plane, see `setPlane()`.
method
setPanoConfidenceThreshold(self, threshold: float)Confidence below which an image is dropped from the panorama
method
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or an RVC4 device. By default, the node runs on host.
method
setSeamFinder(self, finder: Stitching.SeamFinder)Set the panorama seam finder. In calibrated panorama mode, `NONE` selects direct composition; other values also enable exposure compensation and multiband blending.
method
setSyncThreshold(self, syncThreshold: datetime.timedelta)Set the maximal interval between messages of a synced group. Parameter ``syncThreshold``: Maximal interval between messages in the group
method
setUseInputCalibration(self, useInputCalibration: bool)Use the intrinsics and rotations carried by the input ImgTransformations to compose a panorama. All inputs must be expressed relative to exactly the same destination device ID and camera socket. Translation is ignored, so all camera centers are treated as coincident. Cylindrical panoramas use the normalized mean input camera Y axis as the cylinder axis. When enabled, panorama composition starts from the first synchronized group without feature matching or bundle adjustment. With `SeamFinder::NONE`, warped inputs are copied in order and later inputs replace earlier ones in overlapping regions. Other seam finders enable seam estimation, exposure compensation, and multiband blending. The prepared composition is reused for subsequent groups. Only undistorted inputs are accepted. Only used in `Mode::PANORAMA`.
method
setView(self, view: Stitching.VirtualCamera)Camera the plane is rendered from, in `Mode::PLANAR_PROJECTION`. By default the view is computed from the content: the node intersects the field of view of every input with the plane and places a camera looking straight at the plane so that all of the footprints fit, at a resolution derived from the inputs and bounded by `setMaxViewSize()`.
method
property
inputs
A map of inputs, one per stitched source. Populated by build().
property
out
Stitched image, ImgFrame of type BGR888i. Its transformation describes the virtual camera that rendered it, see the class documentation.
property
sync
Internal Sync node time-aligning the inputs.
class
depthai.beta.node.Stitching.Mode
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.node.Stitching.SeamFinder
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.node.Stitching.VirtualCamera
method
property
height
Height of the rendered image in pixels.
method
property
intrinsics
Intrinsic matrix of the camera.
method
property
pose
Pose of the camera with respect to the reference frame.
method
property
unit
Length unit of the translation part of `pose`.
method
property
width
Width of the rendered image in pixels.
method
class
depthai.beta.node.XFeatMonoParser(depthai.DeviceNode)
method
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getMaxKeypoints(self) -> int: intReturns the maximum number of keypoints to keep per frame.
method
getOriginalSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the original image size as (width, height), or std::nullopt when not configured.
method
getOutputLayerFeats(self) -> str: strReturns the name of the output layer containing the feature map.
method
getOutputLayerHeatmaps(self) -> str: strReturns the name of the output layer containing the reliability heat map.
method
getOutputLayerKeypoints(self) -> str: strReturns the name of the output layer containing the keypoint logits.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setInputSize(self, width: int, height: int)Sets the model input image size the keypoint positions are decoded in. Defaults to 640x352 like the source parser. Configuring from a full NNArchive takes it from the head metadata or derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setMaxKeypoints(self, maxKeypoints: int)Sets the maximum number of keypoints to keep per frame. Parameter ``maxKeypoints``: Maximum number of keypoints @note Configures startup behavior. Send XFeatMonoParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one XFeatMonoParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. When the head metadata carries no input size, the input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an XFeatMonoParser head with exactly three output layers; the layer whose name contains "feats" is used as the feature map layer, the layer whose name contains "keypoints" as the keypoint logit layer and the layer whose name contains "heatmaps" as the reliability heat map layer. The original size, input size and maximum keypoint count are read from the head metadata keys original_size, input_size and max_keypoints; missing keys keep the current values. Parameter ``head:``: NNArchive head to set
method
setOriginalSize(self, width: int, height: int)Sets the original image size the emitted keypoint positions are scaled to. Must be configured before the pipeline starts, either explicitly or through head metadata. Parameter ``width``: Original image width, must be greater than 0 Parameter ``height``: Original image height, must be greater than 0
method
setOutputLayerFeats(self, outputLayerFeats: str)Sets the name of the output layer containing the feature map. Parameter ``outputLayerFeats``: Name of the output layer containing the feature map
method
setOutputLayerHeatmaps(self, outputLayerHeatmaps: str)Sets the name of the output layer containing the reliability heat map. Parameter ``outputLayerHeatmaps``: Name of the output layer containing the reliability heat map
method
setOutputLayerKeypoints(self, outputLayerKeypoints: str)Sets the name of the output layer containing the keypoint logits. Parameter ``outputLayerKeypoints``: Name of the output layer containing the keypoint logits
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
method
setTrigger(self)Requests the reference frame update: after the next decoded frame's message is emitted, that frame's keypoints become the reference the following frames are matched against. May be called at any time while the pipeline runs.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
input
Input NN results with XFeat data to parse.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs TrackedFeatures message with the matched keypoint pairs.
class
depthai.beta.node.XFeatStereoParser(depthai.DeviceNode)
method
method
getInputSize(self) -> tuple[int, int]: tuple[int, int]Returns the model input image size as (width, height).
method
getMaxKeypoints(self) -> int: intReturns the maximum number of keypoints to keep per frame.
method
getOriginalSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the original image size as (width, height), or std::nullopt when not configured.
method
getOutputLayerFeats(self) -> str: strReturns the name of the output layer containing the feature map.
method
getOutputLayerHeatmaps(self) -> str: strReturns the name of the output layer containing the reliability heat map.
method
getOutputLayerKeypoints(self) -> str: strReturns the name of the output layer containing the keypoint logits.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setInputSize(self, width: int, height: int)Sets the model input image size the keypoint positions are decoded in. Defaults to 640x352 like the source parser. Configuring from a full NNArchive takes it from the head metadata or derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setMaxKeypoints(self, maxKeypoints: int)Sets the maximum number of keypoints to keep per frame. Parameter ``maxKeypoints``: Maximum number of keypoints @note Configures startup behavior. Send XFeatStereoParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one XFeatStereoParser head; use setNNArchiveHead() to select a specific head from a multi-head archive. When the head metadata carries no input size, the input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be an XFeatStereoParser head with exactly three output layers; the layer whose name contains "feats" is used as the feature map layer, the layer whose name contains "keypoints" as the keypoint logit layer and the layer whose name contains "heatmaps" as the reliability heat map layer. The original size, input size and maximum keypoint count are read from the head metadata keys original_size, input_size and max_keypoints; missing keys keep the current values. Parameter ``head:``: NNArchive head to set
method
setOriginalSize(self, width: int, height: int)Sets the original image size the emitted keypoint positions are scaled to. Must be configured before the pipeline starts, either explicitly or through head metadata. Parameter ``width``: Original image width, must be greater than 0 Parameter ``height``: Original image height, must be greater than 0
method
setOutputLayerFeats(self, outputLayerFeats: str)Sets the name of the output layer containing the feature map. Parameter ``outputLayerFeats``: Name of the output layer containing the feature map
method
setOutputLayerHeatmaps(self, outputLayerHeatmaps: str)Sets the name of the output layer containing the reliability heat map. Parameter ``outputLayerHeatmaps``: Name of the output layer containing the reliability heat map
method
setOutputLayerKeypoints(self, outputLayerKeypoints: str)Sets the name of the output layer containing the keypoint logits. Parameter ``outputLayerKeypoints``: Name of the output layer containing the keypoint logits
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
property
initialConfig
Configuration used until a message is received on inputConfig.
property
inputConfig
Runtime parser configuration. When synchronized, one configuration is consumed per frame pair; otherwise all queued configurations are drained and the newest valid one is used.
property
out
Outputs TrackedFeatures message with the matched keypoint pairs.
property
referenceInput
Input NN results of the reference source (e.g. the left camera) with XFeat data to parse.
property
targetInput
Input NN results of the target source (e.g. the right camera) with XFeat data to parse.
class
depthai.beta.node.YuNetParser(depthai.DeviceNode)
method
method
getConfidenceThreshold(self) -> float: floatReturns the confidence score threshold for detected faces.
method
getInputSize(self) -> tuple[int, int]|None: tuple[int, int]|NoneReturns the model input image size as (width, height), or std::nullopt when it is not set.
method
getIouThreshold(self) -> float: floatReturns the non-maximum suppression (IoU) threshold.
method
getLabelNames(self) -> list[str]: list[str]Returns the label names for the detected faces.
method
getMaxDetections(self) -> int: intReturns the maximum number of detections to keep.
method
getOutputLayerConf(self) -> str: strReturns the name of the output layer containing the confidence predictions.
method
getOutputLayerIou(self) -> str: strReturns the name of the output layer containing the IoU predictions.
method
getOutputLayerLoc(self) -> str: strReturns the name of the output layer containing the location predictions.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host.
method
setConfidenceThreshold(self, threshold: float)Sets the confidence score threshold for detected faces. Detections with a score strictly greater than the threshold are kept. Parameter ``threshold``: Confidence score threshold @note Configures startup behavior. Send YuNetParserConfig to inputConfig after the pipeline starts.
method
setInputSize(self, width: int, height: int)Sets the model input image size the anchors are computed against and the emitted coordinates are normalized by. Unset by default; it must be configured from an NNArchive or with this setter before the parser processes messages. Configuring from a full NNArchive derives it from the model input's declared shape and layout; the most recent configuration wins. Parameter ``width``: Input image width, must be greater than 0 Parameter ``height``: Input image height, must be greater than 0
method
setIouThreshold(self, threshold: float)Sets the non-maximum suppression (IoU) threshold. Candidates whose overlap with a kept detection is at most the threshold (inclusive) survive suppression. Parameter ``threshold``: Non-maximum suppression threshold @note Configures startup behavior. Send YuNetParserConfig to inputConfig after the pipeline starts.
method
setLabelNames(self, labelNames: list[str])Sets the label names for the detected faces. The first label name is assigned to every detection (all detections carry label 0). When empty, no label name is assigned. Defaults to ("Face"). Parameter ``labelNames``: List of label namesmethod
setMaxDetections(self, maxDetections: int)Sets the maximum number of detections to keep, applied as the non-maximum suppression top-k limit (no limit when 0 or negative). Parameter ``maxDetections``: Maximum number of detections to keep @note Configures startup behavior. Send YuNetParserConfig to inputConfig after the pipeline starts.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. The archive must contain exactly one YuNetParser head and exactly one model input; use setNNArchiveHead() to select a specific head from a multi-head archive. The input size is derived from the model input's declared shape and layout (NHWC or NCHW). Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. The head must be a YuNetParser head; every head output layer name must contain "loc", "conf" or "iou" and is routed to the matching output layer name setting. Parameter ``head:``: NNArchive head to set @note A head carries no model input metadata, so the input size keeps its current value; configure it with setInputSize() when it is not set yet.
method
setOutputLayerConf(self, confOutputLayerName: str)Sets the name of the output layer containing the confidence predictions. When left empty, the name is auto-detected from the incoming NNData as the single layer name starting with "conf". Parameter ``confOutputLayerName``: Output layer name for the conf tensor
method
setOutputLayerIou(self, iouOutputLayerName: str)Sets the name of the output layer containing the IoU predictions. When left empty, the name is auto-detected from the incoming NNData as the single layer name starting with "iou". Parameter ``iouOutputLayerName``: Output layer name for the IoU tensor
method
setOutputLayerLoc(self, locOutputLayerName: str)Sets the name of the output layer containing the location predictions. When left empty, the name is auto-detected from the incoming NNData as the single layer name starting with "loc". Parameter ``locOutputLayerName``: Output layer name for the loc tensor
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device. By default, the node runs on the device.
property
initialConfig
Configuration used when the parser starts.
property
input
Input NN results with YuNet detection data to parse.
property
inputConfig
Runtime parser configuration. In synchronized mode one configuration is consumed per input frame; otherwise all queued configurations are drained and the newest valid one is retained.
property
out
Outputs ImgDetections message with the bounding boxes, labels, confidence scores and keypoints of the detected faces.
class
depthai.beta.Classifications(depthai.Buffer, depthai.Transformable)
method
method
method
getTopClass(self) -> str: strReturns the most probable class name. Assumes the classes are sorted in descending order of score, which holds for parser-emitted messages. Throws: std::runtime_error if the message contains no classes.
method
getTopScore(self) -> float: floatReturns the score of the most probable class. Assumes the scores are sorted in descending order, which holds for parser- emitted messages. Throws: std::runtime_error if the message contains no scores.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with up to the top five classes and their scores, or std::monostate when no transformation metadata is available to derive the annotation layout from.
method
transformTo(self, target: depthai.ImgTransformation) -> Classifications: ClassificationsReturns a new Classifications message with the transformation metadata replaced by the target transformation. Classification results carry no spatial data, so classes and scores are unchanged. Parameter ``target``: Target image transformation.
property
classes
Class names, index-aligned with the scores vector.
method
property
scores
Classification scores, index-aligned with the classes vector.
method
class
depthai.beta.Clusters(depthai.Buffer, depthai.Transformable)
method
method
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with each cluster drawn as points in a distinct color sampled from a rainbow colormap. Throws: std::runtime_error if the message contains more than 255 clusters.
method
transformTo(self, target: depthai.ImgTransformation) -> Clusters: ClustersReturns a new Clusters message with the cluster point image coordinates remapped from this message's transformation into the target transformation. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
property
clusters
Detected clusters of points.
method
class
depthai.beta.Keypoints(depthai.Buffer, depthai.Transformable)
method
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns the skeleton edges as pairs of keypoint indices.
method
getKeypoints(self) -> list[depthai.Keypoint]: list[depthai.Keypoint]Returns the keypoints.
method
getPoints2f(self) -> depthai.VectorPoint2f: depthai.VectorPoint2fReturns the 2D image coordinates of the keypoints, dropping the z axis values.
method
getPoints3f(self) -> list[depthai.Point3f]: list[depthai.Point3f]Returns the 3D image coordinates of the keypoints. 2D keypoints carry a z coordinate of 0.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with the keypoints drawn as points and the skeleton edges drawn as lines.
method
setEdges(self, edges: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]])Sets the skeleton edges. Parameter ``edges``: Pairs of keypoint indices to connect. Throws: std::invalid_argument if an edge index is out of range or an edge is a self- loop.
method
method
transformTo(self, target: depthai.ImgTransformation) -> Keypoints: KeypointsReturns a new Keypoints message with the keypoint image coordinates remapped from this message's transformation into the target transformation. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
property
keypointsList
Native keypoints list carrying the keypoints and the skeleton edges connecting them.
method
class
depthai.beta.Line
method
property
confidence
Confidence of the line, in [0, 1].
method
property
endPoint
End point of the line with x and y coordinate.
method
property
startPoint
Start point of the line with x and y coordinate.
method
class
depthai.beta.Lines(depthai.Buffer, depthai.Transformable)
method
method
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with each line drawn as a two-point line strip.
method
transformTo(self, target: depthai.ImgTransformation) -> Lines: LinesReturns a new Lines message with the line point image coordinates remapped from this message's transformation into the target transformation. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
property
lines
Detected lines.
method
class
depthai.beta.Map2D(depthai.Buffer, depthai.Transformable)
method
method
method
getHeight(self) -> int: intReturns the height of the 2D map.
method
getMap(self) -> numpy.ndarray[numpy.float32]: numpy.ndarray[numpy.float32]Returns a copy of the 2D map values in row-major order. If no map is set, returns an empty vector.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgFrame visualization of the map colored with a plasma colormap. When any map value is below 1 the values are scaled by 255, so maps normalized to [0, 1] use the full colormap range. The values are then truncated to 8-bit indices into the colormap and emitted as an interleaved BGR frame.
method
getWidth(self) -> int: intReturns the width of the 2D map.
method
setMap(self, map: numpy.ndarray)Sets the 2D map. The values are copied into the buffer payload. Parameter ``map``: Map values in row-major order, of size width * height. Parameter ``width``: Map width in values per row. Parameter ``height``: Map height in rows. Throws: std::runtime_error if the map size does not equal width * height.
method
transformTo(self, target: depthai.ImgTransformation) -> Map2D: Map2DReturns a new Map2D message with the transformation metadata replaced by the target transformation. The map values and dimensions are unchanged. Parameter ``target``: Target image transformation. Throws: std::runtime_error if this message carries no transformation metadata.
class
depthai.beta.Prediction
class
depthai.beta.Predictions(depthai.Buffer, depthai.Transformable)
method
method
method
getFirstPrediction(self) -> float: floatReturns the first predicted value. Useful for single-prediction models. Throws: std::runtime_error if the message contains no predictions.
method
getVisualizationMessage(self) -> depthai.ImgAnnotations|depthai.ImgFrame|None: depthai.ImgAnnotations|depthai.ImgFrame|NoneReturns an ImgAnnotations visualization with each predicted value drawn as text, one below the other, or std::monostate when no transformation metadata is available to derive the annotation layout from.
method
transformTo(self, target: depthai.ImgTransformation) -> Predictions: PredictionsReturns a new Predictions message with the transformation metadata replaced by the target transformation. Regression results carry no spatial data, so the predictions are unchanged. Parameter ``target``: Target image transformation.
property
predictions
Predicted values, in the order the model emitted them.
method
class
depthai.beta.MultiDeviceCalibrationControl(depthai.Buffer)
class
static method
static method
static method
MultiDeviceCalibrationControl.stop() -> MultiDeviceCalibrationControl: MultiDeviceCalibrationControlmethod
class
depthai.beta.MultiDeviceCalibrationControl.Commands.Start
method
class
depthai.beta.MultiDeviceCalibrationControl.Commands.Stop
method
class
depthai.beta.MultiDeviceCalibrationControl.Commands.Reset
method
class
depthai.beta.MultiDeviceCalibrationResult(depthai.Buffer)
variable
variable
variable
variable
variable
method
method
getHandler(self) -> ...|None: ...|NoneBuild a MultiDeviceCalibrationHandler from the calibration graph. Returns: The handler when the result carries a graph, or std::nullopt when it does not.
class
depthai.beta.ClassificationSequenceParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConcatenateClasses(self) -> bool: boolGets whether decoded class labels are concatenated. Returns: Whether class labels are concatenated
method
getIgnoredIndexes(self) -> list[int]: list[int]Gets the class indexes ignored while decoding the sequence. Returns: Ignored class indexes
method
getRemoveDuplicates(self) -> bool: boolGets whether consecutive duplicate classes are removed. Returns: Whether duplicate classes are removed
method
setConcatenateClasses(self, enabled: bool)Sets whether decoded class labels are concatenated. Parameter ``concatenateClasses``: Whether class labels are concatenated
method
setIgnoredIndexes(self, indexes: list[int])Sets the class indexes ignored while decoding the sequence. Parameter ``indexes``: Nonnegative class indexes to ignore
method
setRemoveDuplicates(self, enabled: bool)Sets whether consecutive duplicate classes are removed. Parameter ``removeDuplicates``: Whether duplicate classes are removed
method
validate(self) -> bool: boolValidates this configuration. Returns: True if all ignored indexes are nonnegative
class
depthai.beta.FastSAMParserConfig(depthai.Buffer)
class
Prompt
Prompt mode used to select emitted segmentation masks. Members: EVERYTHING : Keep all detected instances. POINT : Select instances using a point and point label. BOUNDING_BOX : Select an instance using a bounding box.
variable
variable
variable
variable
variable
variable
variable
method
method
method
getBoundingBox(self) -> typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|None: typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)]|NoneGets the prompt bounding box. Returns: Optional bounding box as {x1, y1, x2, y2}method
getConfidenceThreshold(self) -> float: floatGets the minimum detection confidence. Returns: Confidence threshold
method
getIouThreshold(self) -> float: floatGets the intersection-over-union threshold. Returns: IoU threshold
method
getMaskConfidence(self) -> float: floatGets the threshold used to binarize instance masks. Returns: Mask confidence threshold
method
getPointLabel(self) -> int|None: int|NoneGets the prompt point label. Returns: Optional point label
method
getPoints(self) -> tuple[int, int]|None: tuple[int, int]|NoneGets the prompt point. Returns: Optional prompt point as (x, y)
method
getPrompt(self) -> FastSAMParserConfig.Prompt: FastSAMParserConfig.PromptGets the prompt mode. Returns: Prompt mode
method
setBoundingBox(self, boundingBox: typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(4)])Sets the prompt bounding box. Parameter ``boundingBox``: Bounding box as {x1, y1, x2, y2}, with ordered coordinates and positive x2/y2method
setConfidenceThreshold(self, threshold: float)Sets the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the range [0, 1]
method
setIouThreshold(self, threshold: float)Sets the intersection-over-union threshold used by non-maximum suppression. Parameter ``threshold``: IoU threshold in the range [0, 1]
method
setMaskConfidence(self, threshold: float)Sets the threshold used to binarize instance masks. Parameter ``threshold``: Mask confidence threshold in the range [0, 1]
method
setPointLabel(self, label: int)Sets the prompt point label. Parameter ``label``: Point label, 0 for negative or 1 for positive
method
setPoints(self, x: int, y: int)Sets the prompt point. Parameter ``x``: Point x coordinate Parameter ``y``: Point y coordinate
method
setPrompt(self, prompt: FastSAMParserConfig.Prompt)Sets the prompt mode. Required point or bounding-box data must already be present. Parameter ``prompt``: Prompt mode
method
validate(self) -> bool: boolValidates thresholds, prompt payload, point label, and bounding-box coordinates. Returns: True if the complete configuration is valid
class
depthai.beta.FastSAMParserConfig.Prompt
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.beta.HRNetParserConfig(depthai.Buffer)
variable
method
method
method
getScoreThreshold(self) -> float: floatGets the minimum keypoint score. Returns: Score threshold
method
setScoreThreshold(self, threshold: float)Sets the minimum keypoint score. Parameter ``threshold``: Score threshold in the range [0, 1]
method
validate(self) -> bool: boolValidates this configuration. Returns: True if the score threshold is in the range [0, 1]
class
depthai.beta.MLSDParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getDistanceThreshold(self) -> float: floatGets the distance threshold used while decoding line segments. Returns: Distance threshold
method
getScoreThreshold(self) -> float: floatGets the minimum candidate score. Returns: Score threshold
method
getTopK(self) -> int: intGets the number of highest-scoring candidates retained for decoding. Returns: Candidate count
method
setDistanceThreshold(self, threshold: float)Sets the distance threshold used while decoding line segments. Parameter ``threshold``: Nonnegative distance threshold
method
setScoreThreshold(self, threshold: float)Sets the minimum candidate score. Parameter ``threshold``: Score threshold in the range [0, 1]
method
setTopK(self, topK: int)Sets the number of highest-scoring candidates retained for decoding. Parameter ``topK``: Positive candidate count
method
validate(self) -> bool: boolValidates this configuration. Returns: True if topK is positive, the score threshold is in [0, 1], and the distance threshold is nonnegative
class
depthai.beta.MPPalmDetectionParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGets the minimum detection confidence. Returns: Confidence threshold
method
getIouThreshold(self) -> float: floatGets the intersection-over-union threshold. Returns: IoU threshold
method
getMaxDetections(self) -> int: intGets the maximum number of emitted detections. Returns: Maximum detection count
method
setConfidenceThreshold(self, threshold: float)Sets the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the range [0, 1]
method
setIouThreshold(self, threshold: float)Sets the intersection-over-union threshold used by non-maximum suppression. Parameter ``threshold``: IoU threshold in the range [0, 1]
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of emitted detections. Parameter ``maxDetections``: Positive maximum detection count
method
validate(self) -> bool: boolValidates this configuration. Returns: True if both thresholds are in [0, 1] and maxDetections is positive
class
depthai.beta.MapOutputParserConfig(depthai.Buffer)
variable
method
method
method
getMinMaxScaling(self) -> bool: boolGets whether output values are scaled using their minimum and maximum. Returns: Whether min-max scaling is enabled
method
setMinMaxScaling(self, enabled: bool)Sets whether output values are scaled using their minimum and maximum. Parameter ``enabled``: Whether min-max scaling is enabled
method
validate(self) -> bool: boolValidates this configuration. Returns: True because every value of the boolean option is valid
class
depthai.beta.PPTextDetectionParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGets the minimum detection confidence. Returns: Confidence threshold
method
getMaskThreshold(self) -> float: floatGets the threshold applied to the text probability mask. Returns: Mask threshold
method
getMaxDetections(self) -> int: intGets the maximum number of emitted detections. Returns: Maximum detection count
method
setConfidenceThreshold(self, threshold: float)Sets the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the range [0, 1]
method
setMaskThreshold(self, threshold: float)Sets the threshold applied to the text probability mask. Parameter ``threshold``: Mask threshold in the range [0, 1]
method
setMaxDetections(self, maxDetections: int)Sets the maximum number of emitted detections. Parameter ``maxDetections``: Positive maximum detection count
method
validate(self) -> bool: boolValidates this configuration. Returns: True if both thresholds are in [0, 1] and maxDetections is positive
class
depthai.beta.RFDETRParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum detection confidence. Returns: Confidence threshold in the inclusive range [0, 1]
method
getMaskConfidence(self) -> float: floatGet the minimum per-pixel confidence used when creating instance masks. Returns: Mask confidence threshold in the inclusive range [0, 1]
method
getMaxDetections(self) -> int: intGet the maximum number of detections to retain. Returns: Maximum detection count
method
setConfidenceThreshold(self, threshold: float)Set the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the inclusive range [0, 1]
method
setMaskConfidence(self, threshold: float)Set the minimum per-pixel confidence used when creating instance masks. Parameter ``threshold``: Mask confidence threshold in the inclusive range [0, 1]
method
setMaxDetections(self, maxDetections: int)Set the maximum number of detections to retain. Parameter ``maxDetections``: Maximum detection count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when both confidence thresholds are in the inclusive range [0, 1] and maxDetections is positive
class
depthai.beta.SCRFDParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum detection confidence. Returns: Confidence threshold in the inclusive range [0, 1]
method
getIouThreshold(self) -> float: floatGet the non-maximum suppression intersection-over-union threshold. Returns: Intersection-over-union threshold in the inclusive range [0, 1]
method
getMaxDetections(self) -> int: intGet the maximum number of post-suppression detections to retain. Returns: Maximum post-suppression detection count
method
setConfidenceThreshold(self, threshold: float)Set the minimum detection confidence. Parameter ``threshold``: Confidence threshold in the inclusive range [0, 1]
method
setIouThreshold(self, threshold: float)Set the non-maximum suppression intersection-over-union threshold. Parameter ``threshold``: Intersection-over-union threshold in the inclusive range [0, 1]
method
setMaxDetections(self, maxDetections: int)Set the maximum number of post-suppression detections to retain. Parameter ``maxDetections``: Maximum detection count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when both thresholds are in the inclusive range [0, 1] and maxDetections is positive
class
depthai.beta.SuperAnimalParserConfig(depthai.Buffer)
variable
method
method
method
getScoreThreshold(self) -> float: floatGet the minimum keypoint score. Returns: Score threshold in the inclusive range [0, 1]
method
setScoreThreshold(self, threshold: float)Set the minimum keypoint score. Parameter ``threshold``: Score threshold in the inclusive range [0, 1]
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when scoreThreshold is in the inclusive range [0, 1]
class
depthai.beta.XFeatMonoParserConfig(depthai.Buffer)
variable
method
method
method
getMaxKeypoints(self) -> int: intGet the maximum number of keypoints to retain per frame. Returns: Maximum keypoint count
method
setMaxKeypoints(self, maxKeypoints: int)Set the maximum number of keypoints to retain per frame. Parameter ``maxKeypoints``: Maximum keypoint count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when maxKeypoints is positive
class
depthai.beta.XFeatStereoParserConfig(depthai.Buffer)
variable
method
method
method
getMaxKeypoints(self) -> int: intGet the maximum number of keypoints to retain from each frame in the stereo pair. Returns: Maximum keypoint count applied to each frame
method
setMaxKeypoints(self, maxKeypoints: int)Set the maximum number of keypoints to retain from each frame in the stereo pair. Parameter ``maxKeypoints``: Maximum keypoint count, which must be positive
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when maxKeypoints is positive
class
depthai.beta.YuNetParserConfig(depthai.Buffer)
variable
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum face detection confidence. Returns: Confidence threshold in the inclusive range [0, 1]
method
getIouThreshold(self) -> float: floatGet the non-maximum suppression intersection-over-union threshold. Returns: Intersection-over-union threshold in the inclusive range [0, 1]
method
getMaxDetections(self) -> int: intGet the maximum number of detections to retain. Returns: Maximum detection count; a value less than or equal to zero means unlimited
method
setConfidenceThreshold(self, threshold: float)Set the minimum face detection confidence. Parameter ``threshold``: Confidence threshold in the inclusive range [0, 1]
method
setIouThreshold(self, threshold: float)Set the non-maximum suppression intersection-over-union threshold. Parameter ``threshold``: Intersection-over-union threshold in the inclusive range [0, 1]
method
setMaxDetections(self, maxDetections: int)Set the maximum number of detections to retain. Parameter ``maxDetections``: Maximum detection count; a value less than or equal to zero means unlimited
method
validate(self) -> bool: boolCheck whether all configuration values are valid. Returns: True when confidenceThreshold and iouThreshold are in the inclusive range [0, 1]; maxDetections may have any integer value
class
depthai.beta.ClassificationSequenceParserProperties
variable
variable
variable
variable
variable
class
depthai.beta.FastSAMParserProperties
variable
variable
variable
variable
variable
class
depthai.beta.HRNetParserProperties
class
depthai.beta.ImgDetectionsFilterConfig(depthai.Buffer)
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
class
depthai.beta.ImgDetectionsFilterProperties
class
depthai.beta.MapOutputParserProperties
class
depthai.beta.MLSDParserProperties
variable
variable
variable
variable
class
depthai.beta.MPPalmDetectionParserProperties
variable
variable
variable
variable
class
depthai.beta.PPTextDetectionParserProperties
class
depthai.beta.RFDETRParserProperties
variable
variable
variable
variable
class
depthai.beta.SCRFDParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.SuperAnimalParserProperties
class
depthai.beta.StitchingProperties
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
class
depthai.beta.XFeatMonoParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.XFeatStereoParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.YuNetParserProperties
variable
variable
variable
variable
variable
variable
class
depthai.beta.MultiDeviceCalibrationHandler
static method
MultiDeviceCalibrationHandler.fromJson(calibrationDataJson: json) -> MultiDeviceCalibrationHandler: MultiDeviceCalibrationHandlerConstruct and validate a handler from its JSON representation.
method
method
getDeviceSocket(self, deviceId: str) -> depthai.CameraBoardSocket|None: depthai.CameraBoardSocket|NoneGet the local calibration-origin socket used by a device in the graph. Returns: The socket when the device participates in the graph, or std::nullopt when it does not.
method
getExtrinsicsToOrigin(self, deviceId: str, localOriginSocket: depthai.CameraBoardSocket) -> depthai.Extrinsics|None: depthai.Extrinsics|NoneGet the transform from a device's local calibration origin to its connected component's automatically selected origin. Returns: A meter-normalized transform when the device participates in the graph, or std::nullopt when it does not. Throws: std::invalid_argument when the graph is invalid or the supplied local socket does not match the graph.
method
getGraph(self) -> list[depthai.MultiDeviceExtrinsics]: list[depthai.MultiDeviceExtrinsics]Return the validated, meter-normalized calibration edges.
method
toJson(self) -> json: jsonReturn the handler's JSON representation with translations in centimeters.
method
toJsonFile(self, destPath: os.PathLike) -> bool: boolWrite the handler's centimeter-normalized JSON representation to a file.
package
depthai.filters
module
params
Parameters for filters
module
depthai.filters.params
class
MedianFilter
Members: MEDIAN_OFF KERNEL_3x3 KERNEL_5x5 KERNEL_7x7
class
class
TemporalFilter
Temporal filtering with optional persistence.
class
ThresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
class
class
depthai.filters.params.MedianFilter
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.filters.params.SpatialFilter
method
method
property
alpha
The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the amount of smoothing.
method
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.
method
property
enable
Whether to enable or disable the filter.
method
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.
method
property
numIterations
Number of iterations over the image in both horizontal and vertical direction.
method
class
depthai.filters.params.TemporalFilter
class
PersistencyMode
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 :
method
method
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.
method
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.
method
property
enable
Whether to enable or disable the filter.
method
property
persistencyMode
Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
method
class
depthai.filters.params.TemporalFilter.PersistencyMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.filters.params.SpeckleFilter
method
method
property
differenceThreshold
Maximum difference between neighbor disparity pixels to put them into the same blob. Units in disparity integer levels.
method
property
enable
Whether to enable or disable the filter.
method
property
speckleRange
Speckle search range.
method
module
depthai.modelzoo
function
getDefaultCachePath() -> os.PathLike: os.PathLikeGet the default cache path (where models are cached)
function
getDefaultModelsPath() -> os.PathLike: os.PathLikeGet the default models path (where yaml files are stored)
function
getDownloadEndpoint() -> str: strGet the download endpoint (for model querying)
function
getHealthEndpoint() -> str: strGet the health endpoint (for internet check)
function
setDefaultCachePath(path: os.PathLike)Set the default cache path (where models are cached) Parameter ``path``:
function
setDefaultModelsPath(path: os.PathLike)Set the default models path (where yaml files are stored) Parameter ``path``:
function
setDownloadEndpoint(endpoint: str)Set the download endpoint (for model querying) Parameter ``endpoint``:
function
setHealthEndpoint(endpoint: str)Set the health endpoint (for internet check) Parameter ``endpoint``:
package
depthai.nn_archive
module
module
depthai.nn_archive.v1
class
Config
The main class of the multi/single-stage model config scheme (multi- stage models consists of interconnected single-stage models). @type config_version: str @ivar config_version: String representing config schema version in format 'x.y' where x is major version and y is minor version @type model: Model @ivar model: A Model object representing the neural network used in the archive.
class
Model
A Model object representing the neural network used in the archive. Class defining a single-stage model config scheme. @type metadata: Metadata @ivar metadata: Metadata object defining the model metadata. @type inputs: list @ivar inputs: List of Input objects defining the model inputs. @type outputs: list @ivar outputs: List of Output objects defining the model outputs. @type heads: list @ivar heads: List of Head objects defining the model heads. If not defined, we assume a raw output.
class
Head
Represents head of a model. @type name: str | None @ivar name: Optional name of the head. @type parser: str @ivar parser: Name of the parser responsible for processing the models output. @type outputs: List[str] | None @ivar outputs: Specify which outputs are fed into the parser. If None, all outputs are fed. @type metadata: C{HeadMetadata} | C{HeadObjectDetectionMetadata} | C{HeadClassificationMetadata} | C{HeadObjectDetectionSSDMetadata} | C{HeadSegmentationMetadata} | C{HeadYOLOMetadata} @ivar metadata: Metadata of the parser.class
DataType
Data type of the input data (e.g., 'float32'). Represents all existing data types used in i/o streams of the model. Precision of the model weights. Data type of the output data (e.g., 'float32'). Members: BOOLEAN FLOAT16 FLOAT32 FLOAT64 INT4 INT8 INT16 INT32 INT64 UINT4 UINT8 UINT16 UINT32 UINT64 STRING
class
InputType
Members: IMAGE RAW
class
Input
Represents input stream of a model. @type name: str @ivar name: Name of the input layer. @type dtype: DataType @ivar dtype: Data type of the input data (e.g., 'float32'). @type input_type: InputType @ivar input_type: Type of input data (e.g., 'image'). @type shape: list @ivar shape: Shape of the input data as a list of integers (e.g. [H,W], [H,W,C], [N,H,W,C], ...). @type layout: str @ivar layout: Lettercode interpretation of the input data dimensions (e.g., 'NCHW'). @type preprocessing: PreprocessingBlock @ivar preprocessing: Preprocessing steps applied to the input data.
class
Metadata
Metadata of the parser. Metadata for the object detection head. @type classes: list @ivar classes: Names of object classes detected by the model. @type n_classes: int @ivar n_classes: Number of object classes detected by the model. @type iou_threshold: float @ivar iou_threshold: Non-max supression threshold limiting boxes intersection. @type conf_threshold: float @ivar conf_threshold: Confidence score threshold above which a detected object is considered valid. @type max_det: int @ivar max_det: Maximum detections per image. @type anchors: list @ivar anchors: Predefined bounding boxes of different sizes and aspect ratios. The innermost lists are length 2 tuples of box sizes. The middle lists are anchors for each output. The outmost lists go from smallest to largest output. Metadata for the classification head. @type classes: list @ivar classes: Names of object classes classified by the model. @type n_classes: int @ivar n_classes: Number of object classes classified by the model. @type is_softmax: bool @ivar is_softmax: True, if output is already softmaxed Metadata for the SSD object detection head. @type boxes_outputs: str @ivar boxes_outputs: Output name corresponding to predicted bounding box coordinates. @type scores_outputs: str @ivar scores_outputs: Output name corresponding to predicted bounding box confidence scores. Metadata for the segmentation head. @type classes: list @ivar classes: Names of object classes segmented by the model. @type n_classes: int @ivar n_classes: Number of object classes segmented by the model. @type is_softmax: bool @ivar is_softmax: True, if output is already softmaxed @type background_class: bool | None @ivar background_class: True, if class index 0 is treated as background. Metadata for the YOLO head. @type yolo_outputs: list @ivar yolo_outputs: A list of output names for each of the different YOLO grid sizes. @type mask_outputs: list | None @ivar mask_outputs: A list of output names for each mask output. @type protos_outputs: str | None @ivar protos_outputs: Output name for the protos. @type keypoints_outputs: list | None @ivar keypoints_outputs: A list of output names for the keypoints. @type angles_outputs: list | None @ivar angles_outputs: A list of output names for the angles. @type subtype: str @ivar subtype: YOLO family decoding subtype (e.g. yolov5, yolov6, yolov7 etc.) @type n_prototypes: int | None @ivar n_prototypes: Number of prototypes per bbox in YOLO instance segmnetation. @type n_keypoints: int | None @ivar n_keypoints: Number of keypoints per bbox in YOLO keypoint detection. @type is_softmax: bool | None @ivar is_softmax: True, if output is already softmaxed in YOLO instance segmentation @type strides: list | None @ivar strides: Strides for each YOLO output. Metadata for the basic head. It allows you to specify additional fields. @type postprocessor_path: str | None @ivar postprocessor_path: Path to the postprocessor.
class
MetadataClass
Metadata object defining the model metadata. Represents metadata of a model. @type name: str @ivar name: Name of the model. @type path: str @ivar path: Relative path to the model executable.
class
Output
Represents output stream of a model. @type name: str @ivar name: Name of the output layer. @type dtype: DataType @ivar dtype: Data type of the output data (e.g., 'float32').
class
PreprocessingBlock
Preprocessing steps applied to the input data. Represents preprocessing operations applied to the input data. @type mean: list | None @ivar mean: Mean values in channel order. Order depends on the order in which the model was trained on. @type scale: list | None @ivar scale: Standardization values in channel order. Order depends on the order in which the model was trained on. @type reverse_channels: bool | None @ivar reverse_channels: If True input to the model is RGB else BGR. @type interleaved_to_planar: bool | None @ivar interleaved_to_planar: If True input to the model is interleaved (NHWC) else planar (NCHW). @type dai_type: str | None @ivar dai_type: DepthAI input type which is read by DepthAI to automatically setup the pipeline.
class
depthai.nn_archive.v1.Config
method
property
configVersion
String representing config schema version in format 'x.y' where x is major version and y is minor version.
method
property
model
A Model object representing the neural network used in the archive.
method
class
depthai.nn_archive.v1.Model
method
property
heads
List of Head objects defining the model heads. If not defined, we assume a raw output.
method
property
inputs
List of Input objects defining the model inputs.
method
property
metadata
Metadata object defining the model metadata.
method
property
outputs
List of Output objects defining the model outputs.
method
class
depthai.nn_archive.v1.Head
class
depthai.nn_archive.v1.DataType
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.nn_archive.v1.InputType
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.nn_archive.v1.Input
method
property
dtype
Data type of the input data (e.g., 'float32').
method
property
inputType
Type of input data (e.g., 'image').
method
property
layout
Lettercode interpretation of the input data dimensions (e.g., 'NCHW')
method
property
name
Name of the input layer.
method
property
preprocessing
Preprocessing steps applied to the input data.
method
property
shape
Shape of the input data as a list of integers (e.g. [H,W], [H,W,C], [N,H,W,C], ...).
method
class
depthai.nn_archive.v1.Metadata
method
property
anchors
Predefined bounding boxes of different sizes and aspect ratios. The innermost lists are length 2 tuples of box sizes. The middle lists are anchors for each output. The outmost lists go from smallest to largest output.
method
property
anglesOutputs
A list of output names for the angles.
method
property
backgroundClass
True, if class index 0 is treated as background.
method
property
boxesOutputs
Output name corresponding to predicted bounding box coordinates.
method
property
classes
Names of object classes recognized by the model.
method
property
confThreshold
Confidence score threshold above which a detected object is considered valid.
method
property
extraParams
Additional parameters
method
property
iouThreshold
Non-max supression threshold limiting boxes intersection.
method
property
isSoftmax
True, if output is already softmaxed. True, if output is already softmaxed in YOLO instance segmentation.
method
property
keypointsOutputs
A list of output names for the keypoints.
method
property
maskOutputs
A list of output names for each mask output.
method
property
maxDet
Maximum detections per image.
method
property
nClasses
Number of object classes recognized by the model.
method
property
nKeypoints
Number of keypoints per bbox in YOLO keypoint detection.
method
property
nPrototypes
Number of prototypes per bbox in YOLO instance segmnetation.
method
property
postprocessorPath
Path to the postprocessor.
method
property
protosOutputs
Output name for the protos.
method
property
scoresOutputs
Output name corresponding to predicted bounding box confidence scores.
method
property
strides
Strides for each YOLO output.
method
property
subtype
YOLO family decoding subtype (e.g. yolov5, yolov6, yolov7 etc.).
method
property
yoloOutputs
A list of output names for each of the different YOLO grid sizes.
method
class
depthai.nn_archive.v1.Output
class
depthai.nn_archive.v1.PreprocessingBlock
method
property
daiType
DepthAI input type which is read by DepthAI to automatically setup the pipeline.
method
property
interleavedToPlanar
If True input to the model is interleaved (NHWC) else planar (NCHW).
method
property
mean
Mean values in channel order. Order depends on the order in which the model was trained on.
method
property
reverseChannels
If True input to the model is RGB else BGR.
method
property
scale
Standardization values in channel order. Order depends on the order in which the model was trained on.
method
package
depthai.node
module
class
class
class
ColorCamera
ColorCamera node. For use with color sensors.
class
class
MonoCamera
MonoCamera node. For use with grayscale sensors.
class
StereoDepth
StereoDepth node. Compute stereo disparity and depth from left-right image pair.
class
NeuralNetwork
NeuralNetwork node. Runs a neural inference on input data.
class
VideoEncoder
VideoEncoder node. Encodes frames into MJPEG, H264 or H265.
class
ImageManip
ImageManip node. Capability to crop, resize, warp, ... incoming image frames
class
Warp
Warp node. Capability to crop, resize, warp, ... incoming image frames
class
SPIOut
SPIOut node. Sends messages over SPI.
class
SPIIn
SPIIn node. Receives messages over SPI.
class
DetectionNetwork
DetectionNetwork, base for different network specializations
class
SystemLogger
SystemLogger node. Send system information periodically.
class
class
SpatialLocationCalculator
SpatialLocationCalculator node. Calculates the spatial locations of detected objects based on the input depth map. Spatial location calculations can be additionally refined by using a segmentation mask. If keypoints are provided, the spatial location is calculated around each keypoint.
class
SpatialDetectionNetwork
SpatialDetectionNetwork node. Runs a neural inference on input image and calculates spatial location data.
class
ObjectTracker
ObjectTracker node. Performs object tracking using Kalman filter and hungarian algorithm.
class
IMU
IMU node for BNO08X.
class
EdgeDetector
EdgeDetector node. Performs edge detection using 3x3 Sobel filter
class
FeatureTracker
FeatureTracker node. Performs feature tracking and reidentification using motion estimation between 2 consecutive frames.
class
AprilTag
AprilTag node.
class
DetectionParser
DetectionParser node. Parses detection results from Mobilenet-SSD or YOLO neural networks. @note If multiple detection heads are present in the NNArchive, only one type is supported (either YOLO or Mobilenet-SSD) and the last one will be used.
class
SegmentationParser
SegmentationParser node. Parses raw segmentation output from segmentation neural networks into a dai::SegmentationMask datatype. The parser supports two output model types: 1. Single-channel output where the model argmaxes the class probabilities internally and outputs a single channel mask with class indices. 2. Multi-channel output where each channel corresponds to the probability map for a specific class. The parser will perform argmax across channels to generate the final mask. The parser can be configured to treat the first class (index 0) as the background class, which will be ignored in the final segmentation mask. .. warning:: Only OAK4 supports running SegmentationParser on device. On other platforms, the node will automatically switch to host execution.
class
UVC
UVC (USB Video Class) node
class
Thermal
Thermal node.
class
ToFBase
ToFBase node. Performs feature tracking and reidentification using motion estimation between 2 consecutive frames.
class
class
PointCloud
PointCloud node. Computes point cloud from depth frames.
class
Sync
Sync node. Performs syncing between image frames
class
class
class
class
RecordVideo
RecordVideo node, used to record a video source stream to a file
class
RecordMetadataOnly
RecordMetadataOnly node, used to record a source stream to a file
class
class
ToFDepthConfidenceFilter
Node for depth confidence filter, designed to be used with the `ToF` node.
class
ReplayVideo
Replay node, used to replay a file to a source node
class
ReplayMetadataOnly
Replay node, used to replay a file to a source node
class
ImageAlign
ImageAlign node. Calculates spatial location data on a set of ROIs on depth map.
class
Align
Align node. Aligns ImgFrame and Transformable messages using ImgTransformation metadata.
class
RGBD
RGBD node. Combines depth and color frames into a single point cloud.
class
class
NeuralDepth
NeuralDepth node. Compute depth from left-right image pair using neural network.
class
GPUStereo
GPU-accelerated stereo depth node for RVC4. Computes disparity and depth maps from a synchronized stereo camera pair using OpenCL on the Adreno GPU. Supports both rectified and unrectified inputs (controlled via setRectification).
class
Depth
Depth node. Unified depth output from StereoDepth, NeuralDepth, NeuralAssistedStereo, ToF, or GPUStereo. With Algorithm::AUTO, the backend is chosen from device capabilities, target FPS, and stereo resolution. On RVC4 this prefers NeuralDepth when available; on other platforms it uses ToF when a ToF sensor is connected, otherwise StereoDepth. Use build() to pin algorithm, FPS, or resolution before the first depth() / confidence() access. Use setAlignTo() to align depth to another camera output.
class
NeuralAssistedStereo
NeuralAssistedStereo node. Combines Neural Depth with VPP and traditional Stereo Depth. This composite node internally creates and connects: - Rectification node (full resolution) - NeuralDepth node (low resolution depth estimation) - VPP node (applies virtual projection pattern) - StereoDepth node (final depth computation on VPP-enhanced images) Pipeline structure: Left/Right Cameras → Rectification → [Full res to VPP] ↓ NeuralDepth (low res) → [disparity + confidence to VPP] ↓ VPP (combines neural depth with full res images) ↓ StereoDepth → Final Depth Output
class
Vpp
Vpp node. Apply Virtual Projection Pattern algorithm to stereo images based on disparity or depth.
class
Gate
Gate Node. This node acts as a valve for data pipelines. It controls the flow of messages from the 'input' to the 'output' based on the state configured via 'inputControl'. It can be configured to stay open indefinitely, stay closed, or open for a specific number of messages.
class
BasaltVIO
Basalt Visual Inertial Odometry node. Performs VIO on stereo images and IMU data.
class
RTABMapVIO
RTABMap Visual Inertial Odometry node. Performs VIO on rectified frame, depth frame and IMU data.
class
RTABMapSLAM
RTABMap SLAM node. Performs SLAM on given odometry pose, rectified frame and depth frame.
class
class
module
depthai.node.internal
class
XLinkInBridge
XLink bridge structure for host-to-device communication Contains pointers to XLinkOutHost and XLinkIn nodes
class
XLinkOutBridge
XLink bridge structure for device-to-host communication Contains pointers to XLinkOut and XLinkInHost nodes
class
class
class
class
class
depthai.node.internal.XLinkInBridge
class
depthai.node.internal.XLinkOutBridge
class
depthai.node.internal.XLinkIn(depthai.DeviceNode)
method
getMaxDataSize(self) -> int: intGet maximum messages size in bytes
method
getNumFrames(self) -> int: intGet number of frames in pool
method
getStreamName(self) -> str: strGet stream name
method
setMaxDataSize(self, maxDataSize: int)Set maximum message size it can receive Parameter ``maxDataSize``: Maximum size in bytes
method
setNumFrames(self, numFrames: int)Set number of frames in pool for sending messages forward Parameter ``numFrames``: Maximum number of frames in pool
method
setStreamName(self, name: str)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
property
class
depthai.node.internal.XLinkOut(depthai.DeviceNode)
method
method
getFpsLimit(self) -> float: floatGet rate limit in messages per second
method
getMetadataOnly(self) -> bool: boolGet whether to transfer only messages attributes and not buffer data
method
method
getStreamName(self) -> str: strGet stream name
method
method
setFpsLimit(self, fps: float)Specifies a message sending limit. It's approximated from specified rate. Parameter ``fps``: Approximate rate limit in messages per second
method
setMetadataOnly(self, metadataOnly: bool)Specify whether to transfer only messages attributes and not buffer data
method
method
setStreamName(self, name: str)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
property
class
depthai.node.internal.XLinkInHost(depthai.Node)
class
depthai.node.internal.XLinkOutHost(depthai.Node)
class
depthai.node.BenchmarkOut(depthai.DeviceNode)
method
setFps(self, fps: float)Set FPS at which the node is sending out messages. 0 means as fast as possible
method
setNumMessagesToSend(self, num: int)Sets number of messages to send, by default send messages indefinitely Parameter ``num``: number of messages to send
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
input
Message that will be sent repeatedly
property
out
Send messages out as fast as possible
class
depthai.node.BenchmarkIn(depthai.DeviceNode)
method
logReportsAsWarnings(self, logReportsAsWarnings: bool)Log the reports as warnings
method
measureIndividualLatencies(self, attachLatencies: bool)Attach latencies to the report
method
sendReportEveryNMessages(self, num: int)Specify how many messages to measure for each report
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
input
Receive messages as fast as possible
property
passthrough
Passthrough for input messages (so the node can be placed between other nodes)
property
report
Send a benchmark report when the set number of messages are received
class
depthai.node.ColorCamera(depthai.DeviceNode)
method
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
method
getCamera(self) -> str: strRetrieves which camera to use by name Returns: Name of the camera to use
method
getColorOrder(self) -> depthai.ColorCameraProperties.ColorOrder: depthai.ColorCameraProperties.ColorOrderGet color order of preview output frames. RGB or BGR
method
getFp16(self) -> bool: boolGet fp16 (0..255) data of preview output frames
method
getFps(self) -> float: floatGet rate at which camera should produce frames Returns: Rate in frames per second
method
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation
method
getInterleaved(self) -> bool: boolGet planar or interleaved data of preview output frames
method
getIspHeight(self) -> int: intGet 'isp' output height
method
getIspNumFramesPool(self) -> int: intGet number of frames in isp pool
method
getIspSize(self) -> tuple[int, int]: tuple[int, int]Get 'isp' output resolution as size, after scaling
method
getIspWidth(self) -> int: intGet 'isp' output width
method
getPreviewHeight(self) -> int: intGet preview height
method
getPreviewKeepAspectRatio(self) -> bool: boolSee also: setPreviewKeepAspectRatio Returns: Preview keep aspect ratio option
method
getPreviewNumFramesPool(self) -> int: intGet number of frames in preview pool
method
getPreviewSize(self) -> tuple[int, int]: tuple[int, int]Get preview size as tuple
method
getPreviewWidth(self) -> int: intGet preview width
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool
method
getResolution(self) -> depthai.ColorCameraProperties.SensorResolution: depthai.ColorCameraProperties.SensorResolutionGet sensor resolution
method
getResolutionHeight(self) -> int: intGet sensor resolution height
method
getResolutionSize(self) -> tuple[int, int]: tuple[int, int]Get sensor resolution as size
method
getResolutionWidth(self) -> int: intGet sensor resolution width
method
getSensorCrop(self) -> tuple[float, float]: tuple[float, float]Returns: Sensor top left crop coordinates
method
getSensorCropX(self) -> float: floatGet sensor top left x crop coordinate
method
getSensorCropY(self) -> float: floatGet sensor top left y crop coordinate
method
getStillHeight(self) -> int: intGet still height
method
getStillNumFramesPool(self) -> int: intGet number of frames in still pool
method
getStillSize(self) -> tuple[int, int]: tuple[int, int]Get still size as tuple
method
getStillWidth(self) -> int: intGet still width
method
getVideoHeight(self) -> int: intGet video height
method
getVideoNumFramesPool(self) -> int: intGet number of frames in video pool
method
getVideoSize(self) -> tuple[int, int]: tuple[int, int]Get video size as tuple
method
getVideoWidth(self) -> int: intGet video width
method
sensorCenterCrop(self)Specify sensor center crop. Resolution size / video size
method
setBoardSocket(self, boardSocket: depthai.CameraBoardSocket)Specify which board socket to use Parameter ``boardSocket``: Board socket to use
method
method
setCamera(self, name: str)Specify which camera to use by name Parameter ``name``: Name of the camera to use
method
setColorOrder(self, colorOrder: depthai.ColorCameraProperties.ColorOrder)Set color order of preview output images. RGB or BGR
method
setFp16(self, fp16: bool)Set fp16 (0..255) data type of preview output frames
method
setFps(self, fps: float)Set rate at which camera should produce frames Parameter ``fps``: Rate in frames per second
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation)Set camera image orientation
method
setInterleaved(self, interleaved: bool)Set planar or interleaved data of preview output frames
method
setIsp3aFps(self, arg0: int)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.
method
setIspNumFramesPool(self, arg0: int)Set number of frames in isp pool
method
method
setNumFramesPool(self, raw: int, isp: int, preview: int, video: int, still: int)Set number of frames in all pools
method
setPreviewKeepAspectRatio(self, keep: bool)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
method
setPreviewNumFramesPool(self, arg0: int)Set number of frames in preview pool
method
method
setRawNumFramesPool(self, arg0: int)Set number of frames in raw pool
method
setRawOutputPacked(self, packed: bool)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.
method
setResolution(self, resolution: depthai.ColorCameraProperties.SensorResolution)Set sensor resolution
method
setSensorCrop(self, x: float, y: float)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
method
setStillNumFramesPool(self, arg0: int)Set number of frames in preview pool
method
method
setVideoNumFramesPool(self, arg0: int)Set number of frames in preview pool
method
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
property
initialControl
Initial control options to apply to sensor
property
inputControl
Input for CameraControl message, which can modify camera parameters in runtime
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.
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.Camera(depthai.DeviceNode)
method
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation Returns: Image orientation
method
getIspNumFramesPool(self) -> int: intGet number of frames in isp pool Returns: Number of frames
method
getMaxSizePoolIsp(self) -> int: intGet maximum size of isp pool Returns: Maximum size in bytes of isp pool
method
getMaxSizePoolRaw(self) -> int: intGet maximum size of raw pool Returns: Maximum size in bytes of raw pool
method
getOutputsMaxSizePool(self) -> int|None: int|NoneGet maximum size of outputs pool for all outputs Returns: Maximum size in bytes of image manip pool
method
getOutputsNumFramesPool(self) -> int|None: int|NoneGet number of frames in outputs pool for all outputs Returns: Number of frames
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool Returns: Number of frames
method
getSensorType(self) -> depthai.CameraSensorType: depthai.CameraSensorTypeGet the sensor type Returns: Sensor type
method
requestFullResolutionOutput(self, type: depthai.ImgFrame.Type|None = None, fps: float|None = None, useHighestResolution: bool = False) -> depthai.Node.Output: depthai.Node.OutputGet a high resolution output with full FOV on the sensor. By default the function will not use the resolutions higher than 5000x4000, as those often need a lot of resources, making them hard to use in combination with other nodes. Parameter ``type``: Type of the output (NV12, BGR, ...) - by default it's auto-selected for best performance Parameter ``fps``: FPS of the output - by default it's auto-selected to highest possible that a sensor config support or 30, whichever is lower Parameter ``useHighestResolution``: If true, the function will use the highest resolution available on the sensor, even if it's higher than 5000x4000
method
requestIspOutput(self, fps: float|None = None) -> depthai.Node.Output: depthai.Node.OutputRequest output with isp resolution. The fps does not vote.
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation) -> Camera: CameraSet camera image orientation Parameter ``imageOrientation``: Image orientation to set Returns: Shared pointer to the camera node
method
setIspNumFramesPool(self, num: int) -> Camera: CameraSet number of frames in isp pool (will be automatically reduced if the maximum pool memory size is exceeded) Parameter ``num``: Number of frames Returns: Shared pointer to the camera node
method
setMaxSizePoolIsp(self, size: int) -> Camera: CameraSet maximum size of isp pool Parameter ``size``: Maximum size in bytes of isp pool Returns: Shared pointer to the camera node
method
setMaxSizePoolRaw(self, size: int) -> Camera: CameraSet maximum size of raw pool Parameter ``size``: Maximum size in bytes of raw pool Returns: Shared pointer to the camera node
method
setMaxSizePools(self, raw: int, isp: int, imgmanip: int) -> Camera: CameraSet maximum memory size of all pools Parameter ``raw``: Maximum size in bytes of raw pool Parameter ``isp``: Maximum size in bytes of isp pool Parameter ``outputs``: Maximum size in bytes of outputs pools Returns: Shared pointer to the camera node
method
setMockIsp(self, mockIsp: ReplayVideo) -> Camera: CameraSet mock ISP for Camera node. Automatically sets mockIsp size. Parameter ``replay``: ReplayVideo node to use as mock ISP
method
setNumFramesPools(self, raw: int, isp: int, imgmanip: int) -> Camera: CameraSet number of frames in all pools (will be automatically reduced if the maximum pool memory size is exceeded) Parameter ``raw``: Number of frames in raw pool Parameter ``isp``: Number of frames in isp pool Parameter ``outputs``: Number of frames in outputs pools Returns: Shared pointer to the camera node
method
setOutputsMaxSizePool(self, size: int) -> Camera: CameraSet maximum size of pools for all outputs Parameter ``size``: Maximum size in bytes of pools for all outputs Returns: Shared pointer to the camera node
method
setOutputsNumFramesPool(self, num: int) -> Camera: CameraSet number of frames in pools for all outputs Parameter ``num``: Number of frames in pools for all outputs Returns: Shared pointer to the camera node
method
setRawNumFramesPool(self, num: int) -> Camera: CameraSet number of frames in raw pool (will be automatically reduced if the maximum pool memory size is exceeded) Parameter ``num``: Number of frames Returns: Shared pointer to the camera node
method
setSensorType(self, sensorType: depthai.CameraSensorType) -> Camera: CameraSet the sensor type to use Parameter ``sensorType``: Sensor type to use
property
initialControl
Initial control options to apply to sensor
property
inputControl
Input for CameraControl message, which can modify camera parameters in runtime
property
mockIsp
Input for mocking 'isp' functionality on RVC2. Default queue is blocking with size 8
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.
class
depthai.node.MonoCamera(depthai.DeviceNode)
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
method
getCamera(self) -> str: strRetrieves which camera to use by name Returns: Name of the camera to use
method
getFps(self) -> float: floatGet rate at which camera should produce frames Returns: Rate in frames per second
method
method
getImageOrientation(self) -> depthai.CameraImageOrientation: depthai.CameraImageOrientationGet camera image orientation
method
getNumFramesPool(self) -> int: intGet number of frames in main (ISP output) pool
method
getRawNumFramesPool(self) -> int: intGet number of frames in raw pool
method
getResolution(self) -> depthai.MonoCameraProperties.SensorResolution: depthai.MonoCameraProperties.SensorResolutionGet sensor resolution
method
getResolutionHeight(self) -> int: intGet sensor resolution height
method
getResolutionSize(self) -> tuple[int, int]: tuple[int, int]Get sensor resolution as size
method
getResolutionWidth(self) -> int: intGet sensor resolution width
method
setBoardSocket(self, boardSocket: depthai.CameraBoardSocket)Specify which board socket to use Parameter ``boardSocket``: Board socket to use
method
method
setCamera(self, name: str)Specify which camera to use by name Parameter ``name``: Name of the camera to use
method
setFps(self, fps: float)Set rate at which camera should produce frames Parameter ``fps``: Rate in frames per second
method
method
setImageOrientation(self, imageOrientation: depthai.CameraImageOrientation)Set camera image orientation
method
setIsp3aFps(self, arg0: int)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.
method
setNumFramesPool(self, arg0: int)Set number of frames in main (ISP output) pool
method
setRawNumFramesPool(self, arg0: int)Set number of frames in raw pool
method
setRawOutputPacked(self, packed: bool)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.
method
setResolution(self, resolution: depthai.MonoCameraProperties.SensorResolution)Set sensor resolution
property
property
initialControl
Initial control options to apply to sensor
property
property
property
class
depthai.node.StereoDepth(depthai.DeviceNode)
class
PresetMode
Preset modes for stereo depth. Members: FAST_ACCURACY FAST_DENSITY DEFAULT FACE HIGH_DETAIL ROBOTICS DENSITY ACCURACY
method
method
method
enableDistortionCorrection(self, arg0: bool)Equivalent to useHomographyRectification(!enableDistortionCorrection)
method
loadMeshData()Specify mesh calibration data for 'left' and 'right' inputs, as vectors of bytes. Overrides useHomographyRectification behavior. See `loadMeshFiles` for the expected data format
method
loadMeshFiles(self, pathLeft: os.PathLike, pathRight: os.PathLike)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
method
setAlphaScaling(self, arg0: float)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.
method
setBaseline(self, arg0: float)Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
method
setDefaultProfilePreset(self, arg0: StereoDepth.PresetMode)Sets a default preset based on specified option. Parameter ``mode``: Stereo depth preset mode .. warning:: If using alpha scaling on RVC4 the DEFAULT, DENSITY, and FAST_DENSITY presets can produce inaccurate depth in black padded regions, as they prioritize coverage.
method
method
setDepthAlignmentUseSpecTranslation(self, arg0: bool)Use baseline information for depth alignment from specs (design data) or from calibration. Default: true
method
setDisparityToDepthUseSpecTranslation(self, arg0: bool)Use baseline information for disparity to depth conversion from specs (design data) or from calibration. Default: true
method
setExtendedDisparity(self, enable: bool)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
method
setFocalLength(self, arg0: float)Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
method
method
setLeftRightCheck(self, enable: bool)Computes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling, discarding invalid disparity values
method
setMeshStep(self, width: int, height: int)Set the distance between mesh points. Default: (16, 16)
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setOutputKeepAspectRatio(self, keep: bool)Specifies whether the frames resized by `setOutputSize` should preserve aspect ratio, with potential cropping when enabled. Default `true`
method
setOutputSize(self, width: int, height: int)Specify disparity/depth output resolution size, implemented by scaling. Currently only applicable when aligning to RGB camera
method
setPostProcessingHardwareResources(self, arg0: int, arg1: int)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.
method
setRectification(self, enable: bool)Rectify input images or not.
method
setRectificationUseSpecTranslation(self, arg0: bool)Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Should be used only for debugging. Default: false
method
setRectifyEdgeFillColor(self, color: int)Fill color for missing data at frame edges Parameter ``color``: Grayscale 0..255, or -1 to replicate pixels
method
setRuntimeModeSwitch(self, arg0: bool)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.
method
setSubpixel(self, enable: bool)Computes disparity with sub-pixel interpolation (3 fractional bits by default). Suitable for long range. Currently incompatible with extended disparity
method
setSubpixelFractionalBits(self, subpixelFractionalBits: int)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.
method
useHomographyRectification(self, arg0: bool)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.
property
confidenceMap
Outputs ImgFrame message that carries RAW8 confidence map. Lower values mean lower confidence of the calculated disparity value. RGB alignment, left-right check or any postprocessing (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
Outputs ImgFrame message that carries RAW8 / RAW16 encoded disparity data: 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
property
initialConfig
Initial config to use for StereoDepth.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input StereoDepthConfig message with ability to modify parameters in runtime.
property
left
Input for left ImgFrame of left-right pair
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
property
syncedLeft
Passthrough ImgFrame message from 'left' Input.
property
syncedRight
Passthrough ImgFrame message from 'right' Input.
class
depthai.node.StereoDepth.PresetMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.NeuralNetwork(depthai.DeviceNode)
class
method
method
getNNArchive(self) -> depthai.NNArchive|None: depthai.NNArchive|NoneGet the archive owned by this Node. Returns: constant reference to this Nodes archive
method
getNumInferenceThreads(self) -> int: intHow many inference threads will be used to run the network Returns: Number of threads, 0, 1 or 2. Zero means AUTO
method
setBackend(self, setBackend: str)Specifies backend to use Parameter ``backend``: String specifying backend to use
method
setBackendProperties(self, setBackendProperties: dict[str, str])Set backend properties Parameter ``backendProperties``: backend properties map
method
method
setBlobPath(self, path: os.PathLike)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
method
setFromModelZoo(self, description: depthai.NNModelDescription, useCached: bool)Download model from zoo and set it for this Node Parameter ``description:``: Model description to download Parameter ``useCached:``: Use cached model if available
method
setModelFromDeviceZoo(self, model: depthai.DeviceModelZoo)Set model from Device Model Zoo Parameter ``model``: DeviceModelZoo model enum @note Only applicable for RVC4 devices with OS 1.20.5 or higher
method
setModelPath(self, modelPath: os.PathLike)Load a network model into assets. DLC and other custom model files are loaded lazily and must remain available and unchanged until the pipeline has been built. Parameter ``modelPath``: Path to the neural network model file.
method
method
setNumInferenceThreads(self, numThreads: int)How many threads should the node use to run the network. Parameter ``numThreads``: Number of threads to dedicate to this node
method
setNumNCEPerInferenceThread(self, numNCEPerThread: int)How many Neural Compute Engines should a single thread use for inference Parameter ``numNCEPerThread``: Number of NCE per thread
method
setNumPoolFrames(self, numFrames: int)Specifies how many frames will be available in the pool Parameter ``numFrames``: How many frames will pool have
method
setNumShavesPerInferenceThread(self, numShavesPerInferenceThread: int)How many Shaves should a single thread use for inference Parameter ``numShavesPerThread``: Number of shaves per thread
method
property
input
Input message with data to be inferred upon
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
class
depthai.node.NeuralNetwork.Model
class
depthai.node.VideoEncoder(depthai.DeviceNode)
method
method
method
getBitrate(self) -> int: intGet bitrate in bps
method
getBitrateKbps(self) -> int: intGet bitrate in kbps
method
getFrameRate(self) -> float: floatGet frame rate
method
getKeyframeFrequency(self) -> int: intGet keyframe frequency
method
getLossless(self) -> bool: boolGet lossless mode. Applies only when using [M]JPEG profile.
method
method
getNumBFrames(self) -> int: intGet number of B frames
method
getNumFramesPool(self) -> int: intGet number of frames in pool Returns: Number of pool frames
method
getProfile(self) -> depthai.VideoEncoderProperties.Profile: depthai.VideoEncoderProperties.ProfileGet profile
method
getQuality(self) -> int: intGet quality
method
getRateControlMode(self) -> depthai.VideoEncoderProperties.RateControlMode: depthai.VideoEncoderProperties.RateControlModeGet rate control mode
method
setBitrate(self, bitrate: int)Set output bitrate in bps, for CBR rate control mode. 0 for auto (based on frame size and FPS)
method
setBitrateKbps(self, bitrateKbps: int)Set output bitrate in kbps, for CBR rate control mode. 0 for auto (based on frame size and FPS)
method
setDefaultProfilePreset(self, fps: float, profile: depthai.VideoEncoderProperties.Profile)Sets a default preset based on specified frame rate and profile Parameter ``fps``: Frame rate in frames per second Parameter ``profile``: Encoding profile
method
setFrameRate(self, frameRate: float)Sets expected frame rate Parameter ``frameRate``: Frame rate in frames per second
method
setKeyframeFrequency(self, freq: int)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
method
setLossless(self, arg0: bool)Set lossless mode. Applies only to [M]JPEG profile Parameter ``lossless``: True to enable lossless jpeg encoding, false otherwise
method
setMaxOutputFrameSize(self, maxFrameSize: int)Specifies maximum output encoded frame size
method
setNumBFrames(self, numBFrames: int)Set number of B frames to be inserted
method
setNumFramesPool(self, frames: int)Set number of frames in pool Parameter ``frames``: Number of pool frames
method
setProfile(self, profile: depthai.VideoEncoderProperties.Profile)Set encoding profile
method
setQuality(self, quality: int)Set quality Parameter ``quality``: Value between 0-100%. Approximates quality
method
setRateControlMode(self, mode: depthai.VideoEncoderProperties.RateControlMode)Set rate control mode
property
bitstream
Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with out.
property
input
Input for NV12 ImgFrame to be encoded
property
out
Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with bitstream.
class
depthai.node.ImageManip(depthai.DeviceNode)
class
PerformanceMode
Members: BALANCED PERFORMANCE LOW_POWER
class
Backend
Members: HW CPU GPU AUTO
method
setBackend(self, arg0: depthai.ImageManipProperties.Backend) -> ImageManip: ImageManipSet backend preference: - CPU: Run ImageManip on the CPU. - HW: Prefer the dedicated hardware image manipulation backend. - GPU: Prefer the GPU backend. - AUTO: Let the runtime select the backend automatically (GPU with CPU fallback). Hardware-accelerated backends can cause some unexpected behavior when using multiple ImageManip nodes in series. Currently, the only operation affected is downscaling. Parameter ``backend``: Backend preference
method
setMaxOutputFrameSize(self, arg0: int)Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setMaxPoolSize(self, arg0: int)Specify maximum size of output image pool. Parameter ``maxPoolSize``: Maximum pool size in bytes
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setPerformanceMode(self, arg0: depthai.ImageManipProperties.PerformanceMode) -> ImageManip: ImageManipSet performance mode Parameter ``performanceMode``: Performance mode
method
setRunOnHost(self, arg0: bool) -> ImageManip: ImageManipSpecify whether to run on host or device Parameter ``runOnHost``: Run node on host
property
initialConfig
Initial config to use when manipulating frames
property
inputConfig
Input ImageManipConfig message with ability to modify parameters in runtime
property
inputImage
Input image to be modified
property
class
depthai.node.ImageManip.PerformanceMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.ImageManip.Backend
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.Warp(depthai.DeviceNode)
method
getHwIds(self) -> list[int]: list[int]Retrieve which hardware warp engines to use
method
getInterpolation(self) -> depthai.Interpolation: depthai.InterpolationRetrieve which interpolation method to use
method
setHwIds(self, arg0: list[int])Specify which hardware warp engines to use Parameter ``ids``: Which warp engines to use (0, 1, 2)
method
setInterpolation(self, arg0: depthai.Interpolation)Specify which interpolation method to use Parameter ``interpolation``: type of interpolation
method
setMaxOutputFrameSize(self, arg0: int)Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
method
property
inputImage
Input image to be modified Default queue is blocking with size 8
property
out
Outputs ImgFrame message that carries warped image.
class
depthai.node.SPIOut(depthai.DeviceNode)
method
setBusId(self, id: int)Specifies SPI Bus number to use Parameter ``id``: SPI Bus id
method
setStreamName(self, name: str)Specifies stream name over which the node will send data Parameter ``name``: Stream name
property
input
Input for any type of messages to be transferred over SPI stream Default queue is blocking with size 8
class
depthai.node.SPIIn(depthai.DeviceNode)
method
getBusId(self) -> int: intGet bus id
method
getMaxDataSize(self) -> int: intGet maximum messages size in bytes
method
getNumFrames(self) -> int: intGet number of frames in pool
method
getStreamName(self) -> str: strGet stream name
method
setBusId(self, id: int)Specifies SPI Bus number to use Parameter ``id``: SPI Bus id
method
setMaxDataSize(self, maxDataSize: int)Set maximum message size it can receive Parameter ``maxDataSize``: Maximum size in bytes
method
setNumFrames(self, numFrames: int)Set number of frames in pool for sending messages forward Parameter ``numFrames``: Maximum number of frames in pool
method
setStreamName(self, name: str)Specifies stream name over which the node will receive data Parameter ``name``: Stream name
property
out
Outputs message of same type as send from host.
class
depthai.node.DetectionNetwork(depthai.DeviceNodeGroup)
class
method
method
method
method
getConfidenceThreshold(self) -> float: floatRetrieves threshold at which to filter the rest of the detections. Returns: Detection confidence
method
getNumInferenceThreads(self) -> int: intHow many inference threads will be used to run the network Returns: Number of threads, 0, 1 or 2. Zero means AUTO
method
setBackend(self, setBackend: str)Specifies backend to use Parameter ``backend``: String specifying backend to use
method
setBackendProperties(self, setBackendProperties: dict[str, str])Set backend properties Parameter ``backendProperties``: backend properties map
method
method
setBlobPath(self, path: os.PathLike)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
method
setConfidenceThreshold(self, thresh: float)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
method
setFromModelZoo(self, description: depthai.NNModelDescription, useCached: bool = False)Download model from zoo and set it for this Node Parameter ``description:``: Model description to download Parameter ``useCached:``: Use cached model if available
method
setModelPath(self, modelPath: os.PathLike)Load a network model into assets. DLC and other custom model files are loaded lazily and must remain available and unchanged until the pipeline has been built. Parameter ``modelPath``: Path to the model file.
method
method
setNumInferenceThreads(self, numThreads: int)How many threads should the node use to run the network. Parameter ``numThreads``: Number of threads to dedicate to this node
method
setNumNCEPerInferenceThread(self, numNCEPerThread: int)How many Neural Compute Engines should a single thread use for inference Parameter ``numNCEPerThread``: Number of NCE per thread
method
setNumPoolFrames(self, numFrames: int)Specifies how many frames will be available in the pool Parameter ``numFrames``: How many frames will pool have
method
setNumShavesPerInferenceThread(self, numShavesPerInferenceThread: int)How many Shaves should a single thread use for inference Parameter ``numShavesPerThread``: Number of shaves per thread
property
property
input
Input message with data to be inferred upon
property
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.
class
depthai.node.DetectionNetwork.Model
class
depthai.node.SystemLogger(depthai.DeviceNode)
method
getRate(self) -> float: floatGets logging rate, at which messages will be sent out
method
setRate(self, hz: float)Specify logging rate, at which messages will be sent out Parameter ``hz``: Sending rate in hertz (messages per second)
property
out
Outputs SystemInformation[RVC4] message that carries various system information like memory and CPU usage, temperatures, ... For series 2 devices output SystemInformation message, for series 4 devices output SystemInformationRVC4 message
class
depthai.node.Script(depthai.DeviceNode)
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the script should run Returns: Processor type - Leon CSS or Leon MSS
method
getScriptName(self) -> str: strGet 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
method
setProcessor(self, arg0: depthai.ProcessorType)Set on which processor the script should run Parameter ``type``: Processor type - Leon CSS or Leon MSS
method
method
property
property
class
depthai.node.SpatialLocationCalculator(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
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
inputDetections
Input messages on which spatial location will be calculated. Possible datatypes are ImgDetections or Keypoints.
property
out
Outputs SpatialLocationCalculatorData message that carries spatial locations for each additional ROI that is specified in the config.
property
outputDetections
Outputs SpatialImgDetections message that carries spatial locations along with original input data.
property
passthroughDepth
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.SpatialDetectionNetwork(depthai.DeviceNode)
class
method
method
getClasses(self) -> list[str]|None: list[str]|NoneGet classes labels
method
getConfidenceThreshold(self) -> float: floatRetrieves threshold at which to filter the rest of the detections. Returns: Detection confidence
method
getNumInferenceThreads(self) -> int: intHow many inference threads will be used to run the network Returns: Number of threads, 0, 1 or 2. Zero means AUTO
method
setBackend(self, setBackend: str)Specifies backend to use Parameter ``backend``: String specifying backend to use
method
setBackendProperties(self, setBackendProperties: dict[str, str])Set backend properties Parameter ``backendProperties``: backend properties map
method
method
setBlobPath(self, path: os.PathLike)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
method
setBoundingBoxScaleFactor(self, scaleFactor: float)Custom interface Specifies scale factor for detected bounding boxes. Parameter ``scaleFactor``: Scale factor must be in the interval (0,1].
method
setConfidenceThreshold(self, thresh: float)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
method
setDepthLowerThreshold(self, lowerThreshold: int)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.
method
setDepthUpperThreshold(self, upperThreshold: int)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].
method
setFromModelZoo(self, description: depthai.NNModelDescription, useCached: bool)Download model from zoo and set it for this Node Parameter ``description:``: Model description to download Parameter ``useCached:``: Use cached model if available
method
setModelPath(self, modelPath: os.PathLike)Load a network model into assets. DLC and other custom model files are loaded lazily and must remain available and unchanged until the pipeline has been built. Parameter ``modelPath``: Path to the model file.
method
method
setNumInferenceThreads(self, numThreads: int)How many threads should the node use to run the network. Parameter ``numThreads``: Number of threads to dedicate to this node
method
setNumNCEPerInferenceThread(self, numNCEPerThread: int)How many Neural Compute Engines should a single thread use for inference Parameter ``numNCEPerThread``: Number of NCE per thread
method
setNumPoolFrames(self, numFrames: int)Specifies how many frames will be available in the pool Parameter ``numFrames``: How many frames will pool have
method
setNumShavesPerInferenceThread(self, numShavesPerInferenceThread: int)How many Shaves should a single thread use for inference Parameter ``numShavesPerThread``: Number of shaves per thread
method
setSpatialCalculationAlgorithm(self, calculationAlgorithm: depthai.SpatialLocationCalculatorAlgorithm)Specifies spatial location calculator algorithm: Average/Min/Max Parameter ``calculationAlgorithm``: Calculation algorithm.
property
property
input
Input message with data to be inferred upon
property
inputDepth
Input message with depth data used to retrieve spatial information about detected object Default queue is non-blocking with size 4
property
property
out
Outputs ImgDetections message that carries parsed detection results.
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.
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.
property
class
depthai.node.SpatialDetectionNetwork.Model
class
depthai.node.ObjectTracker(depthai.DeviceNode)
method
setDetectionLabelsToTrack(self, labels: list[int])Specify detection labels to track. Parameter ``labels``: Detection labels to track. Default every label is tracked from image detection network output.
method
setMaxObjectsToTrack(self, maxObjectsToTrack: int)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.
method
setOcclusionRatioThreshold(self, threshold: float)Set the occlusion ratio threshold. Used to filter out overlapping tracklets. Parameter ``theshold``: Occlusion ratio threshold. Default 0.3.
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
method
setSpatialAssociation(self, enabled: bool)Enable or disable spatially-aware association. If disabled, only 2D association is used. Parameter ``enabled``: `true` enables spatially-aware association, `false` uses 2D-only association. Default is false.
method
setSpatialAssociationWeight(self, weight: float)Set spatial association weight in [0,1]. Parameter ``weight``: Spatial association weight in [0,1] used to blend 2D and spatial association scores (0 = 2D-only scoring, 1 = spatial-only scoring). This weight affects candidate scoring only; final acceptance still requires passing the 2D IoU threshold gate. Default is 0.5.
method
setSpatialDepthAwareScale(self, scale: float)Set depth-aware gating scale used for spatial association. Increases gating threshold with increased depth. Parameter ``scale``: Depth-aware gating scale factor. Default is 0.35
method
setSpatialDistanceThreshold(self, thresholdMeters: float)Set base 3D gating threshold in meters for spatial association. Parameter ``thresholdMeters``: Base spatial gating distance in meters. Default is 1.5m.
method
setTrackerIdAssignmentPolicy(self, type: depthai.TrackerIdAssignmentPolicy)Specify tracker ID assignment policy. Parameter ``type``: Tracker ID assignment policy.
method
setTrackerThreshold(self, threshold: float)Specify tracker threshold. Parameter ``threshold``: Above this threshold the detected objects will be tracked. Default 0, all image detections are tracked.
method
setTrackerType(self, type: depthai.TrackerType)Specify tracker type algorithm. Parameter ``type``: Tracker type.
method
setTrackingPerClass(self, trackingPerClass: bool)Whether tracker should take into consideration class label for tracking.
method
setTrackletBirthThreshold(self, trackletBirthThreshold: int)Set the tracklet birth threshold. Minimum consecutive tracked frames required to consider a tracklet as a new (TRACKED) instance. Parameter ``trackletBirthThreshold``: Tracklet birth threshold. Default 3.
method
setTrackletMaxLifespan(self, trackletMaxLifespan: int)Set the tracklet lifespan in number of frames. Number of frames after which a LOST tracklet is removed. Parameter ``trackletMaxLifespan``: Tracklet lifespan in number of frames. Default 120.
property
inputConfig
Input ObjectTrackerConfig message with ability to modify parameters at runtime. Default queue is non-blocking with size 4.
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.
class
depthai.node.IMU(depthai.DeviceNode)
method
enableFirmwareUpdate(self, arg0: bool)Whether to perform firmware update or not. Default value: false.
method
method
getBatchReportThreshold(self) -> int: intAbove this packet threshold data will be sent to host, if queue is not blocked
method
getMaxBatchReports(self) -> int: intMaximum number of IMU packets in a batch report
method
setBatchReportThreshold(self, batchReportThreshold: int)Above this packet threshold data will be sent to host, if queue is not blocked
method
setMaxBatchReports(self, maxBatchReports: int)Maximum number of IMU packets in a batch report
property
mockIn
Mock IMU data for replaying recorded data
property
out
Outputs IMUData message that carries IMU packets.
class
depthai.node.EdgeDetector(depthai.DeviceNode)
method
setMaxOutputFrameSize(self, arg0: int)Specify maximum size of output image. Parameter ``maxFrameSize``: Maximum frame size in bytes
method
setNumFramesPool(self, arg0: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
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
class
depthai.node.FeatureTracker(depthai.DeviceNode)
method
setHardwareResources(self, numShaves: int, numMemorySlices: int)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.
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.
class
depthai.node.AprilTag(depthai.DeviceNode)
method
getNumThreads(self) -> int: intGet number of threads to use for AprilTag detection. Returns: Number of threads to use.
method
getWaitForConfigInput(self) -> bool: boolGet whether or not wait until configuration message arrives to inputConfig Input.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setNumThreads(self, numThreads: int)Set number of threads to use for AprilTag detection. Parameter ``numThreads``: Number of threads to use.
method
setRunOnHost(self, arg0: bool)Specify whether to run on host or device By default, the node will run on device.
method
setWaitForConfigInput(self, wait: bool)Specify whether or not wait until configuration message arrives to inputConfig Input. Parameter ``wait``: True to wait for configuration message, false otherwise.
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.
class
depthai.node.DetectionParser(depthai.DeviceNode)
method
method
getAnchorMasks(self) -> dict[str, list[int]]: dict[str, list[int]]Get anchor masks for anchor-based yolo models
method
getAnchors(self) -> list[float]: list[float]Get anchors for anchor-based yolo models
method
getClasses(self) -> list[str]|None: list[str]|NoneGet class names to decode.
method
getConfidenceThreshold(self) -> float: floatRetrieves threshold at which to filter the rest of the detections. Returns: Detection confidence
method
getCoordinateSize(self) -> int: intGet number of coordinates per bounding box.
method
getDecodeKeypoints(self) -> bool: boolGet whether keypoints decoding is enabled.
method
getDecodeSegmentation(self) -> bool: boolGet whether segmentation mask decoding is enabled.
method
getIouThreshold(self) -> float: floatGet IOU threshold for non-maxima suppression
method
getNNFamily(self) -> depthai.DetectionNetworkType: depthai.DetectionNetworkTypeGets NN Family to parse
method
getNkeypoints(self) -> int: intGet number of keypoints to decode.
method
getNumClasses(self) -> int: intGet number of classes to decode.
method
getNumFramesPool(self) -> int: intReturns number of frames in pool
method
getStrides(self) -> list[int]: list[int]Get strides for yolo models
method
getSubtype(self) -> str: strGet subtype for the parser.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setAnchorMasks(self, anchorMasks: dict[str, list[int]])Set anchor masks for anchor-based yolo models Parameter ``anchorMasks``: Map of anchor masks
method
method
method
setBlobPath(self, path: os.PathLike)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
method
setClasses(self, classes: list[str])Set class names. This will clear any previously set number of classes. Parameter ``classes``: Vector of class names
method
setConfidenceThreshold(self, thresh: float)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 @note Sets startup configuration. Send DetectionParserConfig to inputConfig for runtime updates.
method
setCoordinateSize(self, coordinates: int)Sets the number of coordinates per bounding box. Parameter ``coordinates``: Number of coordinates. Default is 4
method
setDecodeKeypoints(self, decode: bool)Enable/disable keypoints decoding. If enabled, number of keypoints must also be set.
method
setDecodeSegmentation(self, decode: bool)Enable/disable segmentation mask decoding.
method
method
setIouThreshold(self, thresh: float)Set IOU threshold for non-maxima suppression Parameter ``thresh``: IOU threshold @note Sets startup configuration. Send DetectionParserConfig to inputConfig for runtime updates.
method
setKeypointEdges(self, edges: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]])Set edges connections between keypoints. Parameter ``edges``: Vector edges connections represented as pairs of keypoint indices. @note This is only applicable if keypoints decoding is enabled.
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. If the archive's type is SUPERBLOB, use default number of shaves. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. Parameter ``head:``: NNArchive head to set
method
setNNFamily(self, type: depthai.DetectionNetworkType)Sets NN Family to parse. Possible values are: DetectionNetworkType::YOLO - 0 DetectionNetworkType::MOBILENET - 1 .. warning:: If NN Family is set manually, user must ensure that it matches the actual model being used.
method
setNumClasses(self, numClasses: int)Set number of classes. This will clear any previously set class names. Parameter ``numClasses``: Number of classes
method
setNumFramesPool(self, numFramesPool: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setNumKeypoints(self, numKeypoints: int)Set number of keypoints to decode. Automatically enables keypoints decoding.
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
method
setStrides(self, strides: list[int])Set strides for yolo models
method
setSubtype(self, subtype: str)Set subtype for the parser. Parameter ``subtype``: Subtype string, currently supported subtypes are: yolov6r1, yolov6r2 yolov8n, yolov6, yolov8, yolov10, yolov11, yolov3, yolov3-tiny, yolov5, yolov7, yolo-p, yolov5-u
property
initialConfig
Initial runtime thresholds. Send a config to inputConfig to change them after startup.
property
input
Input NN results with detection data to parse Default queue is blocking with size 5
property
inputConfig
Runtime threshold configuration. Non-blocking queue of size 4; does not wait by default.
property
out
Outputs image frame with detected edges
class
depthai.node.SegmentationParser(depthai.DeviceNode)
method
method
getBackgroundClass(self) -> bool: boolGets whether the first class (index 0) is considered the background class.
method
getLabels(self) -> list[str]: list[str]Returns the class labels associated with the segmentation mask.
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setBackgroundClass(self, backgroundClass: bool)Sets whether the first class (index 0) is considered the background class. If true, the pixels classified as index 0 will be treated as background. Parameter ``backgroundClass``: Boolean indicating if the first class is the background class @note Only applicable if the number of classes is greater than 1 and the output classes are not in a single layer (eg. classesInOneLayer = false).
method
setLabels(self, labels: list[str])Sets the class labels associated with the segmentation mask. The label at index $i$ in the `labels` vector corresponds to the value $i$ in the segmentation mask data array. Parameter ``labels``: Vector of class labels
method
setNNArchive(self, nnArchive: depthai.NNArchive)Set NNArchive for this Node. Parameter ``nnArchive:``: NNArchive to set
method
setNNArchiveHead(self, head: depthai.nn_archive.v1.Head)Set NNArchive head for this Node. Parameter ``head:``: NNArchive head to set
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when parsing segmentation masks.
property
input
Input NN results with segmentation data to parser
property
inputConfig
Input SegmentationParserConfig message with ability to modify parameters in runtime.
property
out
Outputs segmentation mask
class
depthai.node.UVC(depthai.DeviceNode)
method
setGpiosOnInit(self, list: dict[int, int])Set GPIO list <gpio_number, value> for GPIOs to set (on/off) at init
method
setGpiosOnStreamOff(self, list: dict[int, int])Set GPIO list <gpio_number, value> for GPIOs to set when streaming is disabled
method
setGpiosOnStreamOn(self, list: dict[int, int])Set GPIO list <gpio_number, value> for GPIOs to set when streaming is enabled
property
input
Input for image frames to be streamed over UVC Default queue is blocking with size 8
class
depthai.node.Thermal(depthai.DeviceNode)
method
build(self, boardSocket: depthai.CameraBoardSocket = ..., fps: float = 25.0) -> Thermal: ThermalBuild with a specific board socket and fps.
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
property
color
Outputs YUV422i grayscale thermal image.
property
initialConfig
Initial config to use for thermal sensor.
property
inputConfig
Input ThermalConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
temperature
Outputs FP16 (degC) thermal image.
class
depthai.node.ToFBase(depthai.DeviceNode)
method
build(self, boardSocket: depthai.CameraBoardSocket = ..., profile: depthai.ToFConfig.Profile = ..., fps: float|None = None) -> ToFBase: ToFBaseBuild with a specific board socket
method
getBoardSocket(self) -> depthai.CameraBoardSocket: depthai.CameraBoardSocketRetrieves which board socket to use Returns: Board socket to use
method
setOutputUndistortion(self, enable: bool) -> ToFBase: ToFBaseEnable or disable undistortion for depth and auxiliary outputs. Parameter ``enable``: Whether to undistort the outputs. @note Undistortion is supported on RVC4. RVC2 logs a warning and leaves outputs unchanged. Returns: This ToF base node.
property
property
property
property
initialConfig
Initial config to use for feature tracking.
property
inputConfig
Input ToFConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
property
property
class
depthai.node.ToF(depthai.DeviceNodeGroup)
static method
method
method
method
method
setOutputUndistortion(self, enable: bool) -> ToF: ToFEnable or disable undistortion for depth and auxiliary outputs. Parameter ``enable``: Whether to undistort the outputs. @note Undistortion is supported on RVC4. RVC2 logs a warning and leaves outputs unchanged. Returns: This ToF node.
property
amplitude
Amplitude output
property
confidence
Confidence output
property
depth
Filtered depth output
property
imageFiltersInputConfig
Input config for image filters
property
imageFiltersNode
Image filters node
property
intensity
Intensity output
property
phase
Phase output
property
raw
Raw data coming from the sensor
property
rawDepth
Raw depth output from ToF sensor. On RVC2 this is connected to the unfiltered base depth output. On RVC4 this is an unconnected placeholder output.
property
tofBaseInputConfig
Input config for ToF base node
property
tofBaseNode
ToF base node
class
depthai.node.PointCloud(depthai.DeviceNode)
method
setNumFramesPool(self, numFramesPool: int)Specify number of frames in pool. Parameter ``numFramesPool``: How many frames should the pool have
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on host.
method
method
useCPU(self)Use single-threaded CPU for processing
method
useCPUMT(self, numThreads: int = 2)Use multi-threaded CPU for processing
method
useGPU(self, device: int = 0)Use GPU for point cloud computation Parameter ``device``: GPU device index (default 0)
property
initialConfig
Initial config to use when computing the point cloud.
property
property
inputConfig
Input PointCloudConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
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.
class
depthai.node.Sync(depthai.DeviceNode)
class
TimestampSource
Members: DEFAULT DEVICE HOST SYSTEM
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the node should run Returns: Processor type - Leon CSS or Leon MSS
method
getSyncAttempts(self) -> int: intGets the number of sync attempts
method
getSyncThreshold(self) -> datetime.timedelta: datetime.timedeltaGets the maximal interval between messages in the group in milliseconds
method
getTimestampSource(self) -> depthai.SyncProperties.TimestampSource: depthai.SyncProperties.TimestampSourceGet the timestamp source
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setProcessor(self, processorType: depthai.ProcessorType)Specify on which processor the node should run. RVC2 only. Parameter ``type``: Processor type - Leon CSS or Leon MSS
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
method
setSyncAttempts(self, maxDataSize: int)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
method
setSyncThreshold(self, syncThreshold: datetime.timedelta)Set the maximal interval between messages in the group Parameter ``syncThreshold``: Maximal interval between messages in the group
method
setTimestampSource(self, source: depthai.SyncProperties.TimestampSource)Specify the timestamp source
property
inputs
A map of inputs
property
class
depthai.node.Sync.TimestampSource
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.MessageDemux(depthai.DeviceNode)
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the node should run Returns: Processor type - Leon CSS or Leon MSS
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setProcessor(self, arg0: depthai.ProcessorType)Specify on which processor the node should run. RVC2 only. Parameter ``type``: Processor type - Leon CSS or Leon MSS
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
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.ThreadedHostNode(depthai.ThreadedNode)
method
method
method
method
method
method
method
class
depthai.node.HostNode(depthai.node.ThreadedHostNode)
CLASS_METHOD
method
method
method
method
method
method
method
method
sendProcessingToPipeline(self, arg0: bool)Send processing to pipeline. If set to true, it's important to call `pipeline.run()` in the main thread or `pipeline.processTasks()` in the main thread. Otherwise, if set to false, such action is not needed.
property
property
class
depthai.node.RecordVideo(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
property
input
Input for ImgFrame or EncodedFrame messages to be recorded Default queue is blocking with size 15
class
depthai.node.RecordMetadataOnly(depthai.node.ThreadedHostNode)
method
method
method
method
property
input
Input IMU messages to be recorded (will support other types in the future) Default queue is blocking with size 8
class
depthai.node.ImageFilters(depthai.DeviceNode)
method
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config for image filters.
property
input
Input for image frames to be filtered
property
inputConfig
Config to be set for a specific filter
property
output
Filtered frame
class
depthai.node.ToFDepthConfidenceFilter(depthai.DeviceNode)
method
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
amplitude
Amplitude frame image, expected ImgFrame type is RAW8 or RAW16.
property
confidence
RAW16 encoded confidence frame
property
depth
Depth frame image, expected ImgFrame type is RAW8 or RAW16.
property
filteredDepth
RAW16 encoded filtered depth frame
property
initialConfig
Initial config for ToF depth confidence filter.
property
inputConfig
Config message for runtime filter configuration
class
depthai.node.ReplayVideo(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
method
method
method
method
method
property
out
Output for any type of messages to be transferred over XLink stream Default queue is blocking with size 8
class
depthai.node.ReplayMetadataOnly(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
property
out
Output for any type of messages to be transferred over XLink stream Default queue is blocking with size 8
class
depthai.node.ImageAlign(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setInterpolation(self, interp: depthai.Interpolation) -> ImageAlign: ImageAlignSpecify interpolation method to use when resizing
method
setNumFramesPool(self, numFramesPool: int) -> ImageAlign: ImageAlignSpecify number of frames in the pool
method
setNumShaves(self, numShaves: int) -> ImageAlign: ImageAlignSpecify number of shaves to use for this node
method
setOutKeepAspectRatio(self, keep: bool) -> ImageAlign: ImageAlignSpecify whether to keep aspect ratio when resizing
method
setOutputSize(self, alignWidth: int, alignHeight: int) -> ImageAlign: ImageAlignSpecify the output size of the aligned image
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when calculating spatial location data.
property
input
Input message. Default queue is non-blocking with size 4.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
outputAligned
Outputs ImgFrame message that is aligned to inputAlignTo.
property
passthroughInput
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.Align(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is set to run on host
method
setNumFramesPool(self, numFramesPool: int) -> Align: AlignSpecify number of frames in the pool
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config to use when aligning messages.
property
input
Input message to be aligned. Can be either ImgFrame or any message that implements Transformable interface. Default queue is non-blocking with size 4.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
outputAligned
Outputs the input message aligned to the inputAlignTo message. Output message will be of the same type as input message.
property
passthroughInput
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
class
depthai.node.RGBD(depthai.node.ThreadedHostNode)
method
method
printDevices(self)Print available GPU devices
method
method
useCPU(self)Use single-threaded CPU for processing
method
useCPUMT(self, numThreads: int = 2)Use multi-threaded CPU for processing Parameter ``numThreads``: Number of threads to use
method
useGPU(self, device: int = 0)Use GPU for processing (needs to be compiled with Kompute support) Parameter ``device``: GPU device index
property
property
property
pcl
Output point cloud.
property
rgbd
Output RGBD frames.
class
depthai.node.Rectification(depthai.DeviceNode)
method
enableRectification(self, enable: bool) -> Rectification: RectificationEnable or disable rectification (useful for minimal changes during debugging)
method
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
input1
Input images to be rectified
property
property
output1
Send outputs
property
property
passthrough1
Passthrough for input messages (so the node can be placed between other nodes)
property
class
depthai.node.NeuralDepth(depthai.DeviceNode)
static method
NeuralDepth.getInputSize(model: depthai.DeviceModelZoo) -> tuple[int, int]: tuple[int, int]Get input size for specific model
method
method
setRectification(self, enable: bool) -> NeuralDepth: NeuralDepthEnable or disable rectification (useful for prerectified inputs)
property
confidence
Output confidence ImgFrame
property
depth
Output depth ImgFrame
property
disparity
Output disparity ImgFrame
property
edge
Output edge ImgFrame
property
initialConfig
Initial config to use for NeuralDepth.
property
inputConfig
Input config to modify parameters in runtime.
property
left
Input for left ImgFrame of left-right pair
property
property
property
property
rectifiedLeft
Output for rectified left ImgFrame
property
rectifiedRight
Output for rectified right ImgFrame
property
right
Input for right ImgFrame of left-right pair
property
class
depthai.node.GPUStereo(depthai.DeviceNode)
method
build(self, leftInput: depthai.Node.Output, rightInput: depthai.Node.Output) -> GPUStereo: GPUStereoBuild the node by linking left and right camera outputs.
method
setRectification(self, enable: bool) -> GPUStereo: GPUStereoEnable or disable built-in stereo rectification. When enabled, the node rectifies the input images internally using calibration data. When disabled, inputs are expected to be already rectified.
property
confidenceMap
Outputs ImgFrame message that carries RAW8 confidence map. Lower values mean lower confidence of the calculated disparity value. Note: postprocessing steps like LR-check/median filter are not applied to confidence map.
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
Outputs ImgFrame message that carries RAW16 encoded disparity data.
property
initialConfig
Initial config to use for GPUStereo. Use this to configure startup parameters before the pipeline starts. Note: Only `confidenceThreshold` is supported/exposed for this node.
property
property
class
depthai.node.Depth(depthai.DeviceNodeGroup)
class
Algorithm
Backend selection for the Depth node. Members: AUTO STEREO NEURAL NEURAL_ASSISTED_STEREO TOF TOF_STEREO_FUSION GPU_STEREO
method
method
getRequestedAlgorithm(self) -> Depth.Algorithm: Depth.AlgorithmGet the requested algorithm selection.
method
getRequestedConfig(self) -> typing.Any: typing.AnyGet the requested config override, if any. Returns: Config override, or std::nullopt when config is auto-picked
method
getResolvedAlgorithm(self) -> Depth.Algorithm: Depth.AlgorithmGet the algorithm actually wired (AUTO resolved). Valid after first depth() access.
method
getResolvedConfig(self) -> typing.Any: typing.AnyGet the resolved algorithm-specific config.
method
setAlgorithm(self, algorithm: Depth.Algorithm) -> Depth: DepthSet the requested algorithm before wiring. Parameter ``algorithm``: Backend to use; AUTO re-enables auto-selection
method
setAlignTo(self, alignTo: depthai.Node.Output) -> Depth: DepthAlign depth output to another image source. Must be called before first depth() or confidence() access. Only depth() is aligned; confidence() stays in the backend frame. Parameter ``alignTo``: Output to align depth to
method
property
confidence
Output confidence map from the active backend. When ToF is active, this forwards the actual ToF confidence output.
property
depth
Output depth map from the active backend.
class
depthai.node.Depth.Algorithm
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.node.NeuralAssistedStereo(depthai.DeviceNode)
method
property
property
property
property
property
property
property
property
property
property
property
property
property
property
property
property
property
class
depthai.node.Vpp(depthai.DeviceNode)
method
property
property
depth
Depth input, used instead of disparity. Expects RAW16 millimetres aligned to the full rectified left image, with stereo intrinsics and extrinsics on the image frames. Requires RVC4 firmware with VPP depth-input support.
property
property
initialConfig
Initial config of the node.
method
property
property
property
leftOut
Output ImgFrame message that carries the processed left image with virtual projection pattern applied.
property
property
rightOut
Output ImgFrame message that carries the processed right image with virtual projection pattern applied.
property
syncedInputs
Synchronised left and right images with either disparity or depth, and optional confidence.
class
depthai.node.Gate(depthai.DeviceNode)
method
runOnHost(self) -> bool: boolCheck if the node is configured to run on the host. Returns: true if running on host, false otherwise.
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on device.
property
initialConfig
Initial config of the node.
method
property
input
Main data input. * Accepts arbitrary Buffer messages (e.g., ImgFrame, NNData). If the Gate is Open, messages received here are forwarded to 'output'. If the Gate is Closed, messages received here are discarded/dropped. * Default queue size: 1 Blocking: False
property
inputControl
Control input. * Accepts 'GateControl' messages to dynamically change the Gate's state. Use this to Open/Close the gate or set it to pass a specific number of frames at runtime. * Default queue size: 4
property
output
Main data output. * Forwards messages that were allowed through the Gate. The data type matches the input message.
class
depthai.node.BasaltVIO(depthai.node.ThreadedHostNode)
method
method
method
method
method
method
method
method
method
method
property
imu
Input IMU data.
property
property
passthrough
Output passthrough of left image.
property
property
transform
Output odometry data.
class
depthai.node.RTABMapVIO(depthai.node.ThreadedHostNode)
method
reset(self, transform: depthai.TransformData)Reset Odometry.
method
method
setParams(self, params: dict[str, str])Set RTABMap parameters.
method
setUseFeatures(self, useFeatures: bool)Whether to use input features or calculate them internally.
property
property
features
Input tracked features on which VIO is performed (optional).
property
imu
Input IMU data.
property
passthroughDepth
Passthrough depth frame.
property
passthroughFeatures
Passthrough features.
property
passthroughRect
Passthrough rectified frame.
property
property
transform
Output odometry.
class
depthai.node.RTABMapSLAM(depthai.node.ThreadedHostNode)
method
method
method
setAlphaScaling(self, alpha: float)Set the alpha scaling factor for the camera model.
method
setDatabasePath(self, path: str)Set RTABMap database path. "/tmp/rtabmap.tmp.db" by default.
method
setFreq(self, f: float)Set the frequency at which the node processes data. 1Hz by default.
method
setLoadDatabaseOnStart(self, load: bool)Whether to load the database on start. False by default.
method
method
setParams(self, params: dict[str, str])Set RTABMap parameters. For the list of all parameters visit https://github.com/introlab/rtabmap/blob/master/corelib/include/rtabmap/core/Par ameters.h
method
setPublishGrid(self, publish: bool)Whether to publish the ground point cloud. True by default.
method
setPublishGroundCloud(self, publish: bool)Whether to publish the ground point cloud. True by default.
method
setPublishObstacleCloud(self, publish: bool)Whether to publish the obstacle point cloud. True by default.
method
setSaveDatabaseOnClose(self, save: bool)Whether to save the database on close. False by default.
method
setSaveDatabasePeriod(self, period: float)Set the interval at which the database is saved. 30.0s by default.
method
setSaveDatabasePeriodically(self, save: bool)Whether to save the database periodically. False by default.
method
setUseFeatures(self, useFeatures: bool)Whether to use input features for SLAM. False by default.
method
triggerNewMap(self)Trigger a new map.
property
property
features
Input tracked features on which SLAM is performed (optional).
property
groundPCL
Output ground point cloud.
property
obstaclePCL
Output obstacle point cloud.
property
occupancyGridMap
Output occupancy grid map.
property
odom
Input odometry pose.
property
odomCorrection
Output odometry correction (map to odom).
property
passthroughDepth
Output passthrough depth image.
property
passthroughFeatures
Output passthrough features.
property
passthroughOdom
Output passthrough odometry pose.
property
passthroughRect
Output passthrough rectified image.
property
property
transform
Output transform.
class
depthai.node.DynamicCalibration(depthai.DeviceNode)
method
method
setRunOnHost(self, runOnHost: bool)Specify whether to run on host or device By default, the node will run on host on RVC2 and on device on RVC4.
property
calibrationOutput
Output calibration quality result
property
property
inputControl
Input DynamicCalibrationControl message with ability to modify parameters in runtime.
property
property
property
property
property
property
property
class
depthai.node.AutoCalibration(depthai.DeviceNode)
class
depthai.Timestamp
class
depthai.Point2f
class
depthai.Point3f
variable
variable
variable
method
class
depthai.Point3d
variable
variable
variable
method
class
depthai.Quaterniond
variable
variable
variable
variable
method
class
depthai.Size2f
class
depthai.CameraBoardSocket
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.HousingCoordinateSystem
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ExternalFrameSyncRole
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.connectionInterface
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraSensorType
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraImageOrientation
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraSensorConfig
variable
variable
variable
variable
variable
variable
method
method
class
depthai.CameraFeatures
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
class
depthai.MemoryInfo
class
depthai.ChipTemperature
variable
variable
variable
variable
variable
method
class
depthai.ChipTemperatureRVC4
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.CpuUsage
class
depthai.CameraModel
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoRectification
class
depthai.Extrinsics
variable
variable
variable
variable
variable
variable
method
method
getExtrinsicsTransformationTo(self, to: Extrinsics, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]Get the extrinsic transformation matrix from this Extrinsics to the target Extrinsics. Parameter ``to``: The target Extrinsics to get the transformation matrix to Parameter ``useSpecTranslation``: Set to true to force using spec translation Parameter ``sourceUnit``: Units of the translation vector in the source Extrinsics (this). Only relevant if useSpecTranslation is false. Returns: a transformationMatrix which is 4x4 in homogeneous coordinate system
method
getInverseRotationMatrix(self) -> list[list[float]]: list[list[float]]Get the inverse extrinsic rotation matrix in array format. Returns: 3x3 inverse rotation matrix as a 2D array
method
getInverseTransformationMatrix(self, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]Get the inverse of the extrinsic transformation matrix which is equal to the transformation from the toCameraSocket to the current camera socket. Parameter ``useSpecTranslation``: Set to true to force using spec translation Parameter ``unit``: Units of the returned translation vector Returns: a transformationMatrix which is 4x4 in homogeneous coordinate system
method
getRotationMatrix(self) -> list[list[float]]: list[list[float]]Get the extrinsic rotation matrix in array format. Returns: 3x3 rotation matrix as a 2D array
method
getTransformationMatrix(self, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]Get the Camera Extrinsics object to the toCameraSocket. Parameter ``useSpecTranslation``: Set to true to force using spec translation Parameter ``unit``: Units of the returned translation vector Returns: 4x4 homogeneous transformation matrix The returned matrix has the following layout: ``` [ r00 r01 r02 Tx ] [ r10 r11 r12 Ty ] [ r20 r21 r22 Tz ] [ 0 0 0 1 ] ``` @note The full transformation matrix can only be obtained if both the rotation matrix and the translation vector are set.
method
getTranslationVector(self, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> list[float]: list[float]Get the translation vector Parameter ``unit``: Units of the returned translation vector Returns: translation vector in specified units
method
hasCompatibleCoordinateSystem(self, to: Extrinsics) -> bool: boolCheck whether these extrinsics can be expressed relative to the same target coordinate system as another Extrinsics object. Unknown device IDs and AUTO camera sockets are treated as compatible for backwards compatibility. Parameter ``to``: The target Extrinsics object to compare with Returns: true if no known part of the target coordinate system differs, false otherwise
method
hasValidRotationMatrix(self) -> bool: boolCheck whether the rotation matrix is a finite, proper 3x3 rotation matrix. Returns: true if the rotation matrix is valid, false otherwise
method
isEqualExtrinsics(self, other: Extrinsics, epsilon: float = 9.999999974752427e-07) -> bool: boolTwo Extrinsics objects are equal if their rotation matrices and translation vectors are equal (within a small epsilon). Parameter ``other``: The other Extrinsics object to compare with Parameter ``epsilon``: The tolerance for comparing floating-point values Returns: true if the Extrinsics objects are equal, false otherwise
method
setTransformationMatrix(self, matrix: list[list[float]], unit: LengthUnit = ...)Set the extrinsic transformation matrix. Parameter ``matrix``: 4x4 homogeneous transformation matrix Parameter ``unit``: Units of the translation components Tx, Ty, and Tz The matrix must have the following layout: ``` [ r00 r01 r02 Tx ] [ r10 r11 r12 Ty ] [ r20 r21 r22 Tz ] [ 0 0 0 1 ] ```
method
setTranslationVector(self, translationVector: Point3f, unit: LengthUnit = ..., useSpecTranslation: bool = False)Set the translation vector Parameter ``translationVector``: The translation vector to set Parameter ``unit``: Units of the provided translation vector Parameter ``useSpecTranslation``: Set to true to force setting spec translation
class
depthai.MultiDeviceExtrinsics
variable
variable
variable
method
class
depthai.CameraInfo
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.EepromData
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
property
method
class
depthai.ImuNoiseParameters
variable
variable
variable
method
class
depthai.ImuCalibrationParams
variable
variable
variable
method
class
depthai.AccelerometerNoiseParams
variable
variable
variable
method
class
depthai.GyroscopeNoiseParams
variable
variable
variable
method
class
depthai.AccelAxisNoiseParams
variable
variable
variable
method
class
depthai.GyroAxisNoiseParams
variable
variable
variable
method
class
depthai.UsbSpeed
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ProcessorType
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DetectionNetworkType
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.LengthUnit
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.AngleUnit
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.YoloDecodingFamily
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.SerializationType
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DetectionParserOptions
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
class
depthai.RotatedRect
variable
variable
variable
method
method
denormalize(self, width: int, height: int, force: bool = False) -> RotatedRect: RotatedRectDenormalize the rotated rectangle. The denormalized rectangle will have center and size coordinates in range [0, width] and [0, height] Returns: Denormalized rotated rectangle
method
getOuterCXCYWH(self) -> tuple[Point2f, Size2f]: tuple[Point2f, Size2f]Returns the outer non-rotated rectangle in the YOLO (xcenter, ycenter, width, height) format. Returns: (center point, size)
method
getOuterRect(self) -> typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]Returns the outer non-rotated rectangle Returns: [minx, miny, maxx, maxy]
method
getOuterXYWH(self) -> tuple[Point2f, Size2f]: tuple[Point2f, Size2f]Returns the outer non-rotated rectangle in the COCO (xmin, ymin, width, height) format. Returns: (top-left point, size)
method
getPoints(self) -> typing.Annotated[list[Point2f], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[Point2f], pybind11_stubgen.typing_ext.FixedSize(4)]Get the 4 corner points of the rotated rectangle Returns: 4 corner points
method
method
normalize(self, width: int, height: int) -> RotatedRect: RotatedRectNormalize the rotated rectangle. The normalized rectangle will have center and size coordinates in range [0,1] Returns: Normalized rotated rectangle
class
depthai.Rect
variable
variable
variable
variable
method
method
area(self) -> float: floatArea (width*height) of the rectangle
method
bottomRight(self) -> Point2f: Point2fThe bottom-right corner
method
contains(self, point: Point2f) -> bool: boolChecks whether the rectangle contains the point.
method
denormalize(self, width: int, height: int) -> Rect: RectDenormalize rectangle. Parameter ``destWidth``: Destination frame width. Parameter ``destHeight``: Destination frame height.
method
empty(self) -> bool: boolTrue if rectangle is empty.
method
isNormalized(self) -> bool: boolWhether rectangle is normalized (coordinates in [0,1] range) or not.
method
normalize(self, width: int, height: int) -> Rect: RectNormalize rectangle. Parameter ``srcWidth``: Source frame width. Parameter ``srcHeight``: Source frame height.
method
size(self) -> Size2f: Size2fSize (width, height) of the rectangle
method
topLeft(self) -> Point2f: Point2fThe top-left corner.
class
depthai.StereoPair
variable
variable
variable
variable
method
method
class
depthai.CameraExposureOffset
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.Color
variable
variable
variable
variable
method
class
depthai.Colormap
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.FrameEvent
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ProfilingData
class
depthai.Interpolation
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DeviceModelZoo
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.Keypoint
variable
variable
variable
variable
method
class
depthai.KeypointsList
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Get the indices of the edges. Returns: Vector of edge indices.
method
getKeypoints(self) -> list[Keypoint]: list[Keypoint]Get keypoints. Returns: Vector of Keypoint objects.
method
getPoints2f(self) -> VectorPoint2f: VectorPoint2fGet only image 2D coordinates of the keypoints and drop the z axis values. Returns: Vector of Point2f coordinates.
method
getPoints3f(self) -> list[Point3f]: list[Point3f]Get only image coordinates of the keypoints. Returns: Vector of Point3f coordinates.
method
method
class
depthai.SpatialKeypoint
variable
variable
variable
variable
variable
method
class
depthai.SpatialKeypointsList
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Get the indices of the edges. Returns: Vector of edge indices.
method
getKeypoints(self) -> list[SpatialKeypoint]: list[SpatialKeypoint]Get keypoints. Returns: Vector of Keypoint objects.
method
getPoints2f(self) -> VectorPoint2f: VectorPoint2fGet only image 2D coordinates of the keypoints and drop the z axis values. Returns: Vector of Point2f coordinates.
method
getPoints3f(self) -> list[Point3f]: list[Point3f]Get only image coordinates of the keypoints. Returns: Vector of Point3f coordinates.
method
getSpatialCoordinates(self) -> list[Point3f]: list[Point3f]Get spatial coordinates of the keypoints. Returns: Vector of Point3f spatial coordinates.
method
method
method
setSpatialCoordinates(self, spatialCoordinates: list[Point3f], spatialUnit: LengthUnit = ...)Sets the keypoints from a vector of 3D spatial points. The size of spatialCoordinates must match the number of keypoints. Parameter ``spatialCoordinates``: vector of Point3f objects to set as spatial coordinates. Parameter ``spatialUnit``: The unit of the spatial coordinates. By default, spatial coordinates are in millimeters.
property
unit
Length unit used by all keypoints' `spatialCoordinates` in this list.
method
class
depthai.DatatypeEnum
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ADatatype
method
class
depthai.Buffer(depthai.ADatatype)
method
method
method
getData(self) -> numpy.ndarray[numpy.uint8]: numpy.ndarray[numpy.uint8]Get non-owning reference to internal buffer Returns: Reference to internal buffer
method
getSequenceNum(self: typing_extensions.Buffer) -> int: intRetrieves image sequence number
method
getTimestamp(self: typing_extensions.Buffer) -> datetime.timedelta: datetime.timedeltaRetrieves timestamp related to dai::Clock::now()
method
getTimestampDevice(self: typing_extensions.Buffer) -> datetime.timedelta: datetime.timedeltaRetrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
method
getTimestampSystem(self: typing_extensions.Buffer) -> datetime.datetime|None: datetime.datetime|NoneRetrieves timestamp directly captured from device's system clock, that can be synchronized using PTP
method
getVisualizationMessage(self: typing_extensions.Buffer) -> ImgAnnotations|ImgFrame|None: ImgAnnotations|ImgFrame|NoneGet visualizable message Returns: Visualizable message, either ImgFrame, ImgAnnotations or std::monostate (None)
method
setBufferMetadataFrom(self: typing_extensions.Buffer, arg0: typing_extensions.Buffer)Copies all metadata from another buffer
method
method
setSequenceNum(self: typing_extensions.Buffer, sequenceNum: int)Sets image sequence number
method
setTimestamp(self: typing_extensions.Buffer, timestamp: datetime.timedelta)Sets image timestamp related to dai::Clock::now()
method
setTimestampDevice(self: typing_extensions.Buffer, timestampDevice: datetime.timedelta)Sets image timestamp related to dai::Clock::now()
method
setTimestampSystem(self: typing_extensions.Buffer, arg0: datetime.datetime|None)Sets optional system_clock timestamp (device system clock; may be PTP- synchronized).
class
depthai.ProtoSerializable
class
depthai.Transformable
variable
method
getTransformation(self) -> ImgTransformation|None: ImgTransformation|NoneReturns the current transformation if set, else std::nullopt.
method
setTransformation(self, transformation: ImgTransformation)Sets the current transformation.
class
depthai.TransformableBuffer(depthai.Buffer, depthai.Transformable)
method
method
transformTo(self, target: ImgTransformation) -> TransformableBuffer: TransformableBufferReturns a transformed copy of this message. Python subclasses of TransformableBuffer should override this method to implement custom transformation logic. Generic callers use this entry point when they need to transform a custom message without knowing its concrete type. The base implementation throws, because it cannot preserve Python subclass state automatically. Parameter ``target``: Target image transformation.
class
depthai.AprilTagConfig(depthai.Buffer)
class
Family
Supported AprilTag families. Members: TAG_36H11 TAG_36H10 TAG_25H9 TAG_16H5 TAG_CIR21H7 TAG_STAND41H12
class
QuadThresholds
AprilTag quad threshold parameters.
method
method
method
setFamily(self, family: AprilTagConfig.Family) -> AprilTagConfig: AprilTagConfigParameter ``family``: AprilTag family
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.
method
property
family
AprilTag family.
method
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.
method
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.
method
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).
method
property
quadThresholds
AprilTag quad threshold parameters.
method
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.
method
class
depthai.AprilTagConfig.Family
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.AprilTagConfig.QuadThresholds
method
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).
method
property
deglitch
Should the thresholded image be deglitched? Only useful for very noisy images
method
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.
method
property
maxNmaxima
How many corner candidates to consider when segmenting a group of pixels into a quad.
method
property
minClusterPixels
Reject quads containing too few pixels.
method
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]).
method
class
depthai.AprilTag
method
property
bottomLeft
The detected bottom left coordinates.
method
property
bottomRight
The detected bottom right coordinates.
method
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.
method
property
hamming
How many error bits were corrected? Note: 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.
method
property
id
The decoded ID of the tag
method
property
topLeft
The detected top left coordinates.
method
property
topRight
The detected top right coordinates.
method
class
depthai.AprilTags(depthai.Buffer, depthai.Transformable)
variable
method
method
method
transformTo(self, target: ImgTransformation) -> AprilTags: AprilTagsReturns a new AprilTags message with the tags transformed into the target image transformation. If the target transformation has a different coordinate system source (eg. different camera socket) then the remapping will be inaccurate due to the lack of depth information. Parameter ``target``: Target image transformation.
class
depthai.CameraControl(depthai.Buffer)
class
Command
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 AE_MAX_ISO
class
AutoFocusMode
Members: OFF AUTO MACRO CONTINUOUS_VIDEO CONTINUOUS_PICTURE EDOF
class
AutoWhiteBalanceMode
Members: OFF AUTO INCANDESCENT FLUORESCENT WARM_FLUORESCENT DAYLIGHT CLOUDY_DAYLIGHT TWILIGHT SHADE
class
SceneMode
Members: UNSUPPORTED FACE_PRIORITY ACTION PORTRAIT LANDSCAPE NIGHT NIGHT_PORTRAIT THEATRE BEACH SNOW SUNSET STEADYPHOTO FIREWORKS SPORTS PARTY CANDLELIGHT BARCODE
class
ControlMode
Members: OFF AUTO USE_SCENE_MODE
class
CaptureIntent
Members: CUSTOM PREVIEW STILL_CAPTURE VIDEO_RECORD VIDEO_SNAPSHOT ZERO_SHUTTER_LAG
class
AntiBandingMode
Members: OFF MAINS_50_HZ MAINS_60_HZ AUTO
class
EffectMode
Members: OFF MONO NEGATIVE SOLARIZE SEPIA POSTERIZE WHITEBOARD BLACKBOARD AQUA
class
FrameSyncMode
Members: AUTO OFF OUTPUT INPUT TIME_PTP
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
clearMiscControls(self)Clear the list of miscellaneous controls set by `setControl`
method
getCaptureStill(self) -> bool: boolCheck whether command to capture a still is set Returns: True if capture still command is set
method
method
getExposureTime(self) -> datetime.timedelta: datetime.timedeltaRetrieves exposure time
method
getHdr(self) -> bool: boolWhether or not HDR (High Dynamic Range) mode is enabled Returns: True if HDR mode is enabled, false otherwise
method
getLensPosition(self) -> int: intRetrieves lens position, range 0..255. Returns -1 if not available
method
getLensPositionRaw(self) -> float: floatRetrieves lens position, range 0.0f..1.0f.
method
getMiscControls(self) -> list[tuple[str, str]]: list[tuple[str, str]]Get the list of miscellaneous controls set by `setControl` Returns: A list of <key, value> pairs as strings
method
getSensitivity(self) -> int: intRetrieves sensitivity, as an ISO value
method
setAntiBandingMode(self, mode: CameraControl.AntiBandingMode) -> CameraControl: CameraControlSet 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`
method
setAutoExposureCompensation(self, compensation: int) -> CameraControl: CameraControlSet a command to specify auto exposure compensation. This modifies the brightness target with positive numbers making the image brighter and negative numbers making the image darker. Parameter ``compensation``: Compensation value between -9..9, default 0
method
setAutoExposureEnable(self) -> CameraControl: CameraControlSet a command to enable auto exposure
method
method
setAutoExposureLock(self, lock: bool) -> CameraControl: CameraControlSet a command to stop the auto-exposure algorithm. The latest AE sensor configuration is kept. Parameter ``lock``: Auto exposure lock mode enabled or disabled
method
setAutoExposureMaxISO(self, aeMaxISO: int) -> CameraControl: CameraControlSet a command to specify the maximum ISO sensitivity limit for auto-exposure. This limits the AE algorithm from increasing sensitivity beyond a certain point and can help to reduce noise in low-light conditions. Parameter ``aeMaxISO``: Maximum ISO
method
setAutoExposureRegion(self, startX: int, startY: int, width: int, height: int) -> CameraControl: CameraControlSet 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
method
setAutoFocusLensRange(self, infinityPosition: int, macroPosition: int) -> CameraControl: CameraControlSet autofocus lens range, `infinityPosition < macroPosition`, valid values `0..255`. May help to improve autofocus in case the lens adjustment is not typical/tuned
method
setAutoFocusMode(self, mode: CameraControl.AutoFocusMode) -> CameraControl: CameraControlSet a command to specify autofocus mode. Default `CONTINUOUS_VIDEO`
method
setAutoFocusRegion(self, startX: int, startY: int, width: int, height: int) -> CameraControl: CameraControlSet 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
method
setAutoFocusTrigger(self) -> CameraControl: CameraControlSet a command to trigger autofocus
method
setAutoWhiteBalanceLock(self, lock: bool) -> CameraControl: CameraControlSet a command to specify auto white balance lock Parameter ``lock``: Auto white balance lock mode enabled or disabled
method
setAutoWhiteBalanceMode(self, mode: CameraControl.AutoWhiteBalanceMode) -> CameraControl: CameraControlSet a command to specify auto white balance mode Parameter ``mode``: Auto white balance mode to use. Default `AUTO`
method
setBrightness(self, value: int) -> CameraControl: CameraControlSet a command to adjust image brightness Parameter ``value``: Brightness, range -10..10, default 0
method
setCaptureIntent(self, mode: CameraControl.CaptureIntent) -> CameraControl: CameraControlSet a command to specify capture intent mode Parameter ``mode``: Capture intent mode
method
setCaptureStill(self, capture: bool) -> CameraControl: CameraControlSet a command to capture a still image
method
setChromaDenoise(self, value: int) -> CameraControl: CameraControlSet a command to adjust chroma denoise amount Parameter ``value``: Chroma denoise amount, range 0..4, default 1
method
method
setContrast(self, value: int) -> CameraControl: CameraControlSet a command to adjust image contrast Parameter ``value``: Contrast, range -10..10, default 0
method
setControlMode(self, mode: CameraControl.ControlMode) -> CameraControl: CameraControlSet a command to specify control mode Parameter ``mode``: Control mode
method
setEffectMode(self, mode: CameraControl.EffectMode) -> CameraControl: CameraControlSet a command to specify effect mode Parameter ``mode``: Effect mode
method
setExternalTrigger(self, numFramesBurst: int, numFramesDiscard: int) -> CameraControl: CameraControlSet 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
method
setFrameSyncMode(self, mode: CameraControl.FrameSyncMode) -> CameraControl: CameraControlSet the frame sync mode for continuous streaming operation mode, translating to how the camera pin FSIN/FSYNC is used: auto/input/output/disabled
method
setHdr(self, enable: bool) -> CameraControl: CameraControlWhether or not to enable HDR (High Dynamic Range) mode Parameter ``enable``: True to enable HDR mode, false to disable
method
setLumaDenoise(self, value: int) -> CameraControl: CameraControlSet a command to adjust luma denoise amount Parameter ``value``: Luma denoise amount, range 0..4, default 1
method
method
setManualFocus(self, lensPosition: int) -> CameraControl: CameraControlSet a command to specify manual focus position Parameter ``lensPosition``: specify lens position 0..255
method
setManualFocusRaw(self, lensPositionRaw: float) -> CameraControl: CameraControlSet a command to specify manual focus position (more precise control). Parameter ``lensPositionRaw``: specify lens position 0.0f .. 1.0f Returns: CameraControl&
method
setManualWhiteBalance(self, colorTemperatureK: int) -> CameraControl: CameraControlSet a command to manually specify white-balance color correction Parameter ``colorTemperatureK``: Light source color temperature in kelvins, range 1000..12000
method
method
setSaturation(self, value: int) -> CameraControl: CameraControlSet a command to adjust image saturation Parameter ``value``: Saturation, range -10..10, default 0
method
setSceneMode(self, mode: CameraControl.SceneMode) -> CameraControl: CameraControlSet a command to specify scene mode Parameter ``mode``: Scene mode
method
setSharpness(self, value: int) -> CameraControl: CameraControlSet a command to adjust image sharpness Parameter ``value``: Sharpness, range 0..4, default 1
method
setStartStreaming(self) -> CameraControl: CameraControlSet a command to start streaming
method
setStopStreaming(self) -> CameraControl: CameraControlSet a command to stop streaming
method
setStrobeDisable(self) -> CameraControl: CameraControlDisable STROBE output
method
setStrobeExternal(self, gpioNumber: int, activeLevel: int) -> CameraControl: CameraControlEnable 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
method
setStrobeSensor(self, activeLevel: int) -> CameraControl: CameraControlEnable STROBE output on sensor pin, optionally configuring the polarity. Note: for many sensors the polarity is high-active and not configurable
class
depthai.CameraControl.Command
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.AutoFocusMode
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.AutoWhiteBalanceMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.SceneMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.ControlMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.CaptureIntent
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.AntiBandingMode
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.EffectMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CameraControl.FrameSyncMode
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.EdgeDetectorConfigData
method
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
method
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
method
class
depthai.EdgeDetectorConfig(depthai.Buffer)
method
method
method
getConfigData(self) -> EdgeDetectorConfigData: EdgeDetectorConfigDataRetrieve configuration data for EdgeDetector Returns: EdgeDetectorConfigData: sobel filter horizontal and vertical 3x3 kernels
method
setSobelFilterKernels(self, horizontalKernel: list[list[int]], verticalKernel: list[list[int]])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
class
depthai.FeatureTrackerConfig(depthai.Buffer)
class
CornerDetector
Corner detector configuration structure.
class
MotionEstimator
Used for feature reidentification between current and previous features.
class
FeatureMaintainer
FeatureMaintainer configuration structure.
method
method
method
method
method
setHwMotionEstimation(self) -> FeatureTrackerConfig: FeatureTrackerConfigSet hardware accelerated motion estimation using block matching. Faster than optical flow (software implementation) but might not be as accurate.
method
method
setNumTargetFeatures(self, numTargetFeatures: int) -> FeatureTrackerConfig: FeatureTrackerConfigSet number of target features to detect. Parameter ``numTargetFeatures``: Number of features
method
class
depthai.FeatureTrackerConfig.CornerDetector
class
Type
Members: HARRIS SHI_THOMASI
class
Thresholds
Threshold settings structure for corner detector.
method
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.
method
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.
method
property
enableSorting
Enable sorting detected features based on their score or not.
method
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.
method
property
numTargetFeatures
Target number of features to detect. Maximum number of features is determined at runtime based on algorithm type.
method
property
thresholds
Threshold settings. These are advanced settings, suitable for debugging/special cases.
method
property
type
Corner detector algorithm type.
method
class
depthai.FeatureTrackerConfig.CornerDetector.Type
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.FeatureTrackerConfig.CornerDetector.Thresholds
method
property
decreaseFactor
When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.
method
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.
method
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.
method
property
max
Maximum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto. Empirical value.
method
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.
method
class
depthai.FeatureTrackerConfig.MotionEstimator
class
Type
Members: LUCAS_KANADE_OPTICAL_FLOW HW_MOTION_ESTIMATION
class
OpticalFlow
Optical flow configuration structure.
method
property
enable
Enable motion estimation or not.
method
property
opticalFlow
Optical flow configuration. Takes effect only if MotionEstimator algorithm type set to LUCAS_KANADE_OPTICAL_FLOW.
method
property
type
Motion estimator algorithm type.
method
class
depthai.FeatureTrackerConfig.MotionEstimator.Type
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.FeatureTrackerConfig.MotionEstimator.OpticalFlow
method
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.
method
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.
method
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.
method
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
method
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
method
class
depthai.FeatureTrackerConfig.FeatureMaintainer
method
property
enable
Enable feature maintaining or not.
method
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.
method
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.
method
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.
method
class
depthai.ThermalConfig(depthai.Buffer)
method
method
property
ambientParams
Ambient factors that affect the temperature measurement of a Thermal sensor.
method
property
ffcParams
Parameters for Flat-Field-Correction.
method
property
imageParams
Image signal processing parameters on the sensor.
method
class
depthai.ThermalImageParams
method
property
brightnessLevel
Image brightness level, 0-255.
method
property
contrastLevel
Image contrast level, 0-255.
method
property
digitalDetailEnhanceLevel
0-4 Digital etail enhance level.
method
property
orientation
Orientation of the image. Computed on the sensor.
method
property
spatialNoiseFilterLevel
0-3. Spatial noise filter level.
method
property
timeNoiseFilterLevel
0-3. Time noise filter level. Filters out the noise that appears over time.
method
class
depthai.ThermalFFCParams
variable
variable
method
property
autoFFC
Auto Flat-Field-Correction. Controls wheather the shutter is controlled by the sensor module automatically or not.
method
property
autoFFCTempThreshold
Auto FFC trigger threshold. The condition for triggering the auto FFC is that the change of Vtemp value exceeds a certain threshold, which is called the Auto FFC trigger threshold.
method
property
closeManualShutter
Set this to True/False to close/open the shutter when autoFFC is disabled.
method
property
fallProtection
The shutter blade may open/close abnormally during strong mechanical shock (such as fall), and a monitoring process is designed in the firmware to correct the abnormal shutter switch in time. Turn on or off the fall protect mechanism.
method
property
maxFFCInterval
Maximum FFC interval when auto FFC is enabled. The time interval between two FFC should not be more than this value.
method
property
minFFCInterval
Minimum FFC interval when auto FFC is enabled. The time interval between two FFC should not be less than this value.
method
property
minShutterInterval
Frequent FFC will cause shutter heating, resulting in abnormal FFC effect and abnormal temperature measurement. Regardless of which mechanism triggers FFC, the minimum trigger interval must be limited.
method
class
depthai.ThermalAmbientParams
method
property
atmosphericTemperature
Atmospheric temperature. unit:K, range:230-500(high gain), 230-900(low gain)
method
property
atmosphericTransmittance
Atmospheric transmittance. unit:1/128, range:1-128(0.01-1)
method
property
distance
Distance to the measured object. unit:cnt(128cnt=1m), range:0-25600(0-200m)
method
property
gainMode
Gain mode, low or high.
method
property
reflectionTemperature
Reflection temperature. unit:K, range:230-500(high gain), 230-900(low gain)
method
property
targetEmissivity
Emissivity. unit:1/128, range:1-128(0.01-1)
method
class
depthai.ThermalGainMode
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ToFConfig(depthai.Buffer)
class
Profile
Members: LOW_RANGE MID_RANGE HIGH_RANGE
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
setMedianFilter(self, arg0: filters.params.MedianFilter) -> ToFConfig: ToFConfigParameter ``median``: Set kernel size for median filtering, or disable
method
setProfilePreset(self, arg0: ToFConfig.Profile)Set preset mode for ToFConfig. Parameter ``presetMode``: Preset mode for ToFConfig.
property
median
Set kernel size for depth median filtering, or disable
method
class
depthai.ToFConfig.Profile
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ImageManipConfig(depthai.Buffer)
class
ResizeMode
Members: NONE LETTERBOX CENTER_CROP STRETCH
method
method
method
method
addCropRotatedRect(self, rect: RotatedRect, normalizedCoords: bool) -> ImageManipConfig: ImageManipConfigCrops the image to the specified (rotated) rectangle Parameter ``rect``: RotatedRect to crop Parameter ``normalizedCoords``: If true, the coordinates are normalized to range [0, 1] where 1 maps to the width/height of the image
method
addFlipHorizontal(self) -> ImageManipConfig: ImageManipConfigFlips the image horizontally
method
addFlipVertical(self) -> ImageManipConfig: ImageManipConfigFlips the image vertically
method
method
method
addTransformAffine(self, mat: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]) -> ImageManipConfig: ImageManipConfigApplies an affine transformation to the image Parameter ``matrix``: an array containing a 2x2 matrix representing the affine transformation
method
addTransformFourPoints(self, src: typing.Annotated[list[Point2f], pybind11_stubgen.typing_ext.FixedSize(4)], dst: typing.Annotated[list[Point2f], pybind11_stubgen.typing_ext.FixedSize(4)], normalizedCoords: bool) -> ImageManipConfig: ImageManipConfigApplies a perspective transformation to the image Parameter ``src``: Source points Parameter ``dst``: Destination points Parameter ``normalizedCoords``: If true, the coordinates are normalized to range [0, 1] where 1 maps to the width/height of the image
method
addTransformPerspective(self, mat: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(9)]) -> ImageManipConfig: ImageManipConfigApplies a perspective transformation to the image Parameter ``matrix``: an array containing a 3x3 matrix representing the perspective transformation
method
clearOps(self) -> ImageManipConfig: ImageManipConfigRemoves all operations from the list (does not affect output configuration)
method
getUndistort(self) -> bool: boolGets the undistort flag Returns: True if undistort is enabled, false otherwise
method
method
method
setFrameType(self, type: ImgFrame.Type) -> ImageManipConfig: ImageManipConfigSets the frame type of the output image Parameter ``frameType``: Frame type of the output image
method
setOutputCenter(self, c: bool) -> ImageManipConfig: ImageManipConfigCenters the content in the output image without resizing Parameter ``c``: True to center the content, false otherwise
method
setOutputSize(self, w: int, h: int, mode: ImageManipConfig.ResizeMode = ...) -> ImageManipConfig: ImageManipConfigSets the output size of the image Parameter ``w``: Width of the output image Parameter ``h``: Height of the output image Parameter ``mode``: Resize mode. NONE - no resize, STRETCH - stretch to fit, LETTERBOX - keep aspect ratio and pad with background color, CENTER_CROP - keep aspect ratio and crop
method
setReusePreviousImage(self, reuse: bool) -> ImageManipConfig: ImageManipConfigInstruct ImageManip to not remove current image from its queue and use the same for next message. Parameter ``reuse``: True to enable reuse, false otherwise
method
setSkipCurrentImage(self, skip: bool) -> ImageManipConfig: ImageManipConfigInstructs ImageManip to skip current image and wait for next in queue. Parameter ``skip``: True to skip current image, false otherwise
method
setUndistort(self, undistort: bool) -> ImageManipConfig: ImageManipConfigSets the undistort flag
class
depthai.ImageManipConfig.ResizeMode
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ImgDetections(depthai.Buffer, depthai.ProtoSerializable, depthai.Transformable)
variable
variable
variable
method
method
method
getCvSegmentationMask(self) -> numpy.ndarray|None: numpy.ndarray|NoneRetrieves mask data as a cv::Mat copy with specified width and height. If mask data is not set, returns std::nullopt. Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getCvSegmentationMaskByClass(self, semantic_class: int) -> numpy.ndarray|None: numpy.ndarray|NoneRetrieves data by the semantic class. If no mask data is not set, returns std::nullopt. Parameter ``semanticClass``: Semantic class index Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getCvSegmentationMaskByIndex(self, index: int) -> numpy.ndarray|None: numpy.ndarray|NoneReturns a binary mask where pixels belonging to the instance index are set to 1, others to 0. If mask data is not set, returns std::nullopt. Parameter ``index``: Instance index Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getMaskData(self) -> typing.Any: typing.AnyReturns a copy of the segmentation mask data as a vector of bytes. If mask data is not set, returns std::nullopt.
method
getSegmentationMask(self) -> ImgFrame|None: ImgFrame|NoneReturns the segmentation mask as an ImgFrame. If mask data is not set, returns std::nullopt.
method
getSegmentationMaskHeight(self) -> int: intReturns the height of the segmentation mask.
method
getSegmentationMaskWidth(self) -> int: intReturns the width of the segmentation mask.
method
getTransformation(self) -> ImgTransformation|None: ImgTransformation|NoneRetrieves image transformation data
method
setCvSegmentationMask(self, mask: numpy.ndarray)Copies cv::Mat data to Segmentation Mask buffer Parameter ``frame``: Input cv::Mat frame from which to copy the data @note Throws if mask is not a single channel INT8 type.
method
setSegmentationMask(self, frame: ImgFrame)Sets the segmentation mask from a vector of bytes. The size of the vector must be equal to width * height.
method
setTransformation(self, transformation: ImgTransformation|None)Specifies image transformation data Parameter ``transformation``: transformation data
method
transformTo(self, target: ImgTransformation) -> ImgDetections: ImgDetectionsReturns a new ImgDetections message with the detections transformed into the target image transformation. If the target transformation has a different source coordinate system (eg. different camera socket) than the one the detections were originally generated in, the remapping will be inaccurate due to the lack of depth information. The segmentation mask is not transformed. Use Align node to transform the segmentation mask to the target transformation if needed. Parameter ``target``: Target image transformation.
class
depthai.ImgDetection
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns a list of edges, each edge is a pair of indices, or empty list if no keypoints were set.
method
method
getKeypoints(self) -> list[Keypoint]: list[Keypoint]Returns a list of Keypoint objects, or empty list if no keypoints were set.
method
getKeypoints2f(self) -> VectorPoint2f: VectorPoint2fReturns a list of Point2f coordinates of the keypoints, or empty list if no keypoints were set.
method
getKeypoints3f(self) -> list[Point3f]: list[Point3f]Returns a list of Point3f coordinates of the keypoints, or empty list if no keypoints were set.
method
getOuterBoundingBox(self) -> typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]Returns the outer bounding box as [minx, miny, maxx, maxy].
method
method
method
method
method
method
transform(self, source: ImgTransformation, target: ImgTransformation)Transforms the detection from the source ImgTransformation to the target ImgTransformation. Parameter ``source``: Source image transformation. Parameter ``target``: Target image transformation.
class
depthai.ImgFrame(depthai.Buffer, depthai.ProtoSerializable)
class
Type
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 RAW32 NONE
class
Fsync
Members: NONE INPUT OUTPUT PTP
class
method
method
method
getBytesPerPixel(self) -> float: floatRetrieves image bytes per pixel
method
getCategory(self) -> int: intRetrieves image category
method
getColorTemperature(self) -> int: intRetrieves white-balance color temperature of the light source, in kelvins
method
getCvFrame(self) -> numpy.ndarray: numpy.ndarray@note This API only available if OpenCV support is enabled Retrieves cv::Mat suitable for use in common opencv functions. ImgFrame is converted to color BGR interleaved or grayscale depending on type. A copy is always made Returns: cv::Mat for use in opencv functions
method
getExposureTime(self) -> datetime.timedelta: datetime.timedeltaRetrieves exposure time
method
getFps(self) -> float: floatRetrieves sensor FPS for this frame.
method
getFrame(self) -> numpy.ndarray: numpy.ndarray@note This API only available if OpenCV support is enabled Retrieves data as cv::Mat with specified width, height and type Parameter ``copy``: If false only a reference to data is made, otherwise a copy Returns: cv::Mat with corresponding to ImgFrame parameters
method
getFsync(self) -> ImgFrame.Fsync: ImgFrame.FsyncRetrieves effective frame sync mode for this frame.
method
getHeight(self) -> int: intRetrieves image height in pixels
method
getInstanceNum(self) -> int: intRetrieves instance number
method
getLensPosition(self) -> int: intRetrieves lens position, range 0..255. Returns -1 if not available
method
getLensPositionRaw(self) -> float: floatRetrieves lens position, range 0.0f..1.0f. Returns -1 if not available
method
getPlaneHeight(self) -> int: intRetrieves image plane height in lines
method
getPlaneStride(self, planeIndex: int) -> int: intRetrieves image plane stride (offset to next plane) in bytes Parameter ``current``: plane index, 0 or 1
method
getSensitivity(self) -> int: intRetrieves sensitivity, as an ISO value
method
getSensorMode(self) -> int: intRetrieves selected sensor mode index for this frame.
method
getSensorTemperature(self) -> float|None: float|NoneRetrieves sensor temperature in degrees Celsius. Returns an empty optional if not available.
method
getSourceDFov(self) -> float: float@note Fov API works correctly only on rectilinear frames Get the source diagonal field of view in degrees Returns: field of view in degrees
method
getSourceHFov(self) -> float: float@note Fov API works correctly only on rectilinear frames Get the source horizontal field of view Parameter ``degrees``: field of view in degrees
method
getSourceHeight(self) -> int: intRetrieves source image height in pixels
method
getSourceVFov(self) -> float: float@note Fov API works correctly only on rectilinear frames Get the source vertical field of view Parameter ``degrees``: field of view in degrees
method
getSourceWidth(self) -> int: intRetrieves source image width in pixels
method
getStride(self) -> int: intRetrieves image line stride in bytes
method
method
method
method
getTransformation(self) -> ImgTransformation: ImgTransformationRetrieves image transformation data
method
getType(self) -> ImgFrame.Type: ImgFrame.TypeRetrieves image type
method
getWidth(self) -> int: intRetrieves image width in pixels
method
setCategory(self, category: int) -> ImgFrame: ImgFrameParameter ``category``: Image category
method
setCvFrame(self, array: numpy.ndarray, type: ImgFrame.Type) -> ImgFrame: ImgFrame@note This API only available if OpenCV support is enabled Copies cv::Mat data to the ImgFrame buffer and converts to a specific type. Parameter ``frame``: Input cv::Mat BGR frame or single channel frame from which to copy the data from. Parameter ``type``: Specifies the target image format for the internal buffer, including color space, layout, and bit depth.
method
setFrame(self, array: numpy.ndarray) -> ImgFrame: ImgFrame@note This API only available if OpenCV support is enabled Copies cv::Mat data to ImgFrame buffer Parameter ``frame``: Input cv::Mat frame from which to copy the data
method
setHeight(self, height: int) -> ImgFrame: ImgFrameSpecifies frame height Parameter ``height``: frame height
method
setInstanceNum(self, instance: int) -> ImgFrame: ImgFrameInstance number relates to the origin of the frame (which camera) Parameter ``instance``: Instance number
method
method
setStride(self, stride: int) -> ImgFrame: ImgFrameSpecifies frame stride Parameter ``stride``: frame stride
method
setTransformation(self, transformation: ImgTransformation) -> ImgFrame: ImgFrameSpecifies image transformation data Parameter ``transformation``: transformation data
method
setType(self, type: ImgFrame.Type) -> ImgFrame: ImgFrameSpecifies frame type, RGB, BGR, ... Parameter ``type``: Type of image
method
setWidth(self, width: int) -> ImgFrame: ImgFrameSpecifies frame width Parameter ``width``: frame width
method
validateTransformations(self) -> bool: boolCheck that the image transformation match the image size Returns: true if the transformations are valid
class
depthai.ImgFrame.Type
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ImgFrame.Fsync
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ImgFrame.Specs
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.ImgTransformation
method
method
method
addCrop(self, x: int, y: int, width: int, height: int) -> ImgTransformation: ImgTransformationAdd a crop transformation. Parameter ``x``: X coordinate of the top-left corner of the crop Parameter ``y``: Y coordinate of the top-left corner of the crop Parameter ``width``: Width of the crop Parameter ``height``: Height of the crop
method
addFlipHorizontal(self) -> ImgTransformation: ImgTransformationAdd a horizontal flip transformation.
method
addFlipVertical(self) -> ImgTransformation: ImgTransformationAdd a vertical flip transformation.
method
addPadding(self, x: int, y: int, width: int, height: int) -> ImgTransformation: ImgTransformationAdd a pad transformation. Works like crop, but in reverse. Parameter ``top``: Padding on the top Parameter ``bottom``: Padding on the bottom Parameter ``left``: Padding on the left Parameter ``right``: Padding on the right
method
addRotation(self, angle: float, rotationPoint: Point2f) -> ImgTransformation: ImgTransformationAdd a rotation transformation. Parameter ``angle``: Angle in degrees Parameter ``rotationPoint``: Point around which to rotate
method
addScale(self, scaleX: float, scaleY: float) -> ImgTransformation: ImgTransformationAdd a scale transformation. Parameter ``scaleX``: Scale factor in the horizontal direction Parameter ``scaleY``: Scale factor in the vertical direction
method
method
addTransformation(self, matrix: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]], pybind11_stubgen.typing_ext.FixedSize(3)]) -> ImgTransformation: ImgTransformationAdd a new transformation. Parameter ``matrix``: Transformation matrix
method
method
getDistortionCoefficients(self) -> list[float]: list[float]Retrieve the distortion coefficients of the source sensor Returns: vector of distortion coefficients
method
getDistortionModel(self) -> CameraModel: CameraModelRetrieve the distortion model of the source sensor Returns: Distortion model
method
getDstMaskPt(self, x: int, y: int) -> bool: boolReturns true if the point is inside the image region (not in the background region).
method
getExtrinsics(self) -> Extrinsics: ExtrinsicsRetrieve the pose of the source sensor or virtual camera relative to its target coordinate system. The target coordinate system is identified by Extrinsics::toDeviceId and Extrinsics::toCameraSocket. Returns: Extrinsics
method
getExtrinsicsTransformationMatrixTo(self, to: ImgTransformation, useSpecTranslation: bool = False, sourceUnit: LengthUnit = ...) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]Get the extrinsic transformation matrix from the source coordinate system of this transformation to the target coordinate system of the to transformation. Parameter ``to``: Target transformation to get extrinsics to Parameter ``useSpecTranslation``: If true, the translation vector w.r.t. the CAD design will be used instead of the translation vector obtained through calibration. Parameter ``sourceUnit``: The desired measurement unit in which to return the transformation matrix in. Returns: 4x4 homogeneous transformation matrix representing the extrinsics from this transformation to the target transformation @note Both transformations must have a compatible target device ID and a common target camera socket. Otherwise extrinsics cannot be calculated.
method
method
getIntrinsicMatrix(self) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]], pybind11_stubgen.typing_ext.FixedSize(3)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]], pybind11_stubgen.typing_ext.FixedSize(3)]Retrieve the total intrinsic matrix calculated from transform * intrinsic. Returns: total intrinsic matrix
method
getIntrinsicMatrixInv(self) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]], pybind11_stubgen.typing_ext.FixedSize(3)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(3)]], pybind11_stubgen.typing_ext.FixedSize(3)]Retrieve the inverse of the total intrinsic matrix. Returns: inverse total intrinsic matrix
method
method
method
getSize(self) -> tuple[int, int]: tuple[int, int]Retrieve the size of the frame. Should be equal to the size of the corresponding ImgFrame message. Returns: Size of the frame
method
method
method
getSourceSize(self) -> tuple[int, int]: tuple[int, int]Retrieve the size of the source frame from which this frame was derived. Returns: Size of the frame
method
method
getSrcMaskPt(self, x: int, y: int) -> bool: boolReturns true if the point is inside the transformed region of interest (determined by crops used).
method
method
method
method
invTransformPoint(self, point: Point2f) -> Point2f: Point2fTransform a point from the current frame to the source frame. Parameter ``point``: Point to transform Returns: Transformed point
method
invTransformRect(self, rect: RotatedRect) -> RotatedRect: RotatedRectTransform a rotated rect from the current frame to the source frame. Parameter ``rect``: Rectangle to transform Returns: Transformed rectangle
method
isAlignedTo(self, to: ImgTransformation) -> bool: boolCheck if the transformations are aligned Parameter ``to``: Transformation to compare with
method
isEqualTransformation(self, other: ImgTransformation) -> bool: boolTwo transformations are equal if the transformation matrices, intrinsic matrices, distortion models, distortion coefficients, extrinsics, and sizes are all equal. Parameter ``other``: Transformation to compare with Returns: True if the transformations are equal, false otherwise
method
isValid(self) -> bool: boolCheck if the transformations are valid. The transformations are valid if the source frame size and the current frame size are set.
method
project3DPoint(self, point: Point3f) -> Point2f: Point2fProject a 3D spatial point into 2D point in the current frame defined by this transformation. Parameter ``point``: 3D point to project Returns: Projected 2D point in the current frame @note This function assumes that the point is in the coordinate system of the current frame.
method
project3DPointFrom(self, from_: ImgTransformation, point: Point3f) -> Point2f: Point2fProject a 3D point from the source frame (from transformation) into a 2D point in the current frame (this transformation). Parameter ``from``: Transformation to project from Parameter ``point3f``: 3D point to project Returns: Projected 2D point in the current frame @note This function assumes that the point3f is in the coordinate system of the source frame.
method
project3DPointTo(self, to: ImgTransformation, point: Point3f) -> Point2f: Point2fProject a 3D spatial point from the source coordinate system (this transformation) into a 2D point in the target frame (to transformation). Parameter ``to``: Target transformation to project to Parameter ``point3f``: 3D point to project Returns: Projected 2D point in the target frame (to transformation) @note This function assumes that the point3f is in the coordinate system of the current frame.
method
projectPointTo(self, to: ImgTransformation, point: Point2f, depth: float) -> Point2f: Point2fProject a 2D point from the source frame defined by this transformation into a 2D point in the target frame defined by the to transformation. This function will use the depth of the point to project it into 3D space and then reproject it back to 2D in the target frame. Parameter ``to``: Target transformation to project to Parameter ``point2f``: Source 2D point in the current frame Parameter ``depth``: (mm) Depth of the point to project Returns: Projected 2D point in the target frame (to transformation)
method
rebaseExtrinsics(self, localOriginToTarget: Extrinsics) -> ImgTransformation: ImgTransformationRe-express the source extrinsics relative to a new target coordinate system. The supplied transform must map the current local calibration origin to the new target. Only the extrinsics are changed; all image-space transformation data is preserved. The rebased extrinsics translation is stored in centimeters. Parameter ``localOriginToTarget``: Transform from the current local calibration origin to the new target coordinate system. Returns: This transformation.
method
remap3DPointFrom(self, from_: ImgTransformation, point: Point3f) -> Point3f: Point3fRemap a 3D point to the coordinate system of this transformation from the source coordinate system of the from transformation. Parameter ``from``: Transformation to remap from Parameter ``point``: 3D point to remap Returns: Remapped 3D point in the current coordinate system @note This function assumes that the point is in the coordinate system of the source frame.
method
remap3DPointTo(self, to: ImgTransformation, point: Point3f) -> Point3f: Point3fRemap a 3D point from the source coordinate system of this transformation to the coordinate system of the target transformation (to transformation). Parameter ``to``: Target transformation to remap to Parameter ``point``: 3D point to remap Returns: Remapped 3D point in the target coordinate system @note This function assumes that the point is in the coordinate system of the current frame.
method
remapPointFrom(self, from_: ImgTransformation, point: Point2f) -> Point2f: Point2fRemap a point to this transformation from another. If the intrinsics are different (e.g. different camera), the function will also use the intrinsics to remap the point. Parameter ``from``: Transformation to remap from Parameter ``point``: Point to remap
method
remapPointTo(self, to: ImgTransformation, point: Point2f) -> Point2f: Point2fRemap a point from this transformation to another. If the intrinsics are different (e.g. different camera), the function will also use the intrinsics to remap the point. Parameter ``to``: Transformation to remap to Parameter ``point``: Point to remap @note This function assumes both transformations have the same source (eg. same source camera socket). If they don't, remapping will be inaccurate.
method
remapRectFrom(self, from_: ImgTransformation, rect: RotatedRect) -> RotatedRect: RotatedRectRemap a rotated rect to this transformation from another. If the intrinsics are different (e.g. different camera), the function will also use the intrinsics to remap the rect. Parameter ``from``: Transformation to remap from Parameter ``rect``: RotatedRect to remap
method
remapRectTo(self, to: ImgTransformation, rect: RotatedRect) -> RotatedRect: RotatedRectRemap a rotated rect from this transformation to another. If the intrinsics are different (e.g. different camera), the function will also use the intrinsics to remap the rect. Parameter ``to``: Transformation to remap to Parameter ``rect``: RotatedRect to remap
method
method
method
method
method
method
method
transformPoint(self, point: Point2f) -> Point2f: Point2fTransform a point from the source frame to the current frame. Parameter ``point``: Point to transform Returns: Transformed point
method
transformRect(self, rect: RotatedRect) -> RotatedRect: RotatedRectTransform a rotated rect from the source frame to the current frame. Parameter ``rect``: Rectangle to transform Returns: Transformed rectangle
class
depthai.EncodedFrame(depthai.Buffer, depthai.ProtoSerializable)
class
Profile
Members: JPEG AVC HEVC
class
FrameType
Members: I P B Unknown
method
method
method
getBitrate(self) -> int: intRetrieves the encoding bitrate
method
getColorTemperature(self) -> int: intRetrieves white-balance color temperature of the light source, in kelvins
method
getExposureTime(self) -> datetime.timedelta: datetime.timedeltaRetrieves exposure time
method
getFps(self) -> float: floatRetrieves sensor FPS for this frame.
method
getFrameType(self) -> EncodedFrame.FrameType: EncodedFrame.FrameTypeRetrieves frame type (H26x only)
method
getFsync(self) -> ImgFrame.Fsync: ImgFrame.FsyncRetrieves effective frame sync mode for this frame.
method
getHeight(self) -> int: intRetrieves image height in pixels
method
getInstanceNum(self) -> int: intRetrieves instance number
method
getLensPosition(self) -> int: intRetrieves lens position, range 0..255. Returns -1 if not available
method
getLensPositionRaw(self) -> float: floatRetrieves lens position, range 0.0f..1.0f. Returns -1 if not available
method
getLossless(self) -> bool: boolReturns true if encoding is lossless (JPEG only)
method
getProfile(self) -> EncodedFrame.Profile: EncodedFrame.ProfileRetrieves the encoding profile (JPEG, AVC or HEVC)
method
getQuality(self) -> int: intRetrieves the encoding quality
method
getSensitivity(self) -> int: intRetrieves sensitivity, as an ISO value
method
getSensorMode(self) -> int: intRetrieves selected sensor mode index for this frame.
method
getSensorTemperature(self) -> float|None: float|NoneRetrieves sensor temperature in degrees Celsius. Returns an empty optional if not available.
method
method
getWidth(self) -> int: intRetrieves image width in pixels
method
setBitrate(self, arg0: int) -> EncodedFrame: EncodedFrameRetrieves the encoding bitrate
method
setFrameType(self, arg0: EncodedFrame.FrameType) -> EncodedFrame: EncodedFrameRetrieves frame type (H26x only)
method
setHeight(self, height: int) -> EncodedFrame: EncodedFrameSpecifies frame height Parameter ``height``: frame height
method
setLossless(self, arg0: bool) -> EncodedFrame: EncodedFrameReturns true if encoding is lossless (JPEG only)
method
setProfile(self, arg0: EncodedFrame.Profile) -> EncodedFrame: EncodedFrameRetrieves the encoding profile (JPEG, AVC or HEVC)
method
setQuality(self, arg0: int) -> EncodedFrame: EncodedFrameRetrieves the encoding quality
method
method
method
setWidth(self, width: int) -> EncodedFrame: EncodedFrameSpecifies frame width Parameter ``width``: frame width
class
depthai.EncodedFrame.Profile
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.EncodedFrame.FrameType
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.IMUReport
class
Accuracy
Members: UNRELIABLE LOW MEDIUM HIGH
variable
variable
variable
variable
method
method
getSequenceNum(self) -> int: intRetrieves IMU report sequence number
method
getTimestamp(self) -> datetime.timedelta: datetime.timedeltaRetrieves timestamp related to dai::Clock::now()
method
getTimestampDevice(self) -> datetime.timedelta: datetime.timedeltaRetrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
method
getTimestampSystem(self) -> datetime.datetime|None: datetime.datetime|NoneRetrieves timestamp directly captured from device's system clock, can be synchronized with PTP
class
depthai.IMUReport.Accuracy
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.IMUReportAccelerometer(depthai.IMUReport)
class
depthai.IMUReportGyroscope(depthai.IMUReport)
class
depthai.IMUReportMagneticField(depthai.IMUReport)
class
depthai.IMUReportRotationVectorWAcc(depthai.IMUReport)
variable
variable
variable
variable
variable
method
class
depthai.IMUPacket
class
depthai.IMUData(depthai.Buffer, depthai.ProtoSerializable)
class
depthai.MessageGroup(depthai.Buffer)
method
method
method
method
method
method
getIntervalNs(self) -> int: intRetrieves interval between the first and the last message in the group, measured with the timestamp source that produced the group.
method
getMessageNames(self) -> list[str]: list[str]Gets the names of messages in the group
method
method
getTimestampSource(self) -> SyncProperties.TimestampSource: SyncProperties.TimestampSourceGet the timestamp source this group was synced with.
method
isSynced(self, thresholdNs: int) -> bool: boolTrue if all messages in the group are in the interval Parameter ``thresholdNs``: Maximal interval between messages
method
setTimestampSource(self, source: SyncProperties.TimestampSource)Set the timestamp source this group was synced with. Used by the host Sync node; groups received from a device keep the DEVICE default.
class
depthai.TensorInfo
class
DataType
Members: FP16 U8F U16F INT FP32 I8 FP64
class
StorageOrder
Members: NHWC NHCW NCHW HWC CHW WHC HCW WCH CWH NC CN C H W
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
class
depthai.TensorInfo.DataType
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.TensorInfo.StorageOrder
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NNData(depthai.Buffer, depthai.ProtoSerializable)
method
method
method
method
getAllLayerNames(self) -> list[str]: list[str]Returns: Names of all layers added
method
getAllLayers(self) -> list[TensorInfo]: list[TensorInfo]Returns: All layers and their information
method
method
getLayerDatatype(self, name: str, datatype: TensorInfo.DataType) -> bool: boolRetrieve datatype of a layers tensor Parameter ``name``: Name of the layer Parameter ``datatype``: Datatype of layers tensor Returns: True if layer exists, false otherwise
method
method
getTensorDatatype(self, name: str) -> TensorInfo.DataType: TensorInfo.DataTypeGet the datatype of a given tensor Returns: TensorInfo::DataType tensor datatype
method
getTensorInfo(self, name: str) -> TensorInfo|None: TensorInfo|NoneRetrieve tensor information Parameter ``name``: Name of the tensor Returns: Tensor information
method
method
hasLayer(self, name: str) -> bool: boolChecks if given layer exists Parameter ``name``: Name of the layer Returns: True if layer exists, false otherwise
method
setTransformation(self, transformation: ImgTransformation|None)Specifies image transformation data Parameter ``transformation``: transformation data
class
depthai.NeuralDepthConfig(depthai.Buffer)
class
method
method
method
getConfidenceThreshold(self) -> int: intGet confidence threshold for disparity calculation
method
getCustomDepthUnitMultiplier(self) -> float: floatGet custom depth unit multiplier relative to 1 meter.
method
getDepthUnit(self) -> LengthUnit: LengthUnitGet depth unit of depth map.
method
getEdgeThreshold(self) -> int: intGet edge threshold for disparity calculation
method
setConfidenceThreshold(self, confidenceThreshold: int) -> NeuralDepthConfig: NeuralDepthConfigConfidence threshold for disparity calculation Parameter ``confThr``: Confidence threshold value 0..255
method
setCustomDepthUnitMultiplier(self, customDepthUnitMultiplier: float) -> NeuralDepthConfig: NeuralDepthConfigSet custom depth unit multiplier relative to 1 meter.
method
setDepthUnit(self, depthUnit: LengthUnit) -> NeuralDepthConfig: NeuralDepthConfigSet depth unit of depth map.
method
setEdgeThreshold(self, edgeThreshold: int) -> NeuralDepthConfig: NeuralDepthConfigSet edge threshold for disparity calculation Parameter ``edgeThr``: Edge threshold value 0..255
property
postProcessing
Controls the postprocessing of disparity and/or depth map.
method
class
depthai.NeuralDepthConfig.PostProcessing
class
TemporalFilter
Temporal filtering with optional persistence.
class
ThresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
method
property
confidenceThreshold
Confidence threshold for disparity calculation, Confidences above this value will be considered valid. Valid range is [0,255].
method
property
edgeThreshold
Edge threshold for disparity calculation, Pixels with edge magnitude below this value will be considered invalid. Valid range is [0,255].
method
property
temporalFilter
Temporal filtering with optional persistence.
method
property
thresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
method
class
depthai.NeuralDepthConfig.PostProcessing.TemporalFilter
class
PersistencyMode
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 :
method
method
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.
method
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.
method
property
enable
Whether to enable or disable the filter.
method
property
persistencyMode
Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
method
class
depthai.NeuralDepthConfig.PostProcessing.TemporalFilter.PersistencyMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.GPUStereoConfig(depthai.Buffer)
method
method
method
getConfidenceThreshold(self) -> int: intGet the confidence threshold for disparity filtering.
method
setConfidenceThreshold(self, threshold: int) -> GPUStereoConfig: GPUStereoConfigSet the confidence threshold for disparity filtering. Pixels with a matching cost above this threshold are invalidated. Parameter ``threshold``: Value in range [0, 255]. 0 disables the filter. Values outside the range are clamped.
property
confidenceThreshold
Confidence threshold for disparity filtering. Value in range [0, 255]. 0 disables the filter.
method
class
depthai.SpatialImgDetection
variable
variable
variable
variable
variable
variable
method
method
method
getAngle(self) -> float: floatReturns the angle of the bounding box.
method
getBoundingBox(self) -> RotatedRect: RotatedRectReturns bounding box if it was set, else it constructs a new one from the legacy xmin, ymin, xmax, ymax values.
method
getCenterX(self) -> float: floatReturns the X coordinate of the center of the bounding box.
method
getCenterY(self) -> float: floatReturns the Y coordinate of the center of the bounding box.
method
getEdges(self) -> list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]]Returns a list of edges, each edge is a pair of indices, or empty list if no keypoints were set.
method
getHeight(self) -> float: floatReturns the height of the (rotated) bounding box.
method
getImgDetection(self) -> ImgDetection: ImgDetectionConverts SpatialImgDetection to ImgDetection by dropping spatial data. Returns: dai::ImgDetection object.
method
getKeypointSpatialCoordinates(self) -> list[Point3f]: list[Point3f]Returns a list of spatial coordinates for each keypoint, or empty list if no keypoints were set.
method
getKeypoints(self) -> list[SpatialKeypoint]: list[SpatialKeypoint]Returns a list of Keypoint objects, or empty list if no keypoints were set.
method
getWidth(self) -> float: floatReturns the width of the (rotated) bounding box.
method
setBoundingBox(self, boundingBox: RotatedRect)Sets the bounding box and the legacy coordinates of the detection.
method
setEdges(self, edges: list[typing.Annotated[list[int], pybind11_stubgen.typing_ext.FixedSize(2)]])Sets edges for the keypoints, throws if no keypoints were set beforehand.
method
method
setOuterBoundingBox(self, xmin: float, ymin: float, xmax: float, ymax: float)Sets the bounding box and the legacy coordinates of the detection from the top- left and bottom-right points.
method
setSpatialCoordinate(self, spatialCoordinates: Point3f)Sets spatial coordinates for the detection. Parameter ``spatialCoordinates``: list of Point3f objects to set. @note The size of spatialCoordinates.
property
xmax
Deprecation warning: use boundingBox instead
method
property
xmin
Deprecation warning: use boundingBox instead
method
property
ymax
Deprecation warning: use boundingBox instead
method
property
ymin
Deprecation warning: use boundingBox instead
method
class
depthai.SpatialImgDetections(depthai.Buffer, depthai.ProtoSerializable, depthai.Transformable)
variable
method
method
method
getCvSegmentationMask(self) -> numpy.ndarray|None: numpy.ndarray|NoneRetrieves mask data as a cv::Mat copy with specified width and height. If mask data is not set, returns std::nullopt. Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getCvSegmentationMaskByClass(self, semantic_class: int) -> numpy.ndarray|None: numpy.ndarray|NoneRetrieves data by the semantic class. If no mask data is not set, returns std::nullopt. Parameter ``semanticClass``: Semantic class index Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getCvSegmentationMaskByIndex(self, index: int) -> numpy.ndarray|None: numpy.ndarray|NoneReturns a binary mask where pixels belonging to the instance index are set to 1, others to 0. If mask data is not set, returns std::nullopt. Parameter ``index``: Instance index Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getMaskData(self) -> typing.Any: typing.AnyReturns a copy of the segmentation mask data as a vector of bytes. If mask data is not set, returns std::nullopt.
method
getSegmentationMask(self) -> ImgFrame|None: ImgFrame|NoneReturns the segmentation mask as an ImgFrame. If mask data is not set, returns std::nullopt.
method
getSegmentationMaskHeight(self) -> int: intReturns the height of the segmentation mask.
method
getSegmentationMaskWidth(self) -> int: intReturns the width of the segmentation mask.
method
method
setCvSegmentationMask(self, mask: numpy.ndarray)Copies cv::Mat data to Segmentation Mask buffer Parameter ``frame``: Input cv::Mat frame from which to copy the data @note Throws if mask is not a single channel INT8 type.
method
setSegmentationMask(self, frame: ImgFrame)Sets the segmentation mask from a vector of bytes. The size of the vector must be equal to width * height.
method
method
transformTo(self, target: ImgTransformation) -> SpatialImgDetections: SpatialImgDetectionsReturns a new SpatialImgDetections message with the spatial detections transformed into the target image transformation. For each detection, the bounding box is assumed to lie on a plane parallel to the image plane at depth `detection.spatialCoordinates.z` (that is, all four bounding-box corners are projected using the same depth value). The transformed corners are then fit with the smallest enclosing rotated rectangle to preserve rectangularity. Parameter ``target``: Target image transformation. Returns: SpatialImgDetections with transformed detections.
property
unit
Length unit used by all imgDetections' `spatialCoordinates` in this list.
method
class
depthai.DetectionParserConfig(depthai.Buffer)
method
method
method
getConfidenceThreshold(self) -> float: floatGet the minimum detection confidence.
method
getIouThreshold(self) -> float: floatGet the IoU threshold for non-maximum suppression.
method
setConfidenceThreshold(self, threshold: float)Set the minimum detection confidence.
method
setIouThreshold(self, threshold: float)Set the IoU threshold for non-maximum suppression.
property
confidenceThreshold
Minimum detection confidence. Default matches DetectionParser's startup threshold.
method
property
iouThreshold
IoU threshold for YOLO non-maximum suppression. Not used by Mobilenet-SSD or end-to-end YOLO models.
method
class
depthai.SegmentationParserConfig(depthai.Buffer)
variable
variable
method
method
method
getConfidenceThreshold(self) -> float: floatGet confidence threshold
method
getStepSize(self) -> int: intGets the step size for segmentation parsing.
method
setConfidenceThreshold(self, threshold: float)Add a confidence threshold to the argmax operation over the segmentation tensor. Pixels with confidence values below this threshold will be assigned the background class (255). Parameter ``threshold``: Confidence threshold for segmentation parsing @note Default is -1.0f, which means no thresholding is applied. @note Only applicable if output classes are not in a single layer (eg. classesInOneLayer = false).
method
setStepSize(self, stepSize: int)Sets the step size for segmentation parsing. A step size of 1 means every pixel is processed, a step size of 2 means every second pixel is processed, and so on. This can be used to speed up processing at the cost of lower resolution masks. Parameter ``stepSize``: Step size for segmentation parsing
class
depthai.SegmentationMask(depthai.Buffer, depthai.ProtoSerializable, depthai.Transformable)
method
method
method
getArea(self, index: int) -> int|None: int|NoneReturns the area (number of pixels) of the specified instance/class index in the segmentation mask. Parameter ``index``: Instance/Class index @note If index is not present in the mask, returns std::nullopt.
method
getBoundingBoxes(self, index: int, calculateRotation: bool = False) -> list[RotatedRect]: list[RotatedRect]Returns a bounding box for each continuous region with the specified index. Parameter ``index``: class index Parameter ``calculateRotation``: If true, returns rotated bounding boxes, otherwise returns the outer, axis- aligned bounding boxes.
method
getCentroid(self, index: int) -> Point2f|None: Point2f|NoneReturns the normalized centroid (x,y) coordinates of the specified instance/class index in the segmentation mask. Parameter ``index``: Instance/Class index @note If index is not present in the mask, returns std::nullopt.
method
getContour(self, index: int) -> list[VectorPoint2f]: list[VectorPoint2f]Calls the opencv findContours function and filters the results based on the provided index. Returns filtered contour as a vector of vectors of non- normalized points. If mask data is not set, returns an empty vector. Parameter ``index``: class index
method
getCvMask(self) -> numpy.ndarray: numpy.ndarrayRetrieves mask data as a cv::Mat copy with specified width and height. If mask data is not set, returns an empty matrix. Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getCvMaskByIndex(self, index: int) -> numpy.ndarray: numpy.ndarrayReturns a binary mask where pixels belonging to the instance index are set to 1, others to 0. If mask data is not set, returns an empty matrix. Parameter ``index``: Instance index Parameter ``allocator``: Allows callers to supply a custom cv::MatAllocator for zero-copy/custom memory management; nullptr uses OpenCV’s default.
method
getFrame(self) -> ImgFrame: ImgFrameReturns the segmentation mask as an ImgFrame. If mask data is not set, returns an empty frame with only metadata set.
method
getHeight(self) -> int: intReturns the height of the segmentation mask.
method
getLabels(self) -> list[str]: list[str]Returns all class labels associated with the segmentation mask. If no labels are set, returns an empty vector.
method
getMaskByIndex(self, index: int) -> numpy.ndarray[numpy.uint8]: numpy.ndarray[numpy.uint8]Returns a binary mask where pixels belonging to the specified instance/class index are set to 1, others to 0. If mask data is not set, returns an empty vector.
method
getMaskByLabel(self, label: str) -> numpy.ndarray[numpy.uint8]: numpy.ndarray[numpy.uint8]Returns a binary mask where pixels belonging to the specified class label are set to 1, others to 0. If labels are not set or label not found, returns an empty vector.
method
getMaskData(self) -> numpy.ndarray[numpy.uint8]: numpy.ndarray[numpy.uint8]Returns a copy of the segmentation mask data as a vector of bytes. If mask data is not set, returns an empty vector.
method
getTransformation(self) -> ImgTransformation|None: ImgTransformation|NoneRetrieves image transformation data
method
method
getWidth(self) -> int: intReturns the width of the segmentation mask.
method
hasValidMask(self) -> bool: boolReturns true if the mask data is not empty and has valid size (width * height).
method
setCvMask(self, mask: numpy.ndarray)Copies cv::Mat data to Segmentation Mask buffer Parameter ``frame``: Input cv::Mat frame from which to copy the data @note Throws if mask is not a single channel INT8 type.
method
setLabels(self, labels: list[str])Sets the class labels associated with the segmentation mask. The label at index `i` in the `labels` vector corresponds to the value `i` in the segmentation mask data array. Parameter ``labels``: Vector of class labels
method
method
setTransformation(self, transformation: ImgTransformation)Specifies image transformation data Parameter ``transformation``: transformation data
method
transformTo(self, target: ImgTransformation) -> SegmentationMask: SegmentationMaskReturns a copy of this segmentation mask. Segmentation mask remapping is not implemented. For optimal performance, segmentation masks should be generated from already aligned source messages instead of being transformed after the fact. Use Align on the source inputs to align segmentation masks. Parameter ``target``: Target image transformation.
class
depthai.SpatialLocationCalculatorConfigThresholds
class
depthai.SpatialLocationCalculatorAlgorithm
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.SpatialLocationCalculatorConfigData
method
property
calculationAlgorithm
Calculation method used to obtain spatial locations Average/mean: 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.
method
property
depthThresholds
Upper and lower thresholds for depth values to take into consideration.
method
property
roi
Region of interest for spatial location calculation.
method
class
depthai.SpatialLocationCalculatorConfig(depthai.Buffer)
variable
variable
variable
variable
variable
method
method
method
addROI(self, ROI: SpatialLocationCalculatorConfigData)Add a new region of interest (ROI) to configuration data. Parameter ``roi``: Configuration parameters for ROI
method
getBoundingBoxScaleFactor(self) -> float: floatRetrieve scale factor for bounding boxes used in spatial calculations.
method
getCalculateSpatialKeypoints(self) -> bool: boolRetrieve whether keypoints are used for spatial location calculation. $.. warning:: Only applicable to ImgDetections with keypoints.
method
method
getConfigData(self) -> list[SpatialLocationCalculatorConfigData]: list[SpatialLocationCalculatorConfigData]Retrieve configuration data for SpatialLocationCalculator Returns: Vector of configuration parameters for ROIs (region of interests)
method
method
getKeypointRadius(self) -> int: intRetrieve radius around keypoints used to calculate spatial coordinates.
method
getSegmentationPassthrough(self) -> bool: boolRetrieve whether segmentation is passed through along with spatial detections. $.. warning:: Only applicable to ImgDetections with segmentation masks.
method
method
getUseSegmentation(self) -> bool: boolRetrieve whether segmentation is used for spatial location calculation. $.. warning:: Only applicable to ImgDetections with segmentation masks.
method
setBoundingBoxScaleFactor(self, arg0: float)Set scale factor for bounding boxes used in spatial calculations. Parameter ``scaleFactor``: Scale factor must be in the interval (0,1].
method
setCalculateSpatialKeypoints(self, arg0: bool)If false, spatial coordinates of keypoints will not be calculated. Parameter ``calculateSpatialKeypoints``: $.. warning:: Only applicable to ImgDetections with keypoints.
method
setCalculationAlgorithm(self, arg0: SpatialLocationCalculatorAlgorithm)Set spatial location calculation algorithm. Possible values: - MEDIAN: Median of all depth values in the ROI - AVERAGE: Average of all depth values in the ROI - MIN: Minimum depth value in the ROI - MAX: Maximum depth value in the ROI - MODE: Most frequent depth value in the ROI
method
setDepthThresholds(self, arg0: int, arg1: int)Set the lower and upper depth value thresholds to be used in the spatial calculations. Parameter ``lowerThreshold``: Lower threshold in depth units (millimeter by default). Parameter ``upperThreshold``: Upper threshold in depth units (millimeter by default).
method
setKeypointRadius(self, arg0: int)Set radius around keypoints to calculate spatial coordinates. Parameter ``radius``: Radius in pixels. $.. warning:: Only applicable to Keypoints or ImgDetections with keypoints.
method
setROIs(self, ROIs: list[SpatialLocationCalculatorConfigData])Specify additional regions of interest (ROI) to calculate their spatial coordinates. Results of ROI coordinates are available on SpatialLocationCalculatorData output. Parameter ``ROIs``: Vector of configuration parameters for ROIs (region of interests)
method
setSegmentationPassthrough(self, arg0: bool)Specify whether to passthrough segmentation mask along with spatial detections. Parameter ``passthroughSegmentation``: $.. warning:: Only applicable to ImgDetections with segmentation masks.
method
setStepSize(self, arg0: int)Set step size for spatial location calculation. Step size 1 means that every pixel is taken into calculation, size 2 means every second etc. for AVERAGE, MIN, MAX step size is 1; for MODE/MEDIAN it's 2.
method
setUseSegmentation(self, arg0: bool)Specify whether to consider only segmented pixels within a detection bounding box for spatial calculations. Parameter ``useSegmentation``: $.. warning:: Only applicable to ImgDetections with segmentation masks.
class
depthai.SpatialLocationCalculatorData(depthai.Buffer)
variable
method
method
method
getSpatialLocations(self) -> list[SpatialLocations]: list[SpatialLocations]Retrieve configuration data for SpatialLocationCalculatorData. Returns: Vector of spatial location data, carrying spatial information (X,Y,Z)
class
depthai.SpatialLocations
method
property
config
Configuration for selected ROI
method
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.
method
property
depthAveragePixelCount
Number of depth values used in calculations.
method
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.
method
property
depthMedian
Median of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to MEDIAN.
method
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.
method
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.
method
property
spatialCoordinates
Spatial coordinates - x,y,z; x,y are the relative positions of the center of ROI to the center of depth map
method
class
depthai.StereoDepthConfig(depthai.Buffer)
class
ConfidenceMetrics
Confidence metrics settings. RVC4 only.
class
class
PostProcessing
Post-processing filters, all the filters are applied in disparity domain.
class
CostAggregation
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.
class
CostMatching
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.
class
CensusTransform
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).
class
MedianFilter
Members: MEDIAN_OFF KERNEL_3x3 KERNEL_5x5 KERNEL_7x7
method
method
method
getBilateralFilterSigma(self) -> int: intGet sigma value for 5x5 bilateral filter
method
getConfidenceThreshold(self) -> int: intGet confidence threshold for disparity calculation
method
getCustomDepthUnitMultiplier(self) -> float: floatGet custom depth unit multiplier relative to 1 meter.
method
getDepthUnit(self) -> LengthUnit: LengthUnitGet depth unit of depth map.
method
getExtendedDisparity(self) -> bool: boolGet extended disparity setting
method
getFiltersComputeBackend(self) -> ProcessorType: ProcessorTypeGet filters compute backend RVC4 only.
method
getLeftRightCheck(self) -> bool: boolGet left-right check setting
method
getLeftRightCheckThreshold(self) -> int: intGet threshold for left-right check combine
method
getMaxDisparity(self) -> float: floatUseful for normalization of the disparity map. Returns: Maximum disparity value that the node can return
method
getMedianFilter(self) -> filters.params.MedianFilter: filters.params.MedianFilterGet median filter setting
method
getSubpixel(self) -> bool: boolGet subpixel setting
method
getSubpixelFractionalBits(self) -> int: intGet number of fractional bits for subpixel mode
method
setBilateralFilterSigma(self, sigma: int) -> StereoDepthConfig: StereoDepthConfigA 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
method
setConfidenceThreshold(self, confThr: int) -> StereoDepthConfig: StereoDepthConfigConfidence threshold for disparity calculation Parameter ``confThr``: Confidence threshold value 0..255
method
setCustomDepthUnitMultiplier(self, arg0: float) -> StereoDepthConfig: StereoDepthConfigSet custom depth unit multiplier relative to 1 meter.
method
setDepthAlign(self, align: StereoDepthConfig.AlgorithmControl.DepthAlign) -> StereoDepthConfig: StereoDepthConfigParameter ``align``: Set the disparity/depth alignment: centered (between the 'left' and 'right' inputs), or from the perspective of a rectified output stream
method
setDepthUnit(self, arg0: LengthUnit) -> StereoDepthConfig: StereoDepthConfigSet depth unit of depth map. Meter, centimeter, millimeter, inch, foot or custom unit is available.
method
setDisparityShift(self, arg0: int) -> StereoDepthConfig: StereoDepthConfigShift 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.
method
setExtendedDisparity(self, enable: bool) -> StereoDepthConfig: StereoDepthConfigDisparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
method
setFiltersComputeBackend(self, filtersBackend: ProcessorType) -> StereoDepthConfig: StereoDepthConfigSet filters compute backend RVC4 only.
method
setLeftRightCheck(self, enable: bool) -> StereoDepthConfig: StereoDepthConfigComputes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling, discarding invalid disparity values
method
setLeftRightCheckThreshold(self, sigma: int) -> StereoDepthConfig: StereoDepthConfigParameter ``threshold``: Set threshold for left-right, right-left disparity map combine, 0..255
method
setMedianFilter(self, median: filters.params.MedianFilter) -> StereoDepthConfig: StereoDepthConfigParameter ``median``: Set kernel size for disparity/depth median filtering, or disable
method
setNumInvalidateEdgePixels(self, arg0: int) -> StereoDepthConfig: StereoDepthConfigInvalidate 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.
method
setSubpixel(self, enable: bool) -> StereoDepthConfig: StereoDepthConfigComputes disparity with sub-pixel interpolation (3 fractional bits by default). Suitable for long range. Currently incompatible with extended disparity
method
setSubpixelFractionalBits(self, subpixelFractionalBits: int) -> StereoDepthConfig: StereoDepthConfigNumber 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
algorithmControl
Controls the flow of stereo algorithm - left-right check, subpixel etc.
method
property
censusTransform
Census transform settings.
method
property
confidenceMetrics
Confidence metrics settings. RVC4 only.
method
property
costAggregation
Cost aggregation settings.
method
property
costMatching
Cost matching settings.
method
property
postProcessing
Controls the postprocessing of disparity and/or depth map.
method
class
depthai.StereoDepthConfig.ConfidenceMetrics
method
property
flatnessConfidenceThreshold
Threshold for flatness check in SGM block. Valid range is [1,7].
method
property
flatnessConfidenceWeight
Weight used with flatness estimation to generate final confidence map. Valid range is [0,32].
method
property
flatnessOverride
Flag to indicate whether final confidence value will be overidden by flatness value. Valid range is {true,false}.method
property
motionVectorConfidenceThreshold
Threshold offset for MV variance in confidence generation. A value of 0 allows most variance. Valid range is [0,3].
method
property
motionVectorConfidenceWeight
Weight used with local neighborhood motion vector variance estimation to generate final confidence map. Valid range is [0,32].
method
property
occlusionConfidenceWeight
Weight used with occlusion estimation to generate final confidence map. Valid range is [0,32]
method
class
depthai.StereoDepthConfig.AlgorithmControl
class
DepthAlign
Align the disparity/depth to the perspective of a rectified output, or center it Members: AUTO RECTIFIED_RIGHT : RECTIFIED_LEFT : CENTER : RIGHT LEFT
variable
method
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.
method
property
depthAlign
Set the disparity/depth alignment to the perspective of a rectified output, or center it
method
property
depthUnit
Measurement unit for depth data. Depth data is integer value, multiple of depth unit.
method
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. RVC2 only.
method
property
enableExtended
Disparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
method
property
enableLeftRightCheck
Computes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling
method
property
enableSubpixel
Computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range RVC2 only.
method
property
enableSwLeftRightCheck
Enables software left right check. RVC4 only.
method
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
method
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. RVC2 only.
method
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 RVC2 only.
method
class
depthai.StereoDepthConfig.AlgorithmControl.DepthAlign
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.PostProcessing
class
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.
class
DecimationFilter
Decimation filter. Reduces the depth scene complexity. The filter runs on kernel sizes [2x2] to [8x8] pixels.
class
HoleFilling
Hole-filling configuration. RVC4 only.
class
AdaptiveMedianFilter
Adaptive median filter configuration. RVC4 only.
class
Filter
Members: NONE : DECIMATION : SPECKLE : MEDIAN : SPATIAL : TEMPORAL :
class
MedianFilter
Members: MEDIAN_OFF KERNEL_3x3 KERNEL_5x5 KERNEL_7x7
class
class
TemporalFilter
Temporal filtering with optional persistence.
class
ThresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
class
method
property
adaptiveMedianFilter
Adaptive median filter configuration. RVC4 only.
method
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. RVC2 only.
method
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.
method
property
decimationFilter
Decimation filter. Reduces disparity/depth map x/y complexity, reducing runtime complexity for other filters.
method
property
filteringOrder
Order of filters to be applied if filtering is enabled.
method
property
holeFilling
Hole-filling configuration. RVC4 only.
method
property
median
Set kernel size for disparity/depth median filtering, or disable
method
property
spatialFilter
Edge-preserving filtering: This type of filter will smooth the depth noise while attempting to preserve edges.
method
property
speckleFilter
Speckle filtering. Removes speckle noise.
method
property
temporalFilter
Temporal filtering with optional persistence.
method
property
thresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
method
class
depthai.StereoDepthConfig.PostProcessing.BrightnessFilter
method
property
maxBrightness
Maximum range in depth units. If input pixel is less or equal than this value the depth value is invalidated.
method
property
minBrightness
Minimum pixel brightness. If input pixel is less or equal than this value the depth value is invalidated.
method
class
depthai.StereoDepthConfig.PostProcessing.DecimationFilter
class
DecimationMode
Decimation algorithm type. Members: PIXEL_SKIPPING : NON_ZERO_MEDIAN : NON_ZERO_MEAN :
method
property
decimationFactor
Decimation factor. Valid values are 1,2,3,4. Disparity/depth map x/y resolution will be decimated with this value.
method
property
decimationMode
Decimation algorithm type.
method
class
depthai.StereoDepthConfig.PostProcessing.DecimationFilter.DecimationMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.PostProcessing.HoleFilling
method
property
enable
Flag to enable post-processing hole-filling.
method
property
fillConfidenceThreshold
Pixels with confidence below this value will be filled with the average disparity of their corresponding superpixel. Valid range is [1,255].
method
property
highConfidenceThreshold
Pixels with confidence higher than this value are used to calculate an average disparity per superpixel. Valid range is [1,255]
method
property
invalidateDisparities
If enabled, sets to 0 the disparity of pixels with confidence below nFillConfThresh, which did not pass nMinValidPixels criteria. Valid range is {true, false}.method
property
minValidDisparity
Represents the required percentange of pixels with confidence value above nHighConfThresh that are used to calculate average disparity per superpixel, where 1 means 50% or half, 2 means 25% or a quarter and 3 means 12.5% or an eighth. If the required number of pixels are not found, the holes will not be filled.
method
class
depthai.StereoDepthConfig.PostProcessing.AdaptiveMedianFilter
method
property
confidenceThreshold
Confidence threshold for adaptive median filtering. Should be less than nFillConfThresh value used in evaDfsHoleFillConfig. Valid range is [0,255].
method
property
enable
Flag to enable adaptive median filtering for a final pass of filtering on low confidence pixels.
method
class
depthai.StereoDepthConfig.PostProcessing.Filter
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.PostProcessing.MedianFilter
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.PostProcessing.SpatialFilter
method
method
property
alpha
The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the amount of smoothing.
method
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.
method
property
enable
Whether to enable or disable the filter.
method
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.
method
property
numIterations
Number of iterations over the image in both horizontal and vertical direction.
method
class
depthai.StereoDepthConfig.PostProcessing.TemporalFilter
class
PersistencyMode
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 :
method
method
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.
method
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.
method
property
enable
Whether to enable or disable the filter.
method
property
persistencyMode
Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
method
class
depthai.StereoDepthConfig.PostProcessing.TemporalFilter.PersistencyMode
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.PostProcessing.SpeckleFilter
method
method
property
differenceThreshold
Maximum difference between neighbor disparity pixels to put them into the same blob. Units in disparity integer levels.
method
property
enable
Whether to enable or disable the filter.
method
property
speckleRange
Speckle search range.
method
class
depthai.StereoDepthConfig.CostAggregation
class
P1Config
Adaptive P1 penalty configuration. RVC4 only.
class
P2Config
Adaptive P2 penalty configuration. RVC4 only.
method
property
divisionFactor
Cost calculation linear equation parameters. RVC2 only.
method
property
horizontalPenaltyCostP1
Horizontal P1 penalty cost parameter. RVC2 only.
method
property
horizontalPenaltyCostP2
Horizontal P2 penalty cost parameter. RVC2 only.
method
property
p1Config
Adaptive P1 penalty configuration. RVC4 only.
method
property
p2Config
Adaptive P2 penalty configuration. RVC4 only.
method
property
verticalPenaltyCostP1
Vertical P1 penalty cost parameter. RVC2 only.
method
property
verticalPenaltyCostP2
Vertical P2 penalty cost parameter. RVC2 only.
method
class
depthai.StereoDepthConfig.CostAggregation.P1Config
method
property
defaultValue
Used as the default penalty value when nAdapEnable is disabled. A bigger value enforces higher smoothness and reduced noise at the cost of lower edge accuracy. This value must be smaller than P2 default penalty. Valid range is [10,50].
method
property
edgeThreshold
Threshold value on edges when nAdapEnable is enabled. A bigger value permits higher neighboring feature dissimilarity tolerance. This value is shared with P2 penalty configuration. Valid range is [8,16].
method
property
edgeValue
Penalty value on edges when nAdapEnable is enabled. A smaller penalty value permits higher change in disparity. This value must be smaller than or equal to P2 edge penalty. Valid range is [10,50].
method
property
enableAdaptive
Used to disable/enable adaptive penalty.
method
property
smoothThreshold
Threshold value on low texture regions when nAdapEnable is enabled. A bigger value permits higher neighboring feature dissimilarity tolerance. This value is shared with P2 penalty configuration. Valid range is [2,12].
method
property
smoothValue
Penalty value on low texture regions when nAdapEnable is enabled. A smaller penalty value permits higher change in disparity. This value must be smaller than or equal to P2 smoothness penalty. Valid range is [10,50].
method
class
depthai.StereoDepthConfig.CostAggregation.P2Config
method
property
defaultValue
Used as the default penalty value when nAdapEnable is disabled. A bigger value enforces higher smoothness and reduced noise at the cost of lower edge accuracy. This value must be larger than P1 default penalty. Valid range is [20,100].
method
property
edgeValue
Penalty value on edges when nAdapEnable is enabled. A smaller penalty value permits higher change in disparity. This value must be larger than or equal to P1 edge penalty. Valid range is [20,100].
method
property
enableAdaptive
Used to disable/enable adaptive penalty.
method
property
smoothValue
Penalty value on low texture regions when nAdapEnable is enabled. A smaller penalty value permits higher change in disparity. This value must be larger than or equal to P1 smoothness penalty. Valid range is [20,100].
method
class
depthai.StereoDepthConfig.CostMatching
class
LinearEquationParameters
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. RVC2 only.
class
DisparityWidth
Disparity search range: 64 or 96 pixels are supported by the HW. Members: DISPARITY_64 : DISPARITY_96 :
method
property
confidenceThreshold
Disparities with confidence value over this threshold are accepted.
method
property
disparityWidth
Disparity search range, default 96 pixels. RVC2 only.
method
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. RVC2 only.
method
property
enableSwConfidenceThresholding
Enable software confidence thresholding. RVC4 only.
method
property
invalidDisparityValue
Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly. RVC2 only.
method
property
linearEquationParameters
Cost calculation linear equation parameters. RVC2 only.
method
class
depthai.StereoDepthConfig.CostMatching.LinearEquationParameters
class
depthai.StereoDepthConfig.CostMatching.DisparityWidth
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.CensusTransform
class
KernelSize
Census transform kernel size possible values. Members: AUTO : KERNEL_5x5 : KERNEL_7x7 : KERNEL_7x9 :
method
property
enableMeanMode
If enabled, each pixel in the window is compared with the mean window value instead of the central pixel. RVC2 only.
method
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. RVC2 only.
method
property
kernelSize
Census transform kernel size. RVC2 only.
method
property
noiseThresholdOffset
Used to reduce small fixed levels of noise across all luminance values in the current image. Valid range is [0,127]. Default value is 1. RVC4 only.
method
property
noiseThresholdScale
Used to reduce noise values that increase with luminance in the current image. Valid range is [-128,127]. Default value is 1. RVC4 only.
method
property
threshold
Census transform comparison threshold value. RVC2 only.
method
class
depthai.StereoDepthConfig.CensusTransform.KernelSize
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthConfig.MedianFilter
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.SystemInformation(depthai.Buffer)
variable
variable
variable
variable
variable
variable
variable
method
method
class
depthai.SystemInformationRVC4(depthai.Buffer)
variable
variable
variable
variable
variable
variable
method
class
depthai.TrackedFeature
method
property
age
Feature age in frames
method
property
descriptor
Feature descriptor
method
property
harrisScore
Feature harris score
method
property
id
Feature ID. Persistent between frames if motion estimation is enabled.
method
property
position
x, y position of the detected feature
method
property
trackingError
Feature tracking error
method
class
depthai.TrackedFeatures(depthai.Buffer)
class
depthai.Tracklet
class
TrackingStatus
Members: NEW TRACKED LOST REMOVED
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
class
depthai.Tracklet.TrackingStatus
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.Tracklets(depthai.Buffer, depthai.Transformable)
method
method
method
method
method
transformTo(self, target: ImgTransformation) -> Tracklets: TrackletsReturns a new Tracklets message with the tracklets transformed into the target image transformation. For each tracklet, the bounding box is assumed to lie on a plane parallel to the image plane at depth `tracklet.spatialCoordinates.z` (that is, all four bounding-box corners are projected using the same depth value). The transformed corners are then fit with the smallest enclosing rotated rectangle to preserve rectangularity. Parameter ``target``: Target image transformation.
property
tracklets
Retrieve data for Tracklets. Returns: Vector of object tracker data, carrying tracking information.
method
property
unit
Measurement unit used by all tracklets' `spatialCoordinates` in this list.
method
class
depthai.BenchmarkReport(depthai.Buffer)
method
method
property
property
property
property
property
class
depthai.PointCloudConfig(depthai.Buffer)
class
CoordinateSystemType
Members: DEFAULT CAMERA_SOCKET HOUSING
method
method
method
getCoordinateSystemType(self) -> PointCloudConfig.CoordinateSystemType: PointCloudConfig.CoordinateSystemTypeRetrieve the coordinate system type.
method
getLengthUnit(self) -> LengthUnit: LengthUnitRetrieve the length unit used for output point coordinates.
method
getOrganized(self) -> bool: boolRetrieve whether the point cloud is organized (all width*height points kept). Returns: true if all width*height points are output, false if only valid (z > 0) points are kept
method
getSparse(self) -> bool: bool**Deprecated:** Use getOrganized() instead (sparse == !organized).
method
getTargetCameraSocket(self) -> CameraBoardSocket: CameraBoardSocketRetrieve the target camera socket (valid when coordSystemType == CAMERA_SOCKET).
method
getTargetHousingCS(self) -> HousingCoordinateSystem: HousingCoordinateSystemRetrieve the target housing coordinate system (valid when coordSystemType == HOUSING).
method
getTransformationMatrix(self) -> typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]: typing.Annotated[list[typing.Annotated[list[float], pybind11_stubgen.typing_ext.FixedSize(4)]], pybind11_stubgen.typing_ext.FixedSize(4)]Retrieve transformation matrix applied to every output point. Returns: 4x4 row-major transformation matrix (identity by default)
method
getUseSpecTranslation(self) -> bool: boolRetrieve whether spec translation is used.
method
setLengthUnit(self, arg0: LengthUnit) -> PointCloudConfig: PointCloudConfigSet the length unit for output point coordinates.
method
setOrganized(self, arg0: bool) -> PointCloudConfig: PointCloudConfigEnable or disable organized point cloud output. When true all width*height points are kept; when false only points with z > 0 are emitted.
method
setSparse(self, sparse: bool) -> PointCloudConfig: PointCloudConfig**Deprecated:** Use setOrganized() instead (sparse == !organized).
method
method
class
depthai.PointCloudConfig.CoordinateSystemType
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.PointCloudData(depthai.Buffer, depthai.ProtoSerializable, depthai.Transformable)
method
method
method
getHeight(self) -> int: intRetrieves 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
method
getInstanceNum(self) -> int: intRetrieves instance number
method
getMaxX(self) -> float: floatRetrieves maximal x coordinate in depth units (millimeter by default)
method
getMaxY(self) -> float: floatRetrieves maximal y coordinate in depth units (millimeter by default)
method
getMaxZ(self) -> float: floatRetrieves maximal z coordinate in depth units (millimeter by default)
method
getMinX(self) -> float: floatRetrieves minimal x coordinate in depth units (millimeter by default)
method
getMinY(self) -> float: floatRetrieves minimal y coordinate in depth units (millimeter by default)
method
getMinZ(self) -> float: floatRetrieves minimal z coordinate in depth units (millimeter by default)
method
method
method
method
getWidth(self) -> int: intRetrieves 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
method
isColor(self) -> bool: boolRetrieves whether point cloud is color
method
isOrganized(self) -> bool: boolRetrieves whether point cloud is organized (height > 1) Organized point clouds have width x height structure from the original image Sparse point clouds have height == 1 and only contain valid points
method
isSparse(self) -> bool: boolRetrieves whether point cloud is sparse $.. deprecated:: Use isOrganized() instead. Sparse means height == 1
method
setHeight(self, arg0: int) -> PointCloudData: PointCloudDataSpecifies frame height Parameter ``height``: frame height
method
setInstanceNum(self, instanceNum: int) -> PointCloudData: PointCloudDataSpecifies instance number Parameter ``instanceNum``: instance number
method
setMaxX(self, arg0: float) -> PointCloudData: PointCloudDataSpecifies maximal x coordinate in depth units (millimeter by default) Parameter ``val``: maximal x coordinate in depth units (millimeter by default)
method
setMaxY(self, arg0: float) -> PointCloudData: PointCloudDataSpecifies maximal y coordinate in depth units (millimeter by default) Parameter ``val``: maximal y coordinate in depth units (millimeter by default)
method
setMaxZ(self, arg0: float) -> PointCloudData: PointCloudDataSpecifies maximal z coordinate in depth units (millimeter by default) Parameter ``val``: maximal z coordinate in depth units (millimeter by default)
method
setMinX(self, arg0: float) -> PointCloudData: PointCloudDataSpecifies minimal x coordinate in depth units (millimeter by default) Parameter ``val``: minimal x coordinate in depth units (millimeter by default)
method
setMinY(self, arg0: float) -> PointCloudData: PointCloudDataSpecifies minimal y coordinate in depth units (millimeter by default) Parameter ``val``: minimal y coordinate in depth units (millimeter by default)
method
setMinZ(self, arg0: float) -> PointCloudData: PointCloudDataSpecifies minimal z coordinate in depth units (millimeter by default) Parameter ``val``: minimal z coordinate in depth units (millimeter by default)
method
method
method
method
method
setWidth(self, arg0: int) -> PointCloudData: PointCloudDataSpecifies frame width Parameter ``width``: frame width
method
updateBoundingBox(self) -> PointCloudData: PointCloudDataRecomputes the bounding box (min/max X, Y, Z) from the current point data. All stored points are included regardless of their z value. If the cloud is empty, all bounds are set to 0.
class
depthai.PipelineEvent(depthai.Buffer)
class
depthai.PipelineEvent.Type
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.PipelineEvent.Interval
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.PipelineEvent.Status
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NodeState
class
class
class
class
class
class
class
State
Members: IDLE GETTING_INPUTS PROCESSING SENDING_OUTPUTS
variable
variable
variable
variable
variable
variable
variable
variable
method
method
class
depthai.NodeState.DurationEvent
variable
variable
method
method
class
depthai.NodeState.DurationStats
variable
variable
variable
variable
variable
variable
variable
method
method
class
depthai.NodeState.Timing
variable
variable
method
method
method
class
depthai.NodeState.QueueStats
variable
variable
variable
variable
method
method
class
depthai.NodeState.InputQueueState
class
depthai.NodeState.InputQueueState.State
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NodeState.OutputQueueState
class
depthai.NodeState.OutputQueueState.State
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NodeState.State
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.PipelineState(depthai.Buffer)
class
depthai.TransformData(depthai.Buffer)
class
depthai.Odometry(depthai.TransformData)
class
depthai.ImageAlignConfig(depthai.Buffer)
method
method
property
staticDepthPlane
Optional static depth plane to align to, in depth units, by default millimeters
method
class
depthai.AlignConfig(depthai.Buffer)
method
method
property
staticDepthPlane
Optional static depth plane to align to, in depth units, by default millimeters
method
class
depthai.ImgAnnotations(depthai.Buffer, depthai.ProtoSerializable)
class
depthai.CircleAnnotation
variable
variable
variable
variable
variable
method
class
depthai.PointsAnnotationType
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.PointsAnnotation
variable
variable
variable
variable
variable
variable
method
class
depthai.TextAnnotation
variable
variable
variable
variable
variable
method
class
depthai.ImgAnnotation
variable
variable
variable
method
class
depthai.VectorColor
method
__bool__(self) -> bool: boolCheck whether the list is nonempty
method
method
method
method
method
method
method
append(self, x: Color)Add an item to the end of the list
method
clear(self)Clear the contents
method
method
insert(self, i: int, x: Color)Insert an item at a given position.
method
class
depthai.VectorPoint2f
method
__bool__(self) -> bool: boolCheck whether the list is nonempty
method
method
method
method
method
method
method
append(self, x: Point2f)Add an item to the end of the list
method
clear(self)Clear the contents
method
method
insert(self, i: int, x: Point2f)Insert an item at a given position.
method
class
depthai.VectorCircleAnnotation
method
__bool__(self) -> bool: boolCheck whether the list is nonempty
method
method
method
method
method
method
method
append(self, x: CircleAnnotation)Add an item to the end of the list
method
clear(self)Clear the contents
method
method
insert(self, i: int, x: CircleAnnotation)Insert an item at a given position.
method
class
depthai.VectorPointsAnnotation
method
__bool__(self) -> bool: boolCheck whether the list is nonempty
method
method
method
method
method
method
method
append(self, x: PointsAnnotation)Add an item to the end of the list
method
clear(self)Clear the contents
method
method
insert(self, i: int, x: PointsAnnotation)Insert an item at a given position.
method
class
depthai.VectorTextAnnotation
method
__bool__(self) -> bool: boolCheck whether the list is nonempty
method
method
method
method
method
method
method
append(self, x: TextAnnotation)Add an item to the end of the list
method
clear(self)Clear the contents
method
method
insert(self, i: int, x: TextAnnotation)Insert an item at a given position.
method
class
depthai.VectorImgAnnotation
method
__bool__(self) -> bool: boolCheck whether the list is nonempty
method
method
method
method
method
method
method
append(self, x: ImgAnnotation)Add an item to the end of the list
method
clear(self)Clear the contents
method
method
insert(self, i: int, x: ImgAnnotation)Insert an item at a given position.
method
class
depthai.RGBDData(depthai.Buffer, depthai.ProtoSerializable)
method
method
method
method
method
method
class
depthai.MapData(depthai.Buffer)
variable
variable
variable
method
method
class
depthai.VppConfig(depthai.Buffer)
class
PatchColoringType
Members: RANDOM : Random patch coloring MAXDIST : Color with most distant color
class
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
class
depthai.VppConfig.PatchColoringType
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.VppConfig.InjectionParameters
variable
variable
variable
variable
variable
variable
method
method
class
depthai.GateControl(depthai.Buffer)
variable
variable
variable
static method
static method
method
method
class
depthai.CoverageData(depthai.Buffer)
variable
variable
variable
variable
variable
variable
method
class
depthai.CalibrationQualityData
variable
variable
variable
variable
variable
method
class
depthai.CalibrationQuality(depthai.Buffer)
class
depthai.CalibrationMetrics(depthai.Buffer)
class
depthai.DynamicCalibrationResultData
variable
variable
variable
variable
method
class
depthai.DynamicCalibrationResult(depthai.Buffer)
class
depthai.DynamicCalibrationControl(depthai.Buffer)
class
class
PerformanceMode
Members: DEFAULT STATIC_SCENERY OPTIMIZE_SPEED OPTIMIZE_PERFORMANCE SKIP_CHECKS RELAXED_COVERAGE
variable
variable
variable
variable
variable
variable
static method
DynamicCalibrationControl.applyCalibration(calibration: ..., flash: bool = False) -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with an ApplyCalibration command.
static method
DynamicCalibrationControl.calibrate(force: bool = False, keepCameraCenters: bool = True) -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a Calibrate command.
static method
DynamicCalibrationControl.calibrationQuality(force: bool = False) -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a CalibrationQuality command.
static method
DynamicCalibrationControl.computeCalibrationMetrics(calibration: ...) -> DynamicCalibrationControl: DynamicCalibrationControlComute metrics on the given calibration.
static method
DynamicCalibrationControl.loadImage() -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a LoadImage command.
static method
DynamicCalibrationControl.resetData() -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a ResetData command.
static method
DynamicCalibrationControl.setPerformanceMode(mode: DynamicCalibrationControl.PerformanceMode = ...) -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a SetPerformanceMode command.
static method
DynamicCalibrationControl.startCalibration(loadImagePeriod: float = 0.5, calibrationPeriod: float = 5.0, keepCameraCenters: bool = True) -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a StartCalibration command.
static method
DynamicCalibrationControl.stopCalibration() -> DynamicCalibrationControl: DynamicCalibrationControlCreate a DynamicCalibrationControl with a StopCalibration command.
method
class
depthai.DynamicCalibrationControl.Commands
class
class
class
class
class
class
class
class
class
class
depthai.DynamicCalibrationControl.Commands.Calibrate
class
depthai.DynamicCalibrationControl.Commands.ComputeCalibrationMetrics
class
depthai.DynamicCalibrationControl.Commands.CalibrationQuality
class
depthai.DynamicCalibrationControl.Commands.StartCalibration
class
depthai.DynamicCalibrationControl.Commands.StopCalibration
method
class
depthai.DynamicCalibrationControl.Commands.LoadImage
method
class
depthai.DynamicCalibrationControl.Commands.ApplyCalibration
class
depthai.DynamicCalibrationControl.Commands.ResetData
method
class
depthai.DynamicCalibrationControl.Commands.SetPerformanceMode
class
depthai.DynamicCalibrationControl.PerformanceMode
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.AutoCalibrationConfig(depthai.Buffer)
class
Mode
Defines when the auto-calibration process should be triggered. Members: ON_START CONTINUOUS
variable
variable
method
method
property
calibrationConfidenceThreshold
Minimum confidence score (0.0 to 1.0) required to apply a new calibration.
method
property
dataConfidenceThreshold
Minimum quality threshold (0.0 to 1.0) for input features to be used. A value below 0 selects the default based on the lens model.
method
property
flashCalibration
If true, saves successful calibration to non-volatile memory (EEPROM); otherwise, keeps in RAM only.
method
property
maxImagesPerRecalibration
Maximum number of images to collect for one recalibration event.
method
property
maxIterations
Maximum number of optimization iterations per calibration cycle.
method
property
mode
Calibration trigger mode (ON_START or CONTINUOUS).
method
property
sleepingTime
Seconds to sleep between calibration cycles in CONTINUOUS mode.
method
property
validationSetSize
Number of images used for validating the calibration result.
method
class
depthai.AutoCalibrationConfig.Mode
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.AutoCalibrationResult(depthai.Buffer)
class
depthai.ModelType
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.LogLevel
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.LogMessage
variable
variable
variable
variable
variable
variable
class
depthai.Version
variable
method
method
method
method
method
__str__(self) -> str: strConvert Version to string
method
getBuildInfo(self) -> str: strGet build info
method
toStringSemver(self) -> str: strConvert Version to semver (no build information) string
class
depthai.MessageQueue
exception
static method
static method
method
method
addCallback(self, callback: typing.Callable) -> int: intAdds a callback on message received Parameter ``callback``: Callback function with queue name and message pointer Returns: Callback id
method
close(self)Closes the queue and unblocks any waiting consumers or producers
method
front(self) -> ADatatype: ADatatypeGets first message in the queue. Returns: Message of type T or nullptr if no message available
method
method
getAll(self) -> list[ADatatype]: list[ADatatype]Block until at least one message in the queue. Then return all messages from the queue. Returns: Vector of messages which can either be of type T or nullptr
method
getBlocking(self) -> bool: boolGets current queue behavior when full (maxSize) Returns: True if blocking, false otherwise
method
getMaxSize(self) -> int: intGets queue maximum size Returns: Maximum queue size
method
method
getSize(self) -> int: intGets queue current size Returns: Current queue size
method
has(self) -> bool: boolCheck whether front of the queue has message of type T Returns: True if queue isn't empty and the first element is of type T, false otherwise
method
isClosed(self) -> bool: boolCheck whether queue is closed
method
isFull(self) -> int: intGets whether queue is full Returns: True if queue is full, false otherwise
method
removeCallback(self, callbackId: int) -> bool: boolRemoves a callback Parameter ``callbackId``: Id of callback to be removed Returns: True if callback was removed, false otherwise
method
method
setBlocking(self, blocking: bool)Sets queue behavior when full (maxSize) Parameter ``blocking``: Specifies if block or overwrite the oldest message in the queue
method
setMaxSize(self, maxSize: int)Sets queue maximum size Parameter ``maxSize``: Specifies maximum number of messages in the queue @note If maxSize is smaller than size, queue will not be truncated immediately, only after messages are popped
method
setName(self, name: str)Set the name of the queue
method
tryGet(self) -> ADatatype: ADatatypeTry to retrieve message T from queue. If message isn't of type T it returns nullptr Returns: Message of type T or nullptr if no message available
method
tryGetAll(self) -> list[ADatatype]: list[ADatatype]Try to retrieve all messages in the queue. Returns: Vector of messages which can either be of type T or nullptr
method
trySend(self, msg: ADatatype) -> bool: boolTries sending a message Parameter ``msg``: message to send
class
depthai.OpenVINO
class
Version
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
class
Blob
OpenVINO Blob
class
SuperBlob
A superblob is an efficient way of storing generated blobs for all different number of shaves.
class
Device
Members: VPU VPUX
variable
variable
variable
variable
variable
variable
variable
variable
variable
static method
OpenVINO.areVersionsBlobCompatible(v1: OpenVINO.Version, v2: OpenVINO.Version) -> bool: boolChecks whether two blob versions are compatible
static method
OpenVINO.getBlobLatestSupportedVersion()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
static method
OpenVINO.getBlobSupportedVersions()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
static method
OpenVINO.getVersionName(version: OpenVINO.Version) -> str: strReturns string representation of a given version Parameter ``version``: OpenVINO version Returns: Name of a given version
static method
OpenVINO.getVersions() -> list[OpenVINO.Version]: list[OpenVINO.Version]Returns: Supported versions
static method
OpenVINO.parseVersionName(versionString: str) -> OpenVINO.Version: OpenVINO.VersionCreates Version from string representation. Throws if not possible. Parameter ``versionString``: Version as string Returns: Version object if successful
class
depthai.OpenVINO.Version
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.OpenVINO.Blob
method
property
data
Blob data
method
property
device
Device for which the blob is compiled for
method
property
networkInputs
Map of input names to additional information
method
property
networkOutputs
Map of output names to additional information
method
property
numShaves
Number of shaves the blob was compiled for
method
property
numSlices
Number of CMX slices the blob was compiled for
method
property
stageCount
Number of network stages
method
property
version
OpenVINO version
method
class
depthai.OpenVINO.SuperBlob
constant
method
method
getBlobWithNumShaves(self, numShaves: int) -> OpenVINO.Blob: OpenVINO.BlobGenerate a blob with a specific number of shaves Parameter ``numShaves:``: Number of shaves to generate the blob for. Must be between 1 and NUMBER_OF_PATCHES. Returns: dai::OpenVINO::Blob: Blob compiled for the specified number of shaves
class
depthai.OpenVINO.Device
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NNArchive
method
method
getBlob(self) -> OpenVINO.Blob|None: OpenVINO.Blob|NoneReturn a SuperVINO::Blob from the archive if getModelType() returns BLOB, nothing otherwise Returns: std::optional<OpenVINO::Blob>: Model blob
method
getConfig(self) -> nn_archive.v1.Config: nn_archive.v1.ConfigGet NNArchive config. Template parameter ``T:``: Type of config to get Returns: const T&: Config
method
getConfigV1(self) -> nn_archive.v1.Config: nn_archive.v1.ConfigGet NNArchive config. Template parameter ``T:``: Type of config to get Returns: const T&: Config
method
getHeadConfig(self, index: int = 0) -> nn_archive.v1.Head: nn_archive.v1.HeadGet specific head configuration from NNArchive. Parameter ``headIndex:``: Index of the head to retrieve Returns: dai::nn_archive::v1::Head: Head configuration
method
getInputHeight(self, index: int = 0) -> int|None: int|NoneGet inputHeight of the model Parameter ``index:``: Index of input Returns: int: inputHeight
method
getInputSize(self, index: int = 0) -> tuple[int, int]|None: tuple[int, int]|NoneGet inputSize of the model Parameter ``index:``: Index of input @note this function is only valid for models with NCHW and NHWC input formats Returns: std::vector<std::pair<int, int>>: inputSize
method
getInputWidth(self, index: int = 0) -> int|None: int|NoneGet inputWidth of the model Parameter ``index:``: Index of input Returns: int: inputWidth
method
getModelType(self) -> ModelType: ModelTypeGet type of model contained in NNArchive Returns: model::ModelType: type of model in archive
method
getOtherModelFormat(self) -> typing.Any: typing.AnyReturn a model from the archive if getModelType() returns OTHER or DLC, nothing otherwise Returns: std::optional<std::vector<uint8_t>>: Model
method
getSuperBlob(self) -> OpenVINO.SuperBlob|None: OpenVINO.SuperBlob|NoneReturn a SuperVINO::Blob from the archive if getModelType() returns BLOB, nothing otherwise Returns: std::optional<OpenVINO::Blob>: Model blob
method
getSupportedPlatforms(self) -> list[Platform]: list[Platform]Get supported platforms Returns: std::vector<dai::Platform>: Supported platforms
class
depthai.NNArchiveOptions
class
depthai.NNArchiveVersionedConfig
method
method
getConfig(self) -> nn_archive.v1.Config: nn_archive.v1.ConfigGet stored config cast to a specific version. Template parameter ``T:``: Config type to cast to.
method
getConfigV1(self) -> nn_archive.v1.Config: nn_archive.v1.ConfigGet stored config cast to a specific version. Template parameter ``T:``: Config type to cast to.
method
getVersion(self) -> NNArchiveConfigVersion: NNArchiveConfigVersionGet version of the underlying config.
class
depthai.NNArchiveConfigVersion
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NNArchiveEntry
class
depthai.NNArchiveEntry.Compression
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NNArchiveEntry.Seek
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CapabilityRangeUint
class
depthai.CapabilityRangeUintPair
class
depthai.CapabilityRangeFloat
class
depthai.CapabilityRangeFloatPair
class
depthai.ImgFrameCapability(depthai.Capability)
variable
variable
variable
variable
variable
variable
method
class
depthai.ImgResizeMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.Node
class
class
class
class
Id
Node identificator. Unique for every node on a single Pipeline
class
Connection
Connection between an Input and Output
class
class
method
add(self, node: Node)Add existing node to nodeMap
method
method
getInputMapRefs(self) -> list[Node.InputMap]: list[Node.InputMap]Retrieves reference to node inputs
method
method
getInputs(self) -> list[Node.Input]: list[Node.Input]Retrieves all nodes inputs
method
getName(self) -> str: strRetrieves nodes name
method
getOutputMapRefs(self) -> list[Node.OutputMap]: list[Node.OutputMap]Retrieves reference to node outputs
method
method
getOutputs(self) -> list[Node.Output]: list[Node.Output]Retrieves all nodes outputs
method
method
property
id
Id of node. Assigned after being placed on the pipeline
class
depthai.Node.Input(depthai.MessageQueue)
class
Type
Members: SReceiver MReceiver
variable
method
method
createInputQueue(self, maxSize: int = 16, blocking: bool = False) -> InputQueue: InputQueueCreate an shared pointer to an input queue that can be used to send messages to this input from onhost Parameter ``maxSize:``: Maximum size of the input queue Parameter ``blocking:``: Whether the input queue should block when full Returns: std::shared_ptr<InputQueue>: shared pointer to an input queue
method
method
getPossibleDatatypes(self) -> list[Node.DatatypeHierarchy]: list[Node.DatatypeHierarchy]Get possible datatypes that can be received
method
getReusePreviousMessage(self) -> bool: boolEquivalent to getWaitForMessage but with inverted logic.
method
getSourceDevice(self) -> Device: DeviceGet the device that produces the data arriving at this input, resolved at pipeline build. Returns: The source device, or nullptr when the upstream node runs on the host. Throws if this input is connected to sources on more than one device.
method
getWaitForMessage(self) -> bool: boolGet 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
method
getXLinkBridge(self) -> node.internal.XLinkInBridge: node.internal.XLinkInBridgeGet XLink bridge associated with this input (only valid for device inputs after pipeline build) Returns: std::shared_ptr<dai::node::internal::XLinkInBridge>: pointer to the XLink bridge or nullptr if not applicable
method
method
setReusePreviousMessage(self, reusePreviousMessage: bool)Equivalent to setWaitForMessage but with inverted logic.
method
setWaitForMessage(self, waitForMessage: bool)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
class
depthai.Node.Input.Type
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.Node.Output
class
Type
Members: MSender SSender
method
method
canConnect(self, input: Node.Input) -> bool: boolCheck if connection is possible Parameter ``in``: Input to connect to Returns: True if connection is possible, false otherwise
method
createOutputQueue(self, maxSize: int = 16, blocking: bool = False) -> MessageQueue: MessageQueueConstruct and return a shared pointer to an output message queue Parameter ``maxSize:``: Maximum size of the output queue Parameter ``blocking:``: Whether the output queue should block when full Returns: std::shared_ptr<dai::MessageQueue>: shared pointer to an output queue
method
getName(self) -> str: strGet name of the output
method
method
getPossibleDatatypes(self) -> list[Node.DatatypeHierarchy]: list[Node.DatatypeHierarchy]Get possible datatypes that can be sent
method
getXLinkBridge(self) -> node.internal.XLinkOutBridge: node.internal.XLinkOutBridgeGet XLink bridge associated with this output (only valid for device outputs after pipeline build) Returns: std::shared_ptr<dai::node::internal::XLinkOutBridge>: pointer to the XLink bridge or nullptr if not applicable
method
isSamePipeline(self, input: Node.Input) -> bool: boolCheck 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
method
method
send(self, msg: ADatatype)Sends a Message to all connected inputs Parameter ``msg``: Message to send to all connected inputs
method
method
trySend(self, msg: ADatatype) -> bool: boolTry sending a message to all connected inputs Parameter ``msg``: Message to send to all connected inputs Returns: True if ALL connected inputs got the message, false otherwise
method
class
depthai.Node.Output.Type
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.Node.DatatypeHierarchy
variable
variable
method
class
depthai.Node.Connection
variable
variable
variable
variable
variable
variable
class
depthai.Node.InputMap
method
__bool__(self) -> bool: boolCheck whether the map is nonempty
method
method
method
method
method
method
method
getSourceDevices(self) -> dict[str, ...]: dict[str, ...]Get the source device of every input in this map, resolved at pipeline build. Returns: Map of input name to source device; nullptr when the source runs on the host. Inputs created with a group are keyed "<group>/<name>".
method
class
depthai.Node.OutputMap
method
__bool__(self) -> bool: boolCheck whether the map is nonempty
method
method
method
method
method
method
method
class
depthai.InputQueue
method
send(self, msg: ADatatype)Send a message to the connected input Parameter ``msg:``: Message to send
method
trySend(self, msg: ADatatype) -> bool: boolTry to send a message to the connected input, without waiting for space in the queue Parameter ``msg:``: Message to send Returns: True if the message was queued, false if the queue was full
class
depthai.ThreadedNode(depthai.Node)
method
blockEvent(self, type: PipelineEvent.Type, source: str) -> BlockPipelineEvent: BlockPipelineEventCreates a scoped event that sends start and end events for a custom block event Parameter ``type``: Type of the event Parameter ``source``: Source name of the event
method
method
method
method
getLogLevel(self) -> LogLevel: LogLevelGets the logging severity level for this node. Returns: Logging severity level
method
method
inputBlockEvent(self) -> BlockPipelineEvent: BlockPipelineEventCreates a scoped event that sends start and end events for the getting inputs state
method
method
method
outputBlockEvent(self) -> BlockPipelineEvent: BlockPipelineEventCreates a scoped event that sends start and end events for the sending outputs state
method
setLogLevel(self, arg0: LogLevel)Sets the logging severity level for this node. Parameter ``level``: Logging severity level
method
method
property
class
depthai.DeviceNode(depthai.ThreadedNode)
method
getDevice(self) -> Device: DeviceGet device for this node Returns: shared pointer to device
class
depthai.BlockPipelineEvent
class
depthai.ColorCameraProperties
class
SensorResolution
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_240X180 THE_1280X962 THE_2000X1500 THE_2028X1520 THE_2104X1560 THE_1440X1080 THE_1352X1012 THE_2024X1520
class
ColorOrder
For 24 bit color these can be either RGB or BGR Members: BGR RGB
class
WarpMeshSource
Warp mesh source Members: AUTO NONE CALIBRATION URI
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
class
depthai.ColorCameraProperties.SensorResolution
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ColorCameraProperties.ColorOrder
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ColorCameraProperties.WarpMeshSource
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.MonoCameraProperties
class
SensorResolution
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 THE_4000X3000 THE_4224X3136
variable
variable
variable
variable
variable
variable
variable
variable
class
depthai.MonoCameraProperties.SensorResolution
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.StereoDepthProperties
class
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. .. warning:: On RVC4 the DEFAULT, DENSITY, and FAST_DENSITY presets can produce inaccurate depth in black padded regions, as they prioritize coverage. See getOptimalNewCameraMatrix from opencv for more details.
method
property
baseline
Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
method
property
depthAlignCamera
Which camera to align disparity/depth to. When configured (not AUTO), takes precedence over 'depthAlign'
method
property
depthAlignmentUseSpecTranslation
Use baseline information for depth alignment from specs (design data) or from calibration. Suitable for debugging. Utilizes calibrated value as default
method
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
method
property
enableRectification
Enable stereo rectification/dewarp or not. Useful to disable when replaying pre- recorded rectified frames.
method
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. RVC2 only.
method
property
focalLength
Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
method
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));
method
property
height
Input frame height. Optional (taken from MonoCamera nodes if they exist)
method
property
initialConfig
Initial stereo config
method
property
mesh
Specify a direct warp mesh to be used for rectification, instead of intrinsics + extrinsic matrices
method
property
numFramesPool
Num frames in output pool
method
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. RVC2 only.
method
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. RVC2 only.
method
property
outHeight
Output disparity/depth height. Currently only used when aligning to RGB
method
property
outKeepAspectRatio
Whether to keep aspect ratio of the input (rectified) or not
method
property
outWidth
Output disparity/depth width. Currently only used when aligning to RGB
method
property
rectificationUseSpecTranslation
Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Suitable for debugging. Default: false
method
property
rectifyEdgeFillColor
Fill color for missing data at frame edges - grayscale 0..255, or -1 to replicate pixels
method
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.
method
property
width
Input frame width. Optional (taken from MonoCamera nodes if they exist)
method
class
depthai.StereoDepthProperties.RectificationMesh
property
meshLeftUri
Uri which points to the mesh array for 'left' input rectification
method
property
meshRightUri
Uri which points to the mesh array for 'right' input rectification
method
property
meshSize
Mesh array size in bytes, for each of 'left' and 'right' (need to match)
method
property
stepHeight
Distance between mesh points, in the vertical direction
method
property
stepWidth
Distance between mesh points, in the horizontal direction
method
class
depthai.NeuralNetworkProperties
variable
variable
variable
variable
variable
class
depthai.VideoEncoderProperties
class
Profile
Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG Members: H264_BASELINE H264_HIGH H264_MAIN H265_MAIN MJPEG
class
RateControlMode
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265) Members: CBR VBR
variable
variable
variable
variable
variable
variable
variable
variable
variable
class
depthai.VideoEncoderProperties.Profile
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.VideoEncoderProperties.RateControlMode
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ImageManipProperties
class
PerformanceMode
Members: BALANCED PERFORMANCE LOW_POWER
class
Backend
Members: HW CPU GPU AUTO
variable
variable
variable
variable
variable
variable
class
depthai.ImageManipProperties.PerformanceMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ImageManipProperties.Backend
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.SPIOutProperties
class
depthai.SPIInProperties
class
depthai.SystemLoggerProperties
variable
class
depthai.ScriptProperties
property
processor
Which processor should execute the script
method
property
scriptName
Name of script
method
property
scriptUri
Uri which points to actual script
method
class
depthai.SpatialLocationCalculatorProperties
class
depthai.SpatialDetectionNetworkProperties
class
depthai.TrackerType
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.TrackerIdAssignmentPolicy
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.ObjectTrackerProperties
property
detectionLabelsToTrack
Which detections labels to track. Default all labels are tracked.
method
property
maxObjectsToTrack
Maximum number of objects to track. Maximum 60 for SHORT_TERM_KCF, maximum 1000 for other tracking methods. Default 60.
method
property
spatialAssociation
Whether to use spatial coordinates in association when available.
method
property
spatialAssociationWeight
Weight for spatial distance in association cost [0,1].
method
property
spatialDepthAwareScale
Depth-aware gating scale. Gate grows with depth: gate = base * (1 + scale * depthMeters).
method
property
spatialDistanceThreshold
Base 3D gating threshold in meters used for spatial association.
method
property
trackerIdAssignmentPolicy
New ID assignment policy.
method
property
trackerThreshold
Confidence threshold for tracklets. Above this threshold detections will be tracked. Default 0, all detections are tracked.
method
property
trackerType
Tracking method.
method
class
depthai.IMUSensor
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.IMUSensorConfig
variable
variable
variable
variable
variable
method
class
depthai.IMUProperties
variable
variable
variable
property
enableFirmwareUpdate
Whether to perform firmware update or not. Default value: false.
method
class
depthai.EdgeDetectorProperties
property
initialConfig
Initial edge detector config
method
property
numFramesPool
Num frames in output pool
method
property
outputFrameSize
Maximum output frame size in bytes (eg: 300x300 BGR image -> 300*300*3 bytes)
method
class
depthai.FeatureTrackerProperties
property
initialConfig
Initial feature tracker config
method
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.
method
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.
method
class
depthai.AprilTagProperties
variable
property
inputConfigSync
Whether to wait for config at 'inputConfig' IO
method
property
numThreads
How many threads to use for AprilTag detection
method
class
depthai.DetectionParserProperties
class
depthai.SegmentationParserProperties
variable
variable
variable
variable
class
depthai.UVCProperties
variable
variable
variable
class
depthai.ThermalProperties
property
boardSocket
Which socket will color camera use
method
property
fps
Camera sensor FPS
method
property
initialConfig
Initial Thermal config
method
property
numFramesPool
Num frames in output pool
method
class
depthai.ToFProperties
property
enableUndistortion
Undistort depth and auxiliary outputs before publishing them.
method
property
initialConfig
Initial ToF config
method
property
numFramesPool
Num frames in output pool
method
property
numShaves
Number of shaves reserved for ToF decoding.
method
property
warpHwIds
Warp HW IDs to use for undistortion, if empty, use auto/default
method
class
depthai.PointCloudProperties
class
depthai.SyncProperties
class
TimestampSource
Members: DEFAULT DEVICE HOST SYSTEM
property
processor
Which processor should execute the node.
method
property
syncAttempts
The number of syncing attempts before fail (num of replaced messages).
method
property
syncThresholdNs
The maximal interval the messages can be apart in nanoseconds.
method
property
timestampSource
Which timestamp to use for synchronization. On device the default is DEVICE, on host the default is HOST
method
class
depthai.SyncProperties.TimestampSource
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.MessageDemuxProperties
class
depthai.ImageFiltersConfig(depthai.Buffer)
method
method
insertFilter(self, params: ...|...|...|...) -> ImageFiltersConfig: ImageFiltersConfigInsert filter parameters describing how a new filter should be inserted Parameter ``params``: Parameters of the filter to be inserted
method
setProfilePreset(self, arg0: ...)Set preset mode for ImageFiltersConfig. Parameter ``presetMode``: Preset mode for ImageFiltersConfig.
method
updateFilterAtIndex(self, index: int, params: ...|...|...|...) -> ImageFiltersConfig: ImageFiltersConfigInsert filter parameters describing how a filter at index index should be updated Parameter ``index``: Index of the filter to be inserted Parameter ``params``: Parameters of the filter to be inserted
property
filterIndices
Index of the filter to be applied
method
property
filterParams
Parameters of the filter to be applied
method
class
depthai.ToFDepthConfidenceFilterConfig(depthai.Buffer)
method
method
setProfilePreset(self, arg0: ...)Set preset mode for ImageFiltersPresetMode. Parameter ``presetMode``: Preset mode for ImageFiltersPresetMode.
property
confidenceThreshold
Threshold for the confidence filter
method
class
depthai.ImageAlignProperties
variable
property
alignHeight
Optional output height
method
property
alignWidth
Optional output width
method
property
interpolation
Interpolation type to use
method
property
numFramesPool
Num frames in output pool
method
property
numShaves
Number of shaves reserved.
method
property
outKeepAspectRatio
Whether to keep aspect ratio of the input or not
method
property
warpHwIds
Warp HW IDs to use, if empty, use auto/default
method
class
depthai.AlignProperties
class
depthai.RectificationProperties
class
depthai.GPUStereoProperties
variable
class
depthai.VppProperties
property
initialConfig
Initial VPP configuration
method
property
numFramesPool
Number of frames in pool for output frames
method
class
depthai.ToFStereoFusionConfig
variable
variable
method
method
method
setCropToOverlap(self, enabled: bool) -> ToFStereoFusionConfig: ToFStereoFusionConfigEnable cropping depth and confidence to the largest rectangle inside their geometric overlap. The overlap uses projection at infinity, independently of measured depth. Outputs retain native pixel resolution, with updated intrinsics and unchanged camera extrinsics. Parameter ``enabled``: Whether to crop the outputs. Disabled by default. Returns: This configuration for chaining. @note Set on initialConfig before starting the pipeline. The crop is computed from the first synchronized input pair and reused until either input transformation or dimensions change. If the geometric overlap is empty, the node throws an error while processing that pair.
class
depthai.VioConfig
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.Asset
variable
variable
method
property
class
depthai.AssetManager
method
method
addExisting(self, assets: list[Asset])Adds all assets in an array to the AssetManager Parameter ``assets``: Vector of assets to add
method
method
method
getRootPath(self) -> str: strGet root path of the asset manager Returns: Root path
method
remove(self, key: str)Removes asset with key Parameter ``key``: Key of asset to remove
method
method
size(self) -> int: intReturns: Number of asset stored in the AssetManager
class
depthai.GlobalProperties
class
depthai.DeviceProperties
variable
variable
method
property
cameraSocketTuningBlobSize
Socket specific camera tuning blob size in bytes
method
property
cameraSocketTuningBlobUri
Socket specific camera tuning blob uri
method
property
cameraTuningBlobSize
Camera tuning blob size in bytes
method
property
cameraTuningBlobUri
Uri which points to camera tuning blob
method
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.
method
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.
method
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.
method
class
depthai.RecordConfig
class
variable
variable
variable
variable
method
class
depthai.RecordConfig.VideoEncoding
variable
variable
variable
variable
variable
method
class
depthai.DeviceState
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.NodesStateApi
method
method
method
otherTimings(self) -> dict[int, dict[str, NodeState.Timing]]: dict[int, dict[str, NodeState.Timing]]method
method
class
depthai.NodeStateApi
method
method
method
method
method
class
depthai.Pipeline
class
AutoCalibrationMode
Members: OFF ON_START CONTINUOUS
method
method
method
method
method
method
method
clearMultiDeviceCalibration(self)Removes any cross-device calibration graph from the pipeline. On a built pipeline the removal is pushed to all assigned devices, which then publish their local calibration metadata again. Throws: std::runtime_error when a device rejects the update
method
method
enableHolisticRecord(self, recordConfig: RecordConfig)Record and Replay
method
method
enablePipelineDebugging(self, enable: bool = True)Pipeline debugging
method
getAllNodes(self) -> list[Node]: list[Node]Get a vector of all nodes
method
method
method
method
method
method
getDefaultDeviceProperties(self) -> DeviceProperties|None: DeviceProperties|NoneGets a copy of default device properties. If pipeline is in host only mode, returns host properties, otherwise returns device properties
method
method
getDeviceProperties(self, device: Device) -> DeviceProperties: DevicePropertiesGets device properties of the given pipeline device
method
getDeviceState(self, device: Device) -> DeviceState: DeviceStateGet the pipeline-level state of a device: RUNNING, DISCONNECTED, RECONNECTING or FAILED. Losing a device does not stop the pipeline (its streams go idle) unless it was the last device alive or a device consuming other devices' streams. See setStopOnDeviceLoss to stop on any device loss.
method
getDevices(self) -> list[Device]: list[Device]Get all devices that are part of this pipeline - the default device (master) first, then the rest in registration order. Devices become part of the pipeline explicitly via addDevice or implicitly on first use by a node.
method
method
method
getGlobalProperties(self) -> GlobalProperties: GlobalPropertiesReturns: Global properties of current pipeline
method
getMultiDeviceCalibration(self) -> list[MultiDeviceExtrinsics]|None: list[MultiDeviceExtrinsics]|NoneGets the cross-device calibration graph from the pipeline Returns: the graph when one is set, std::nullopt otherwise
method
getNode(self, arg0: int) -> Node: NodeGet node with id if it exists, nullptr otherwise
method
method
getStopOnDeviceLoss(self) -> bool: boolGet whether the pipeline stops when any device that runs a node is lost for good
method
method
method
method
method
remove(self, node: Node)Removes a node from pipeline
method
method
serializeToJson(self, arg0: bool) -> json: jsonReturns whole pipeline represented as JSON
method
method
method
method
method
setDefaultDeviceProperties(self, deviceProperties: DeviceProperties)Sets default device properties
method
setDeviceProperties(self, device: Device, deviceProperties: DeviceProperties)Sets device properties of the given pipeline device
method
setDeviceStateCallback(self, callback: typing.Callable[[Device, DeviceState], None])Set a callback invoked on every device state transition. The callback is invoked from the affected device's monitor thread; do not block in it and do not call pipeline stop/start from it directly.
method
method
setMultiDeviceCalibration(self, graph: list[MultiDeviceExtrinsics])Sets the cross-device calibration graph shared by all devices in the pipeline. The graph is validated with beta::MultiDeviceCalibrationHandler. Before the pipeline is built it is only stored and travels to the devices with the pipeline schema. On a built pipeline it is additionally checked against every assigned device's local calibration and pushed to all assigned devices at runtime, so already streaming Camera and ToF nodes switch to the new graph. Throws: std::invalid_argument when the graph structure is invalid Throws: std::runtime_error when a device's local calibration does not match the graph or a device rejects the update; devices updated before the failure are restored to the previous graph and the pipeline keeps the previous graph Parameter ``graph``: Directed cross-device calibration edges.
method
method
setSippDmaBufferSize(self, sizeBytes: int)
setSippDmaBufferSize(self, device: Device, sizeBytes: int)method
setStopOnDeviceLoss(self, stop: bool)Stop the pipeline when any device that runs a node is lost for good (strict mode). Off by default (permissive mode): the pipeline keeps running, the lost device's streams go idle and it stops only when the last device alive or a device consuming other devices' streams is lost. A device is lost for good when its state becomes FAILED - after the reconnection attempts are exhausted. To stop as soon as a device disconnects, disable reconnection on the devices (Device::setMaxReconnectionAttempts(0)). Can be changed while the pipeline runs. Parameter ``stop``: True to stop the pipeline on any device loss
method
method
method
method
class
depthai.Pipeline.AutoCalibrationMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DeviceInfo
variable
variable
variable
variable
variable
variable
static method
DeviceInfo.local() -> DeviceInfo: DeviceInfoDeviceInfo of the local device reachable over shared memory (a pipeline process running on the device itself). Booted state and LOCAL_SHDMEM protocol are set, so constructing a Device from it skips the network device search.
method
method
method
method
class
depthai.DeviceDesc
variable
variable
variable
variable
variable
variable
method
class
depthai.XLinkDeviceState
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.XLinkProtocol
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.XLinkPlatform
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.XLinkError_t
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.XLinkConnection
static method
static method
static method
static method
static method
XLinkConnection.getGlobalProfilingData() -> ProfilingData: ProfilingDataGet current accumulated profiling data Returns: ProfilingData from the specific connection
method
method
getDeviceInfo(self) -> DeviceInfo: DeviceInfoGet device information of this connection. The protocol reflects the actually negotiated protocol (e.g. TCP_IP_OR_LOCAL_SHDMEM resolves to the transport in use).
class
depthai.Platform
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.CrashDump
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
static method
CrashDump.fromBytes(bytes: bytes) -> CrashDump: CrashDumpDeserialize the crash dump from a byte array (bytes in filesystem after calling toBytes) Parameter ``bytes``: Byte array Returns: Unique pointer to the appropriate CrashDump subclass
static method
CrashDump.load(tarPath: os.PathLike) -> CrashDump: CrashDumpFactory method to create a CrashDump from a tar file Parameter ``tarPath``: Path to the tar file Returns: Unique pointer to the CrashDump instance
method
method
method
method
method
method
fromTar(self, tarPath: os.PathLike)Deserialize the crash dump from a tar file Parameter ``tarPath``: Path to the input tar file
method
getCrashDumpVersion(self) -> str: strGet the version of the crash dump format Returns: Version string
method
getPlatform(self) -> Platform: PlatformIdentify the platform that this crashdump corresponds to Returns: Platform enum value
method
toBytes(self) -> bytes: bytesSerialize the crash dump to a byte array (bytes in filesystem after calling toTar) Returns: Byte array
method
toTar(self, tarPath: os.PathLike)Serialize the crash dump to a tar file Parameter ``tarPath``: Path to the output tar file
class
depthai.CrashDumpRVC2(depthai.CrashDump)
class
depthai.CrashDumpRVC2.CrashReportCollection
variable
variable
variable
method
class
depthai.CrashDumpRVC2.CrashReport
class
class
variable
variable
variable
variable
variable
method
property
prints
Device print/log lines captured around the crash.
method
property
statusFlags
Platform-specific crash/status flags captured with the report.
method
property
timerRaw
Raw device timer value captured in the crash report.
method
property
uptimeNs
Device uptime in nanoseconds at crash-report capture time.
method
class
depthai.CrashDumpRVC2.CrashReport.ErrorSourceInfo
class
depthai.CrashDumpRVC2.CrashReport.ErrorSourceInfo.AssertContext
class
depthai.CrashDumpRVC2.CrashReport.ErrorSourceInfo.TrapContext
class
depthai.CrashDumpRVC2.CrashReport.ThreadCallstack
class
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.CrashDumpRVC2.CrashReport.ThreadCallstack.CallstackContext
variable
variable
variable
variable
method
class
depthai.CrashDumpRVC4(depthai.CrashDump)
class
depthai.DeviceBase
static method
DeviceBase.getAllAvailableDevices() -> list[DeviceInfo]: list[DeviceInfo]Returns all available devices Returns: Vector of available devices
static method
DeviceBase.getAllConnectedDevices() -> list[DeviceInfo]: list[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 method
static method
DeviceBase.getDeviceById(deviceId: str) -> tuple[bool, DeviceInfo]: tuple[bool, DeviceInfo]Finds a device by Device ID. Example: 14442C10D13EABCE00 Parameter ``deviceId``: Device ID which uniquely specifies a device Returns: Tuple of bool and DeviceInfo. Bool specifies if device was found. DeviceInfo specifies the found device
static method
DeviceBase.getDeviceByIdOrName(deviceIdOrName: str) -> tuple[bool, DeviceInfo]: tuple[bool, DeviceInfo]Resolves a device from an IP address, name, or device ID without connecting to it. Parameter ``deviceIdOrName``: IP address, name, or device ID of the target device Returns: Tuple of bool and DeviceInfo. Bool specifies if device was found. DeviceInfo specifies the found device
static method
static method
DeviceBase.getFirstAvailableDevice(skipInvalidDevices: bool = True) -> tuple[bool, DeviceInfo]: tuple[bool, 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 method
DeviceBase.getGlobalProfilingData() -> ProfilingData: ProfilingDataGet current global accumulated profiling data Returns: ProfilingData from all devices
static method
DeviceBase.isInSetupMode(deviceIdOrName: str) -> bool|None: bool|NoneResolves a device from an IP address, name, or device ID without connecting to it and returns whether the resolved device is in setup mode. Parameter ``deviceIdOrName``: IP address, name, or device ID of the target device Returns: std::nullopt if the device could not be resolved, otherwise true if the resolved device is in X_LINK_GATE_SETUP state and false otherwise
static method
DeviceBase.performHealthCheck(deviceInfo: DeviceInfo, config: HealthCheckConfig = ...) -> HealthCheckMetrics: HealthCheckMetricsPerforms a device health check. The function connects to the supplied device, gathers device properties, and runs a short diagnostic pipeline for the checks enabled in the config. Parameter ``devInfo``: DeviceInfo which specifies which device to check Parameter ``config``: Health-check steps to execute Returns: HealthCheckMetrics with per-check pass/fail status and measured values
method
method
method
method
addLogCallback(self, callback: typing.Callable[[LogMessage], None]) -> int: intAdd 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
method
close(self)Closes the connection to device. Better alternative is the usage of context manager: `with depthai.Device(pipeline) as device:`
method
crashDevice(self)Crashes the device $.. warning:: ONLY FOR TESTING PURPOSES, it causes an unrecoverable crash on the device
method
factoryResetCBACalibration(self, camSocket: CameraBoardSocket)Factory reset EEPROM data of the CBA if factory backup is available. Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) Throws: std::runtime_error If factory reset was unsuccessful $.. warning:: Experimental feature. This API might change or be removed in a future release.
method
factoryResetCalibration(self)Factory reset EEPROM data if factory backup is available. Throws: std::runtime_error If factory reset was unsuccessful
method
flashCBACalibration(self, calibrationDataHandler: CBACalibrationHandler, camSocket: CameraBoardSocket)Stores the Calibration and Device information to the CBA EEPROM Throws: std::runtime_error if failed to flash the calibration Parameter ``calibrationObj``: CBACalibrationHandler object which is loaded with calibration information. Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) $.. warning:: Experimental feature. This API might change or be removed in a future release.
method
flashCBAEepromClear(self, camSocket: CameraBoardSocket)Destructive action, deletes User area EEPROM contents on CBA Requires PROTECTED permissions Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) Throws: std::runtime_error if failed to flash the calibration $.. warning:: Experimental feature. This API might change or be removed in a future release. Returns: True on successful flash, false on failure
method
flashCalibration(self, arg0: CalibrationHandler)Stores the Calibration and Device information to the Device EEPROM Throws: std::runtime_error if failed to flash the calibration Parameter ``calibrationObj``: CalibrationHandler object which is loaded with calibration information.
method
flashEepromClear(self)Destructive action, deletes User area EEPROM contents Requires PROTECTED permissions Throws: std::runtime_error if failed to flash the calibration Returns: True on successful flash, false on failure
method
flashFactoryCBACalibration(self, calibrationHandler: CBACalibrationHandler, camSocket: CameraBoardSocket)Stores the Calibration and Device information to the CBA EEPROM in Factory area To perform this action, correct env variable must be set Parameter ``calibrationHandler``: CBACalibrationHandler Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) Throws: std::runtime_error if failed to flash the calibration $.. warning:: Experimental feature. This API might change or be removed in a future release. Returns: True on successful flash, false on failure
method
flashFactoryCBAEepromClear(self, camSocket: CameraBoardSocket)Destructive action, deletes Factory area EEPROM contents on CBA Requires FACTORY PROTECTED permissions Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) Throws: std::runtime_error if failed to flash the calibration $.. warning:: Experimental feature. This API might change or be removed in a future release. Returns: True on successful flash, false on failure
method
flashFactoryCalibration(self, arg0: CalibrationHandler)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_error if failed to flash the calibration Returns: True on successful flash, false on failure
method
flashFactoryEepromClear(self)Destructive action, deletes Factory area EEPROM contents Requires FACTORY PROTECTED permissions Throws: std::runtime_error if failed to flash the calibration Returns: True on successful flash, false on failure
method
getAvailableStereoPairs(self) -> list[StereoPair]: list[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
method
getBootloaderVersion(self) -> Version|None: Version|NoneGets Bootloader version if it was booted through Bootloader Returns: DeviceBootloader::Version if booted through Bootloader or none otherwise
method
getCalibration(self) -> CalibrationHandler: CalibrationHandlerRetrieves the CalibrationHandler object containing the non-persistent calibration Throws: std::runtime_error if failed to get the calibration Returns: The CalibrationHandler object containing the non-persistent calibration
method
getCameraSensorNames(self) -> dict[CameraBoardSocket, str]: dict[CameraBoardSocket, str]Get sensor names for cameras that are connected to the device Returns: Map/dictionary with camera sensor names, indexed by socket
method
getChipTemperature(self) -> ChipTemperature: ChipTemperatureRetrieves current chip temperature as measured by device Returns: Temperature of various onboard sensors
method
getCmxMemoryUsage(self) -> MemoryInfo: MemoryInfoRetrieves current CMX memory information from device Returns: Used, remaining and total cmx memory
method
getConnectedCameraFeatures(self) -> list[CameraFeatures]: list[CameraFeatures]Get cameras that are connected to the device with their features/properties Returns: Vector of connected camera features
method
method
getConnectedIMU(self) -> str: strGet connected IMU type Returns: IMU type
method
getConnectionInterfaces(self) -> list[connectionInterface]: list[connectionInterface]Get connection interfaces for device Returns: Vector of connection type
method
getCrashDump(self, clearCrashDump: bool = True) -> CrashDump: CrashDumpRetrieves crash dump for debugging. Parameter ``clearCrashDump``: Clear the cached crash dump on device after collection Returns: Unique pointer to the CrashDump. Platform-specific crash dump payload may be empty if no crash dump is available.
method
getDdrMemoryUsage(self) -> MemoryInfo: MemoryInfoRetrieves current DDR memory information from device Returns: Used, remaining and total ddr memory
method
getDeviceId(self) -> str: strGet DeviceId of device Returns: DeviceId of connected device
method
getDeviceInfo(self) -> DeviceInfo: DeviceInfoGet the Device Info object o the device which is currently running Returns: DeviceInfo of the current device in execution
method
getDeviceName(self) -> typing.Any: typing.AnyGet device name if available Returns: device name or empty string if not available
method
getDeviceState(self) -> DeviceState: DeviceStateState of this device from the point of view of the pipeline it belongs to: RUNNING while connected, DISCONNECTED / RECONNECTING while a lost connection is being re-established and FAILED once it is gone for good. RUNNING for a device that is not part of a pipeline. Safe to call from any thread, including node threads.
method
getEmbeddedIMUFirmwareVersion(self) -> Version: VersionGet embedded IMU firmware version to which IMU can be upgraded Returns: Get embedded IMU firmware version to which IMU can be upgraded.
method
getExternalFrameSyncRole(self) -> ExternalFrameSyncRole: ExternalFrameSyncRoleGets external frame sync role for the device Returns: Gets external frame sync role
method
getIMUFirmwareUpdateStatus(self) -> tuple[bool, float]: 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
method
getIMUFirmwareVersion(self) -> Version: VersionGet connected IMU firmware version Returns: IMU firmware version
method
getIrDrivers(self) -> list[tuple[str, int, int]]: list[tuple[str, int, int]]Retrieves detected IR laser/LED drivers. Returns: Vector of tuples containing: driver name, I2C bus, I2C address. For OAK-D- Pro it should be `[{"LM3644", 2, 0x63}]`method
getLeonCssCpuUsage(self) -> CpuUsage: CpuUsageRetrieves average CSS Leon CPU usage Returns: Average CPU usage and sampling duration
method
getLeonCssHeapUsage(self) -> MemoryInfo: MemoryInfoRetrieves current CSS Leon CPU heap information from device Returns: Used, remaining and total heap memory
method
getLeonMssCpuUsage(self) -> CpuUsage: CpuUsageRetrieves average MSS Leon CPU usage Returns: Average CPU usage and sampling duration
method
getLeonMssHeapUsage(self) -> MemoryInfo: MemoryInfoRetrieves current MSS Leon CPU heap information from device Returns: Used, remaining and total heap memory
method
getLogLevel(self) -> LogLevel: LogLevelGets current logging severity level of the device. Returns: Logging severity level
method
getLogOutputLevel(self) -> LogLevel: LogLevelGets logging level which decides printing level to standard output. Returns: Standard output printing severity
method
getMxId(self) -> str: strGet MxId of device Returns: MxId of connected device
method
getOSVersion(self) -> str: strGets device OS version if supported by the connected device. Returns: OS version string, for example "1.32.0"
method
getPlatform(self) -> Platform: PlatformGet the platform of the connected device Returns: Platform Platform enum
method
getPlatformAsString(self) -> str: strGet the platform of the connected device as string Returns: std::string String representation of Platform
method
getProcessMemoryUsage(self) -> int: intRetrieves current Rss memory usage of the device process Returns: Current Rss memory used
method
getProductName(self) -> typing.Any: typing.AnyGet product name if available Returns: product name or empty string if not available
method
getProfilingData(self) -> ProfilingData: ProfilingDataGet current accumulated profiling data Returns: ProfilingData from the specific device
method
getProperties(self) -> DeviceProperties: DevicePropertiesGets current properties set on the device. Some properties might be not supported by the device, in that case they will have default values. Returns: DeviceProperties struct with current device properties
method
getState(self) -> CrashDump: CrashDumpRetrieves current device state in a crash dump format. It halts the device temporarily and might affect the running pipeline, it's best to close the device after this operation. Supported only on RVC2.
method
getStereoPairs(self) -> list[StereoPair]: list[StereoPair]Get stereo pairs based on the device type. Returns: Vector of stereo pairs
method
getSupportedDeviceModels(self) -> list[DeviceModelZoo]: list[DeviceModelZoo]Returns the subset of device zoo models currently available on the device. Returns: Supported device zoo models
method
getSystemInformationLoggingRate(self) -> float: floatGets current rate of system information logging ("info" severity) in Hz. Returns: Logging rate in Hzmethod
getUsbSpeed(self) -> UsbSpeed: UsbSpeedRetrieves USB connection speed Returns: USB connection speed of connected device if applicable. Unknown otherwise.
method
getXLinkChunkSize(self) -> int: intGets current XLink chunk size. Returns: XLink chunk size in bytes
method
hasCrashDump(self) -> bool: boolRetrieves whether the is crash dump stored on device or not.
method
hasCrashed(self) -> bool: boolCheck if the device has crashed Returns: True if the device has crashed (watchdog timeout detected), false otherwise
method
hasGPU(self) -> bool: boolChecks if a GPU is available on the device. @note This is only meaningful on RVC4 platforms. Returns: True if supported, false otherwise
method
isCBAEepromAvailable(self, camSocket: CameraBoardSocket) -> bool: boolCheck if EEPROM is available for a given CBA Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) .. warning:: Experimental feature. This API might change or be removed in a future release. Returns: True if EEPROM is present on board, false otherwise
method
isClosed(self) -> bool: boolIs 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.
method
isEepromAvailable(self) -> bool: boolCheck if EEPROM is available Returns: True if EEPROM is present on board, false otherwise
method
isGpuStereoSupported(self) -> bool: boolChecks if GPUStereo is supported on the device. @note This is only meaningful on RVC4 platforms. Returns: True if supported, false otherwise
method
isNeuralDepthSupported(self) -> bool: boolChecks if Neural Depth is supported on the device Returns: True if supported, false otherwise
method
isPipelineRunning(self) -> bool: boolChecks if devices pipeline is already running Returns: True if running, false otherwise
method
readCBACalibration(self, camSocket: CameraBoardSocket) -> CBACalibrationHandler: CBACalibrationHandlerFetches the EEPROM data from the CBA and loads it into CalibrationHandler object If no calibration is flashed, it returns default @note This reads EEPROM contents directly and does not merge calibration data from other sources. Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) .. warning:: Experimental feature. This API might change or be removed in a future release. Returns: The CalibrationHandler object containing the calibration currently flashed on CBA EEPROM
method
readCBACalibration2(self, camSocket: CameraBoardSocket) -> CBACalibrationHandler: CBACalibrationHandlerFetches the EEPROM data from the CBA and loads it into CalibrationHandler object @note This reads EEPROM contents directly and does not merge calibration data from other sources. Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) Throws: std::runtime_error if no calibration is flashed $.. warning:: Experimental feature. This API might change or be removed in a future release. Returns: The CalibrationHandler object containing the calibration currently flashed on CBA EEPROM
method
readCBACalibrationOrDefault(self, camSocket: CameraBoardSocket) -> CBACalibrationHandler: CBACalibrationHandlerFetches the EEPROM data from the CBA and loads it into CalibrationHandler object If no calibration is flashed, it returns default @note This reads EEPROM contents directly and does not merge calibration data from other sources. Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) .. warning:: Experimental feature. This API might change or be removed in a future release. Returns: The CalibrationHandler object containing the calibration currently flashed on CBA EEPROM
method
readCalibration(self) -> CalibrationHandler: CalibrationHandlerFetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default @note This reads EEPROM contents directly and does not merge calibration data from other sources. Returns: The CalibrationHandler object containing the calibration currently flashed on device EEPROM
method
readCalibration2(self) -> CalibrationHandler: CalibrationHandlerFetches the EEPROM data from the device and loads it into CalibrationHandler object @note This reads EEPROM contents directly and does not merge calibration data from other sources. Throws: std::runtime_error if no calibration is flashed Returns: The CalibrationHandler object containing the calibration currently flashed on device EEPROM
method
readCalibrationOrDefault(self) -> CalibrationHandler: CalibrationHandlerFetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default @note This reads EEPROM contents directly and does not merge calibration data from other sources. Returns: The CalibrationHandler object containing the calibration currently flashed on device EEPROM
method
readCalibrationRaw(self) -> bytes: bytesFetches the raw EEPROM data from User area Throws: std::runtime_error if any error occurred Returns: Binary dump of User area EEPROM data
method
readCcmEepromRaw(self, socket: CameraBoardSocket, size: int, offset: int = 0) -> bytes: bytesFetches the raw EEPROM data from the specified CCM (compact camera module). Note: only certain CCMs (e.g. ToF) do have an EEPROM chip on-module Parameter ``socket``: CameraBoardSocket where the CCM is placed Parameter ``size``: Size in bytes to read Parameter ``offset``: Absolute offset in EEPROM memory to read from Throws: std::runtime_exception if any error occurred Returns: Binary dump of EEPROM data
method
readFactoryCBACalibration(self, camSocket: CameraBoardSocket) -> CBACalibrationHandler: CBACalibrationHandlerFetches the CBA EEPROM data from Factory area and loads it into CalibrationHandler object Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) Throws: std::runtime_error if no calibration is flashed $.. warning:: Experimental feature. This API might change or be removed in a future release. Returns: The CalibrationHandler object containing the calibration currently flashed on CBA EEPROM in Factory Area
method
readFactoryCBACalibrationOrDefault(self, camSocket: CameraBoardSocket) -> CBACalibrationHandler: CBACalibrationHandlerFetches the CBA EEPROM data from Factory area and loads it into CalibrationHandler object If no calibration is flashed, it returns default Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) .. warning:: Experimental feature. This API might change or be removed in a future release. Returns: The CalibrationHandler object containing the calibration currently flashed on CBA EEPROM in Factory Area
method
readFactoryCalibration(self) -> CalibrationHandler: CalibrationHandlerFetches the EEPROM data from Factory area and loads it into CalibrationHandler object Throws: std::runtime_error if no calibration is flashed Returns: The CalibrationHandler object containing the calibration currently flashed on device EEPROM in Factory Area
method
readFactoryCalibrationOrDefault(self) -> CalibrationHandler: CalibrationHandlerFetches 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
method
readFactoryCalibrationRaw(self) -> bytes: bytesFetches the raw EEPROM data from Factory area Throws: std::runtime_error if any error occurred Returns: Binary dump of Factory area EEPROM data
method
registerCrashdumpCallback(self, callback: typing.Callable[[CrashDump], None])Register a callback that will be called when the device crashes. The callback receives a shared pointer to the CrashDump, which can be modified before it is stored. Only one callback can be registered at a time. Parameter ``callback``: Callback to call when a crash dump is collected
method
removeCrashdumpCallback(self)Removes the registered crash dump callback
method
removeLogCallback(self, callbackId: int) -> bool: boolRemoves a callback Parameter ``callbackId``: Id of callback to be removed Returns: True if callback was removed, false otherwise
method
setCalibration(self, arg0: CalibrationHandler)Sets the Calibration at runtime. This is not persistent and will be lost after device reset. Throws: std::runtime_error if failed to set the calibration Parameter ``calibrationObj``: CalibrationHandler object which is loaded with calibration information.
method
setExternalFrameSyncRole(self, role: ExternalFrameSyncRole) -> tuple[bool, str]: tuple[bool, str]Sets external frame sync role for the device Parameter ``role``: External frame sync role to be set, AUTO_DETECT by default Returns: Tuple of bool and string. Bool specifies if role was set without failures. String is the error message describing the failure reason.
method
method
setExternalStrobeRelativeLimits(self, min: float, max: float) -> tuple[bool, str]: tuple[bool, str]Sets the relative external strobe limits. Limits the strobe duty cycle, between 0 and 1, as a fraction of the whole period. 0 means always off, 1 means always on. The rising edge of the strobe signal is always synced to end of exposure. The falling edge of the strobe signal is then limited according to the min and max values. Default values are 0.005 and 0.995 Parameter ``min``: Minimum strobe value Parameter ``max``: Maximum strobe value Returns: Tuple of bool and string. Bool specifies if role was set without failures. String is the error message describing the failure reason.
method
setIrFloodLightIntensity(self, intensity: float, mask: int = -1) -> bool: boolSets 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
method
setIrLaserDotProjectorIntensity(self, intensity: float, mask: int = -1) -> bool: boolSets 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
method
setLogLevel(self, level: LogLevel)Sets the devices logging severity level. This level affects which logs are transferred from device to host. Parameter ``level``: Logging severity
method
setLogOutputLevel(self, level: LogLevel)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
method
setMaxReconnectionAttempts(self, maxAttempts: int, callback: typing.Callable[[Device.ReconnectionStatus], None] = None)Sets max number of automatic reconnection attempts Parameter ``maxAttempts``: Maximum number of reconnection attempts, 0 to disable reconnection Parameter ``callBack``: Callback to be called when reconnection is attempted
method
setMultiDeviceCalibration(self, graph: list[MultiDeviceExtrinsics]|None)Sets the cross-device calibration graph at runtime. This is not persistent and will be lost after device reset. The device re-validates the graph against its local calibration before applying it. Throws: std::runtime_error if the device rejects the graph Parameter ``graph``: Cross-device calibration edges, or std::nullopt to remove the graph
method
setProperties(self, properties: DeviceProperties)Sets properties for the device. Parameter ``properties``: DeviceProperties struct with properties to set. Only properties which are supported by the device and have different values than current ones will be applied. Some properties are only applied before starting the pipeline.
method
setSippBufferSize(self, sizeBytes: int)Sets the size of the SIPP buffer on the device. Parameter ``sizeBytes``: SIPP buffer size in bytes. Device default is 18 * 1024 bytes
method
setSippDmaBufferSize(self, sizeBytes: int)Sets the size of the SIPP DMA buffer on the device. Parameter ``sizeBytes``: SIPP DMA buffer size in bytes. Device default is 16 * 1024 bytes
method
setSystemInformationLoggingRate(self, rateHz: float)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 Hzmethod
method
setXLinkChunkSize(self, sizeBytes: int)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
method
setXLinkRateLimit(self, maxRateBytesPerSecond: int, burstSize: int = 0, waitUs: int = 0)Sets the maximum transmission rate for the XLink connection on device side, using a simple token bucket algorithm. Useful for bandwidth throttling Parameter ``maxRateBytesPerSecond``: Rate limit in Bytes/second Parameter ``burstSize``: Size in Bytes for how much to attempt to send once, 0 = auto Parameter ``waitUs``: Time in microseconds to wait for replenishing tokens, 0 = auto
method
startIMUFirmwareUpdate(self, forceUpdate: bool = False) -> bool: boolStarts 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.
method
tryFlashCBACalibration(self, calibrationDataHandler: CBACalibrationHandler, camSocket: CameraBoardSocket) -> bool: boolStores the Calibration and Device information to the CBA EEPROM Parameter ``calibrationObj``: CBACalibrationHandler object which is loaded with calibration information. Parameter ``camSocket``: CameraBoardSocket of the CBA (Camera Board Assembly) .. warning:: Experimental feature. This API might change or be removed in a future release. Returns: true on successful flash, false on failure
method
tryFlashCalibration(self, calibrationDataHandler: CalibrationHandler) -> bool: boolStores 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
method
writeCcmEepromRaw(self, socket: CameraBoardSocket, data: bytes, offset: int = 0)Writes the raw EEPROM data from the specified CCM (compact camera module). Note: only certain CCMs (e.g. ToF) do have an EEPROM chip on-module Requires FACTORY PROTECTED permissions Parameter ``socket``: CameraBoardSocket where the CCM is placed Parameter ``data``: Data buffer to write Parameter ``offset``: Absolute offset in EEPROM memory to read from Throws: std::runtime_exception if any error occurred
class
depthai.Device(depthai.DeviceBase)
class
Config
Device specific configuration
class
ReconnectionStatus
Members: RECONNECT_FAILED RECONNECTED RECONNECTING
method
class
depthai.Device.Config
variable
variable
variable
variable
variable
method
class
depthai.Device.ReconnectionStatus
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.HealthCheckConfig
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.HealthCheckIssue
class
depthai.HealthCheckMetrics
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
class
depthai.HealthCheckIssueType
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.HealthCheckIssueStage
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.UsbGeneration
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.HealthCheckResult
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.BoardConfig
class
USB
USB related config
class
Network
Network configuration
class
GPIO
GPIO config
class
UART
UART instance config
class
UVC
UVC configuration for USB descriptor
class
class
class
class
class
variable
variable
variable
variable
variable
method
property
emmc
eMMC config
method
property
logDevicePrints
log device prints
method
property
logPath
log path
method
property
logSizeMax
Max log size
method
property
logVerbosity
log verbosity
method
property
mipi4LaneRgb
MIPI 4Lane RGB config
method
property
pcieInternalClock
PCIe config
method
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)
method
property
uart
UART instance map
method
property
usb3PhyInternalClock
USB3 phy config
method
property
watchdogTimeoutMs
Watchdog config
method
class
depthai.BoardConfig.USB
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.BoardConfig.Network
class
depthai.BoardConfig.GPIO
class
Mode
Members: ALT_MODE_0 : ALT_MODE_1 : ALT_MODE_2 : ALT_MODE_3 : ALT_MODE_4 : ALT_MODE_5 : ALT_MODE_6 : DIRECT :
class
Direction
Members: INPUT : OUTPUT :
class
Level
Members: LOW : HIGH :
class
Pull
Members: NO_PULL : PULL_UP : PULL_DOWN : BUS_KEEPER :
class
Drive
Drive strength in mA (2, 4, 8 and 12mA) Members: MA_2 : MA_4 : MA_8 : MA_12 :
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.BoardConfig.GPIO.Mode
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.BoardConfig.GPIO.Direction
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.BoardConfig.GPIO.Level
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.BoardConfig.GPIO.Pull
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.BoardConfig.GPIO.Drive
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.BoardConfig.UART
class
depthai.BoardConfig.UVC
variable
variable
variable
variable
variable
method
class
depthai.BoardConfig.GPIOMap
method
__bool__(self) -> bool: boolCheck whether the map is nonempty
method
method
method
method
method
method
method
method
method
method
class
depthai.BoardConfig.KeysView
class
depthai.BoardConfig.ValuesView
class
depthai.BoardConfig.ItemsView
class
depthai.BoardConfig.UARTMap
method
__bool__(self) -> bool: boolCheck whether the map is nonempty
method
method
method
method
method
method
method
method
method
method
class
depthai.Clock
class
depthai.DeviceBootloader
class
Type
Members: AUTO USB NETWORK
class
Memory
Members: AUTO FLASH EMMC
class
Section
Members: AUTO HEADER BOOTLOADER BOOTLOADER_CONFIG APPLICATION
class
class
class
class
class
static method
DeviceBootloader.getAllAvailableDevices() -> list[DeviceInfo]: list[DeviceInfo]Searches for connected devices in either UNBOOTED or BOOTLOADER states. Returns: Vector of all found devices
static method
DeviceBootloader.getEmbeddedBootloaderBinary(arg0: DeviceBootloader.Type) -> ...: ...Returns: Embedded bootloader binary
static method
DeviceBootloader.getEmbeddedBootloaderVersion() -> Version: VersionReturns: Embedded bootloader version
static method
DeviceBootloader.getFirstAvailableDevice() -> tuple[bool, DeviceInfo]: tuple[bool, 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
method
method
method
method
bootMemory(self, fw: ..., std: ...)Boots a custom FW in memory Parameter ``fw``: $Throws: A runtime exception if there are any communication issues
method
bootUsbRomBootloader(self)Boots into integrated ROM bootloader in USB mode Throws: A runtime exception if there are any communication issues
method
close(self)Closes the connection to device. Better alternative is the usage of context manager: `with depthai.DeviceBootloader(deviceInfo) as bootloader:`
method
flashBootHeader(self, memory: DeviceBootloader.Memory, frequency: int = -1, location: int = -1, dummyCycles: int = -1, offset: int = -1) -> tuple[bool, str]: 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>
method
method
flashClear(self, memory: DeviceBootloader.Memory = ...) -> tuple[bool, str]: 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
method
flashConfig(self, config: DeviceBootloader.Config, memory: DeviceBootloader.Memory = ..., type: DeviceBootloader.Type = ...) -> tuple[bool, str]: 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
method
flashConfigClear(self, memory: DeviceBootloader.Memory = ..., type: DeviceBootloader.Type = ...) -> tuple[bool, str]: 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
method
flashConfigData(self, configData: json, memory: DeviceBootloader.Memory = ..., type: DeviceBootloader.Type = ...) -> tuple[bool, str]: 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
method
flashConfigFile(self, configData: os.PathLike, memory: DeviceBootloader.Memory = ..., type: DeviceBootloader.Type = ...) -> tuple[bool, str]: 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
method
method
flashFastBootHeader(self, memory: DeviceBootloader.Memory, frequency: int = -1, location: int = -1, dummyCycles: int = -1, offset: int = -1) -> tuple[bool, str]: 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>
method
flashGpioModeBootHeader(self, memory: DeviceBootloader.Memory, mode: int) -> tuple[bool, str]: tuple[bool, str]Flash boot header which boots same as equivalent GPIO mode would Parameter ``gpioMode``: GPIO mode equivalent
method
flashUsbRecoveryBootHeader(self, memory: DeviceBootloader.Memory) -> tuple[bool, str]: tuple[bool, str]Flash USB recovery boot header. Switches to USB ROM Bootloader Parameter ``memory``: Which memory to flash the header to
method
flashUserBootloader(self, progressCallback: typing.Callable[[float], None], path: os.PathLike = '') -> tuple[bool, str]: 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
method
getMemoryInfo(self, arg0: DeviceBootloader.Memory) -> DeviceBootloader.MemoryInfo: DeviceBootloader.MemoryInfoRetrieves information about specified memory Parameter ``memory``: Specifies which memory to query
method
getType(self) -> DeviceBootloader.Type: DeviceBootloader.TypeReturns: Type of currently connected bootloader
method
getVersion(self) -> Version: VersionReturns: Version of current running bootloader
method
isAllowedFlashingBootloader(self) -> bool: boolReturns: True if allowed to flash bootloader
method
isEmbeddedVersion(self) -> bool: boolReturns: 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.
method
isUserBootloader(self) -> bool: boolRetrieves whether current bootloader is User Bootloader (B out of A/B configuration)
method
isUserBootloaderSupported(self) -> bool: boolChecks whether User Bootloader is supported with current bootloader Returns: true of User Bootloader is supported, false otherwise
method
readApplicationInfo(self, memory: DeviceBootloader.Memory) -> DeviceBootloader.ApplicationInfo: DeviceBootloader.ApplicationInfoReads information about flashed application in specified memory from device Parameter ``memory``: Specifies which memory to query
method
readConfig(self, memory: DeviceBootloader.Memory = ..., type: DeviceBootloader.Type = ...) -> DeviceBootloader.Config: DeviceBootloader.ConfigReads 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
method
readConfigData(self, memory: DeviceBootloader.Memory = ..., type: DeviceBootloader.Type = ...) -> json: jsonReads 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
method
class
depthai.DeviceBootloader.Type
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DeviceBootloader.Memory
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DeviceBootloader.Section
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.DeviceBootloader.UsbConfig
class
depthai.DeviceBootloader.NetworkConfig
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.DeviceBootloader.Config
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
method
class
depthai.DeviceBootloader.ApplicationInfo
variable
variable
variable
method
class
depthai.DeviceBootloader.MemoryInfo
class
depthai.CalibrationHandler
static method
CalibrationHandler.fromJson(eepromDataJson: json, validateExtrinsics: bool|None = None) -> CalibrationHandler: CalibrationHandlerConstruct a new Calibration Handler object from JSON EepromData. Parameter ``eepromDataJson``: EepromData as JSON Parameter ``validateCalibration``: Enable internal check for extrinsics cycling links or dangling references.
method
method
eepromToJson(self) -> json: jsonGet JSON representation of calibration data Returns: JSON structure
method
eepromToJsonFile(self, destPath: os.PathLike) -> bool: boolWrite 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
method
getAccelerometerCalibration(self) -> list[list[float]]: list[list[float]]Get canonical accelerometer calibration matrix [Q|b]. The linear transform Q is dimensionless. The bias column b is stored in SI units of [m/s^2]. Returns: returns 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]
method
getBaselineDistance(self, cam1: CameraBoardSocket = ..., cam2: CameraBoardSocket = ..., useSpecTranslation: bool = True, unit: LengthUnit = ...) -> float: floatGet the baseline distance between two specified cameras. By default it will get the baseline between CameraBoardSocket.RIGHT and CameraBoardSocket.LEFT. Parameter ``cam1``: First camera Parameter ``cam2``: Second camera Parameter ``useSpecTranslation``: Enabling this bool uses the translation information from the board design data (not the calibration data) Parameter ``unit``: Units of the returned baseline distance (default: centimeters) Returns: baseline distance
method
getCameraExtrinsics(self, srcCamera: CameraBoardSocket, dstCamera: CameraBoardSocket, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> list[list[float]]: 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 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 Parameter ``unit``: Units of the returned translation (default: centimeters) 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]method
method
getCameraRotationMatrix(self, srcCamera: CameraBoardSocket, dstCamera: CameraBoardSocket) -> list[list[float]]: list[list[float]]Get the Camera rotation matrix 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 rotation vector from the SrcCamera Returns: a 3x3 rotation matrix Matrix representation of rotation matrix \f[ \text{Rotation Matrix} = \left [ \begin{matrix} r_{00} & r_{01} & r_{02}\\ r_{10} & r_{11} & r_{12}\\ r_{20} & r_{21} & r_{22}\\ \end{matrix} \right ] \f]method
getCameraToImuExtrinsics(self, cameraId: CameraBoardSocket, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> list[list[float]]: 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 Parameter ``unit``: Units of the returned translation (default: centimeters) 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]method
getCameraTranslationVector(self, srcCamera: CameraBoardSocket, dstCamera: CameraBoardSocket, useSpecTranslation: bool = True, unit: LengthUnit = ...) -> list[float]: 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) Parameter ``unit``: Units of the returned translation (default: centimeters) Returns: a translation vector like [x, y, z]
method
getCameraWithLowestId(self) -> CameraBoardSocket: CameraBoardSocketGet the lowest camera socket Returns: the lowest camera socket
method
getDefaultIntrinsics(self, cameraId: CameraBoardSocket) -> tuple[list[list[float]], int, int]: 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]method
getDistortionCoefficients(self, cameraId: CameraBoardSocket) -> list[float]: list[float]Get the Distortion Coefficients object Parameter ``cameraId``: Uses the cameraId to identify which distortion Coefficients to return. Returns: the distortion coefficients of the requested camera in this order: [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
method
getDistortionModel(self, cameraId: CameraBoardSocket) -> CameraModel: CameraModelGet 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.
method
getEepromData(self) -> EepromData: EepromDataGet the Eeprom Data object Returns: EepromData object which contains the raw calibration data
method
getFov(self, cameraId: CameraBoardSocket, useSpec: bool = True) -> float: floatGet 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.
method
getGyroscopeCalibration(self) -> list[list[float]]: list[list[float]]Get canonical gyroscope calibration matrix [Q|b]. The linear transform Q is dimensionless. The bias column b is stored in SI units of [rad/s]. Returns: returns 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]
method
getHousingCalibration(self, srcCamera: CameraBoardSocket, housingCS: HousingCoordinateSystem, useSpecTranslation: bool = True, unit: LengthUnit = ...) -> list[list[float]]: list[list[float]]Get the transformation matrix between a camera and a chosen housing coordinate system. The returned 4x4 homogeneous transformation matrix maps points from the camera's coordinate system into the specified housing coordinate system. The transformation consists of a rotation matrix and translation vector extracted either from the calibration data or from the board design (specification) data, depending on the `useSpecTranslation` flag. Parameter ``srcCamera``: Camera whose coordinate frame will be treated as the origin. Parameter ``housingCS``: The housing coordinate system to which the camera transformation is requested (e.g. VESA_RIGHT, FRONT_COVER_LEFT, etc.). Parameter ``useSpecTranslation``: If true, uses board-design (spec) translation values. If false, uses calibrated translation values. Parameter ``unit``: Units of the returned translation (default: centimeters) Returns: A 4x4 homogeneous transformation matrix. Matrix representation of the transformation: \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]method
getImuNoiseParameters(self) -> ImuNoiseParameters: ImuNoiseParametersGet complete IMU noise parameters. Accelerometer noise terms are stored in [m/s^2]-based units. Gyroscope noise terms are stored in [rad/s]-based units. Returns: returns IMU noise parameters
method
getImuParameters(self) -> ImuCalibrationParams: ImuCalibrationParamsGet full IMU parameter payload. Accelerometer calibration bias terms are stored in [m/s^2]. Gyroscope calibration bias terms are stored in [rad/s]. Returns: returns IMU parameters containing noise + calibration matrices
method
getImuToCameraExtrinsics(self, cameraId: CameraBoardSocket, useSpecTranslation: bool = False, unit: LengthUnit = ...) -> list[list[float]]: 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 Parameter ``unit``: Units of the returned translation (default: centimeters) 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]method
getLensPosition(self, cameraId: CameraBoardSocket) -> int: intGet 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.
method
getSourceHeight(self, cameraId: CameraBoardSocket) -> int: intGet the source height of the camera from the calibration data. Parameter ``cameraId``: Uses the cameraId to identify which camera source height to return Returns: the source height of the camera from the calibration data.
method
getSourceWidth(self, cameraId: CameraBoardSocket) -> int: intGet the source width of the camera from the calibration data. Parameter ``cameraId``: Uses the cameraId to identify which camera source width to return Returns: the source width of the camera from the calibration data.
method
getStereoLeftCameraId(self) -> CameraBoardSocket: CameraBoardSocketGet 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
method
getStereoLeftRectificationRotation(self) -> list[list[float]]: list[list[float]]Get the Stereo Left Rectification Rotation object Returns: returns a 3x3 rectification rotation matrix
method
getStereoRightCameraId(self) -> CameraBoardSocket: CameraBoardSocketGet 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
method
getStereoRightRectificationRotation(self) -> list[list[float]]: list[list[float]]Get the Stereo Right Rectification Rotation object Returns: returns a 3x3 rectification rotation matrix
method
hasCalibrationData(self) -> bool: boolReturns true when calibration payload is supported and contains camera calibration entries. This check is not presence-only: it returns true only when `eepromData.version >= 4` (supported by intrinsics-dependent APIs) and `cameraData` is non-empty.
method
hasCameraCalibration(self, cameraId: CameraBoardSocket) -> bool: boolReturns true when calibration is supported and contains data for a specific camera socket. This is a presence-plus-version-compatibility check. It requires `hasCalibrationData()` to be true (currently `eepromData.version >= 4`) and a matching entry for `cameraId` in `cameraData`.
method
setAccelerometerCalibration(self, calibration: list[list[float]])Set canonical accelerometer calibration [Q|b]. Parameter ``calibration``: 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]
method
method
setCameraExtrinsics(self, srcCameraId: CameraBoardSocket, destCameraId: CameraBoardSocket, rotationMatrix: list[list[float]], translation: list[float], specTranslation: list[float] = [0.0, 0.0, 0.0])Set the Camera Extrinsics object Translation values are stored in the default CalibrationHandler length unit: centimeters (cm). 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, in centimeters (cm). Parameter ``specTranslation``: Translation between srcCameraId and destCameraId origins from the design, in centimeters (cm).
method
method
setCameraType(self, cameraId: CameraBoardSocket, cameraModel: CameraModel)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
method
setDeviceName(self, deviceName: str)Set the deviceName which responses to getDeviceName of Device Parameter ``deviceName``: Sets device name.
method
setDistortionCoefficients(self, cameraId: CameraBoardSocket, distortionCoefficients: list[float])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.
method
setFov(self, cameraId: CameraBoardSocket, hfov: float)Set the Fov of the Camera Parameter ``cameraId``: Camera Id of the camera Parameter ``hfov``: Horizontal fov of the camera from Camera Datasheet
method
setGyroscopeCalibration(self, calibration: list[list[float]])Set canonical gyroscope calibration [Q|b]. Parameter ``calibration``: 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]
method
setImuExtrinsics(self, destCameraId: CameraBoardSocket, rotationMatrix: list[list[float]], translation: list[float], specTranslation: list[float] = [0.0, 0.0, 0.0])Set the Imu to Camera Extrinsics object Translation values are stored in the default CalibrationHandler length unit: centimeters (cm). 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, in centimeters (cm). Parameter ``specTranslation``: Translation between IMU and destCameraId origins from the design, in centimeters (cm).
method
setImuParameters(self, imuParameters: ImuCalibrationParams)Set full IMU parameter payload. Parameter ``params``: noise + accelerometer + gyroscope calibration parameters
method
setLensPosition(self, cameraId: CameraBoardSocket, lensPosition: int)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
method
setProductName(self, productName: str)Set the productName which acts as alisas for users to identify the device Parameter ``productName``: Sets product name (alias).
method
setStereoLeft(self, cameraId: CameraBoardSocket, rectifiedRotation: list[list[float]])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)
method
setStereoRight(self, cameraId: CameraBoardSocket, rectifiedRotation: list[list[float]])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)
method
validateCalibrationHandler(self, throwOnError: bool = True)Validate Calibration handler properties and how they are set, so there is no: - Cycling links - Missing links - Dangling connections Parameter ``throwOnError``: Throw runtime error on failture.
class
depthai.CBACalibrationHandler
static method
method
method
eepromToJson(self) -> json: jsonGet JSON representation of calibration data Returns: JSON structure
method
eepromToJsonFile(self, destPath: os.PathLike) -> bool: boolWrite 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
method
method
getDefaultIntrinsics(self) -> tuple[list[list[float]], int, int]: tuple[list[list[float]], int, int]method
method
method
getEepromData(self) -> EepromData: EepromDataGet the Eeprom Data object Returns: EepromData object which contains the raw calibration data
method
method
method
method
method
hasCalibrationData(self) -> bool: boolReturns true when calibration payload is supported and contains camera calibration entries. This check is not presence-only: it returns true only when `eepromData.version >= 4` (supported by intrinsics-dependent APIs) and `cameraData` is non-empty.
method
method
method
method
method
method
method
validateCalibrationHandler(self, throwOnError: bool = True)Validate Calibration handler properties and how they are set, so there is no: - Cycling links - Missing links - Dangling connections Parameter ``throwOnError``: Throw runtime error on failture.
class
depthai.NNModelDescription
static method
NNModelDescription.fromYamlFile(yamlPath: os.PathLike, modelsPath: os.PathLike = '') -> NNModelDescription: NNModelDescriptionInitialize NNModelDescription from yaml file If modelName is a relative path (e.g. ./yolo.yaml), it is used as is. If modelName is a full path (e.g. /home/user/models/yolo.yaml), it is used as is. If modelName is a model name (e.g. yolo) or a model yaml file (e.g. yolo.yaml), the function will use modelsPath if provided or the DEPTHAI_ZOO_MODELS_PATH environment variable and use a path made by combining the modelsPath and the model name to the yaml file. For instance, yolo -> ./depthai_models/yolo.yaml (if modelsPath or DEPTHAI_ZOO_MODELS_PATH are ./depthai_models) Parameter ``modelName:``: model name or yaml file path (string is implicitly converted to Path) Parameter ``modelsPath:``: Path to the models folder, use environment variable DEPTHAI_ZOO_MODELS_PATH if not provided Returns: NNModelDescription
method
method
__str__(self) -> str: strConvert NNModelDescription to string for printing purposes. This can be used for debugging. Returns: std::string: String representation
method
check(self) -> bool: boolCheck if the model description is valid (contains all required fields) Returns: bool: True if the model description is valid, false otherwise
method
saveToYamlFile(self, yamlPath: os.PathLike)Save NNModelDescription to yaml file Parameter ``yamlPath:``: Path to yaml file
method
toString(self) -> str: strConvert NNModelDescription to string for printing purposes. This can be used for debugging. Returns: std::string: String representation
property
compressionLevel
Compression level = OPTIONAL parameter
method
property
model
Model slug = REQUIRED parameter
method
property
modelPrecisionType
modelPrecisionType = OPTIONAL parameter
method
property
optimizationLevel
Optimization level = OPTIONAL parameter
method
property
platform
Hardware platform - RVC2, RVC3, RVC4, ... = REQUIRED parameter
method
property
snpeVersion
SNPE version = OPTIONAL parameter
method
class
depthai.SlugComponents
variable
variable
variable
variable
static method
method
method
class
depthai.RemoteConnection
method
__init__(self, address: str = '0.0.0.0', webSocketPort: int = 8765, serveFrontend: bool = True, httpPort: int = 8082)Constructs a RemoteConnection instance. Parameter ``address``: The address to bind the connection to. Parameter ``webSocketPort``: The port for WebSocket communication. Parameter ``serveFrontend``: Whether to serve a frontend UI. Parameter ``httpPort``: The port for HTTP communication.
method
method
registerBinaryService(self, serviceName: str, callback: typing.Any)Registers a binary service with a callback function. Parameter ``serviceName``: The name of the service. Parameter ``callback``: The callback function to handle requests.
method
registerPipeline(self, pipeline: Pipeline)Registers a pipeline with the remote connection. Parameter ``pipeline``: The pipeline to register.
method
registerService(self, serviceName: str, callback: typing.Callable[[json], json])Registers a service with a callback function. Parameter ``serviceName``: The name of the service. Parameter ``callback``: The callback function to handle requests.
method
removeTopic(self, topicName: str) -> bool: boolRemoves a topic from the remote connection. Parameter ``topicName``: The name of the topic to remove. @note After removing a topic any messages sent to it will cause an exception to be called on the sender, since this closes the queue. Returns: True if the topic was successfully removed, false otherwise.
method
waitKey(self, delay: int) -> int: intWaits for a key event. Parameter ``delayMs``: The delay in milliseconds to wait for a key press. Returns: The key code of the pressed key.
class
depthai.FileGroup
method
method
method
class
depthai.SendSnapCallbackStatus
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
class
depthai.SendSnapCallbackResult
method
property
property
property
property
property
property
class
depthai.EventsManager
method
method
sendEvent(self, name: str, tags: list[str] = [], extras: dict[str, str] = {}, associateFiles: list[str] = []) -> str|None: str|NoneSend an event to the events service Parameter ``name``: Name of the event Parameter ``tags``: List of tags to send Parameter ``extras``: Extra data to send Parameter ``associateFiles``: List of associate files with ids Returns: LocalID of the sent Event
method
method
setCacheDir(self, cacheDir: str)Set the cache directory for storing cached data. By default, the cache directory is set to /internal/private Parameter ``cacheDir``: Cache directory Returns: void
method
setCacheIfCannotSend(self, cacheIfCannotUpload: bool)Set whether to cache data if it cannot be sent. By default, cacheIfCannotSend is set to false Parameter ``cacheIfCannotSend``: bool Returns: void
method
setLogResponse(self, logResponse: bool)Set whether to log the responses from the server. By default, logResponse is set to false Parameter ``logResponse``: bool Returns: void
method
setVerifySsl(self, verifySsl: bool)Set whether to verify the SSL certificate. By default, verifySsl is set to false Parameter ``verifySsl``: bool Returns: void
method
waitForPendingUploads(self, timeoutMs: int = 0) -> bool: boolWait for pending snaps/events to be processed by the background upload thread Parameter ``timeoutMs``: Timeout in milliseconds. 0 means wait until uploads are finished, connection is dropped, or manager is stopped Returns: true if the pending data was uploaded before timeout, false if not - either because of timeout, dropped connection, or shutdown
class
depthai.ImageFiltersPresetMode
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property