ON THIS PAGE

  • DepthAI C++ API

DepthAI C++ API

DepthAI C++ API can be found on Github luxonis/depthai-core. Below is the reference documentation for the C++ API.
namespace

dai

using
Clock = std::chrono::steady_clock
static constant
constexpr static uint32_t BOARD_CONFIG_MAGIC1
static constant
constexpr static uint32_t BOARD_CONFIG_MAGIC2
static constant
constexpr const char * LOG_DEFAULT_PATTERN
static constant
constexpr static auto DEFAULT_SERIALIZATION_TYPE
function
bool initialize()
function
bool initialize(std::string additionalInfo, bool installSignalHandler, void * javavm)
function
bool initialize(const char * additionalInfo, bool installSignalHandler, void * javavm)
function
bool initialize(void * javavm)
function
DEPTHAI_SERIALIZE_EXT(CameraSensorConfig, width, height, minFps, maxFps, fov, type)
function
DEPTHAI_SERIALIZE_EXT(ChipTemperature, css, mss, upa, dss, average)
function
DEPTHAI_SERIALIZE_EXT(CpuUsage, average, msTime)
function
DEPTHAI_SERIALIZE_EXT(DetectionParserOptions, nnFamily, confidenceThreshold, classes, coordinates, anchors, anchorMasks, iouThreshold)
function
DEPTHAI_SERIALIZE_OPTIONAL_EXT(EepromData, version, boardCustom, boardName, boardRev, boardConf, hardwareConf, productName, deviceName, batchName, batchTime, boardOptions, cameraData, stereoRectificationData, imuExtrinsics, housingExtrinsics, miscellaneousData, stereoUseSpecTranslation, stereoEnableDistortionCorrection, verticalCameraSocket)
function
DEPTHAI_SERIALIZE_EXT(MemoryInfo, remaining, used, total)
function
DEPTHAI_SERIALIZE_EXT(Point2f, x, y)
function
DEPTHAI_SERIALIZE_EXT(Point3f, x, y, z)
function
DEPTHAI_SERIALIZE_EXT(Rect, x, y, width, height)
function
DEPTHAI_SERIALIZE_EXT(RotatedRect, center, size, angle)
function
DEPTHAI_SERIALIZE_EXT(Size2f, width, height)
function
DEPTHAI_SERIALIZE_EXT(StereoRectification, rectifiedRotationLeft, rectifiedRotationRight, leftCameraSocket, rightCameraSocket)
function
DEPTHAI_SERIALIZE_EXT(TensorInfo, order, dataType, numDimensions, dims, strides, name, offset)
function
DEPTHAI_SERIALIZE_EXT(Timestamp, sec, nsec)
function
bool isDatatypeSubclassOf(DatatypeEnum parent, DatatypeEnum children)
function
DEPTHAI_SERIALIZE_EXT(AprilTag, id, hamming, decisionMargin, topLeft, topRight, bottomRight, bottomLeft)
function
DEPTHAI_SERIALIZE_EXT(EdgeDetectorConfigData, sobelFilterHorizontalKernel, sobelFilterVerticalKernel)
function
DEPTHAI_SERIALIZE_EXT(IMUReport, sequence, accuracy, timestamp, tsDevice)
function
DEPTHAI_SERIALIZE_EXT(IMUReportAccelerometer, x, y, z, sequence, accuracy, timestamp, tsDevice)
function
DEPTHAI_SERIALIZE_EXT(IMUReportGyroscope, x, y, z, sequence, accuracy, timestamp, tsDevice)
function
DEPTHAI_SERIALIZE_EXT(IMUReportMagneticField, x, y, z, sequence, accuracy, timestamp, tsDevice)
function
DEPTHAI_SERIALIZE_EXT(IMUReportRotationVectorWAcc, i, j, k, real, rotationVectorAccuracy, sequence, accuracy, timestamp, tsDevice)
function
DEPTHAI_SERIALIZE_EXT(IMUPacket, acceleroMeter, gyroscope, magneticField, rotationVector)
function
DEPTHAI_SERIALIZE_EXT(ImgDetection, label, confidence, xmin, ymin, xmax, ymax)
function
DEPTHAI_SERIALIZE_EXT(SpatialImgDetection, label, confidence, xmin, ymin, xmax, ymax, spatialCoordinates, boundingBoxMapping)
function
DEPTHAI_SERIALIZE_EXT(SpatialLocationCalculatorConfigThresholds, lowerThreshold, upperThreshold)
function
DEPTHAI_SERIALIZE_EXT(SpatialLocationCalculatorConfigData, roi, depthThresholds, calculationAlgorithm, stepSize)
function
DEPTHAI_SERIALIZE_EXT(SpatialLocations, config, depthAverage, depthMode, depthMedian, depthMin, depthMax, depthAveragePixelCount, spatialCoordinates)
function
DEPTHAI_SERIALIZE_EXT(TrackedFeature, position, id, age, harrisScore, trackingError)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::USB, vid, pid, flashBootedVid, flashBootedPid, maxSpeed, productName, manufacturer)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::Network, mtu, xlinkTcpNoDelay)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::GPIO, mode, direction, level, pull, drive, schmitt, slewFast)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::UART, tmp)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::Camera, name, sensorType, orientation)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::IMU, bus, interrupt, wake, csGpio, boot, reset)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig::UVC, cameraName, width, height, frameType, enable)
function
DEPTHAI_SERIALIZE_EXT(BoardConfig, usb, network, sysctl, watchdogTimeoutMs, watchdogInitialDelayMs, gpio, uart, pcieInternalClock, usb3PhyInternalClock, emmc, logPath, logSizeMax, logVerbosity, logDevicePrints, nonExclusiveMode, camera, imu, uvc)
function
DEPTHAI_SERIALIZE_EXT(CrashDump, crashReports, depthaiCommitHash, deviceId)
function
DEPTHAI_SERIALIZE_EXT(LogMessage, nodeIdName, level, time, colorRangeStart, colorRangeEnd, payload)
function
DEPTHAI_SERIALIZE_EXT(NodeConnectionSchema, node1Id, node1OutputGroup, node1Output, node2Id, node2InputGroup, node2Input)
function
DEPTHAI_SERIALIZE_EXT(NodeIoInfo, group, name, type, blocking, queueSize, waitForMessage, id)
function
DEPTHAI_SERIALIZE_EXT(NodeObjInfo, id, name, properties, ioInfo)
function
DEPTHAI_SERIALIZE_EXT(PipelineSchema, connections, globalProperties, nodes)
function
DEPTHAI_SERIALIZE_EXT(AprilTagProperties, initialConfig, inputConfigSync)
function
DEPTHAI_SERIALIZE_EXT(CameraProperties, initialControl, boardSocket, cameraName, imageOrientation, colorOrder, interleaved, fp16, previewHeight, previewWidth, videoWidth, videoHeight, stillWidth, stillHeight, resolutionWidth, resolutionHeight, fps, isp3aFps, sensorCropX, sensorCropY, previewKeepAspectRatio, ispScale, sensorType, numFramesPoolRaw, numFramesPoolIsp, numFramesPoolVideo, numFramesPoolPreview, numFramesPoolStill, warpMeshSource, warpMeshUri, warpMeshWidth, warpMeshHeight, calibAlpha, warpMeshStepWidth, warpMeshStepHeight, rawPacked)
function
DEPTHAI_SERIALIZE_EXT(CastProperties, numFramesPool, outputType, scale, offset)
function
DEPTHAI_SERIALIZE_EXT(ColorCameraProperties, initialControl, boardSocket, cameraName, imageOrientation, colorOrder, interleaved, fp16, previewHeight, previewWidth, videoWidth, videoHeight, stillWidth, stillHeight, resolution, fps, isp3aFps, sensorCropX, sensorCropY, previewKeepAspectRatio, ispScale, numFramesPoolRaw, numFramesPoolIsp, numFramesPoolVideo, numFramesPoolPreview, numFramesPoolStill, rawPacked)
function
DEPTHAI_SERIALIZE_EXT(DetectionNetworkProperties, blobSize, blobUri, numFrames, numThreads, numNCEPerThread, parser)
function
DEPTHAI_SERIALIZE_EXT(DetectionParserProperties, numFramesPool, networkInputs, parser)
function
DEPTHAI_SERIALIZE_EXT(EdgeDetectorProperties, initialConfig, outputFrameSize, numFramesPool)
function
DEPTHAI_SERIALIZE_EXT(FeatureTrackerProperties, initialConfig, numShaves, numMemorySlices)
function
DEPTHAI_SERIALIZE_EXT(GlobalProperties, leonCssFrequencyHz, leonMssFrequencyHz, pipelineName, pipelineVersion, cameraTuningBlobSize, cameraTuningBlobUri, calibData, xlinkChunkSize, sippBufferSize, sippDmaBufferSize)
function
DEPTHAI_SERIALIZE_EXT(IMUSensorConfig, sensitivityEnabled, sensitivityRelative, changeSensitivity, reportRate, sensorId)
function
DEPTHAI_SERIALIZE_EXT(IMUProperties, imuSensors, batchReportThreshold, maxBatchReports, enableFirmwareUpdate)
function
DEPTHAI_SERIALIZE_EXT(ImageAlignProperties, initialConfig, numFramesPool, alignWidth, alignHeight, warpHwIds, interpolation, outKeepAspectRatio, numShaves)
function
DEPTHAI_SERIALIZE_EXT(ImageManipProperties, initialConfig, outputFrameSize, numFramesPool, meshWidth, meshHeight, meshUri)
function
DEPTHAI_SERIALIZE_EXT(MessageDemuxProperties, dummy)
function
DEPTHAI_SERIALIZE_EXT(MonoCameraProperties, initialControl, boardSocket, cameraName, imageOrientation, resolution, fps, isp3aFps, numFramesPool, numFramesPoolRaw, rawPacked)
function
DEPTHAI_SERIALIZE_EXT(NeuralNetworkProperties, blobSize, blobUri, numFrames, numThreads, numNCEPerThread)
function
DEPTHAI_SERIALIZE_EXT(ObjectTrackerProperties, trackerThreshold, maxObjectsToTrack, detectionLabelsToTrack, trackerType, trackerIdAssignmentPolicy, trackingPerClass)
function
DEPTHAI_SERIALIZE_EXT(PointCloudProperties, initialConfig, numFramesPool)
function
DEPTHAI_SERIALIZE_EXT(SPIInProperties, streamName, busId, maxDataSize, numFrames)
function
DEPTHAI_SERIALIZE_EXT(SPIOutProperties, streamName, busId)
function
DEPTHAI_SERIALIZE_EXT(ScriptProperties, scriptUri, scriptName, processor)
function
DEPTHAI_SERIALIZE_EXT(SpatialDetectionNetworkProperties, blobSize, blobUri, numFrames, numThreads, numNCEPerThread, parser, detectedBBScaleFactor, depthThresholds, calculationAlgorithm, stepSize)
function
DEPTHAI_SERIALIZE_EXT(SpatialLocationCalculatorProperties, roiConfig)
function
DEPTHAI_SERIALIZE_EXT(StereoDepthProperties, initialConfig, depthAlignCamera, enableRectification, rectifyEdgeFillColor, width, height, outWidth, outHeight, outKeepAspectRatio, mesh, enableRuntimeStereoModeSwitch, numFramesPool, numPostProcessingShaves, numPostProcessingMemorySlices, focalLengthFromCalibration, useHomographyRectification, baseline, focalLength, disparityToDepthUseSpecTranslation, rectificationUseSpecTranslation, depthAlignmentUseSpecTranslation, alphaScaling)
function
DEPTHAI_SERIALIZE_EXT(SyncProperties, syncThresholdNs, syncAttempts)
function
DEPTHAI_SERIALIZE_EXT(SystemLoggerProperties, rateHz)
function
DEPTHAI_SERIALIZE_EXT(ToFProperties, initialConfig, numFramesPool, numShaves, warpHwIds)
function
DEPTHAI_SERIALIZE_EXT(UVCProperties, gpioInit, gpioStreamOn, gpioStreamOff)
function
DEPTHAI_SERIALIZE_EXT(VideoEncoderProperties, bitrate, keyframeFrequency, maxBitrate, numBFrames, numFramesPool, outputFrameSize, profile, quality, lossless, rateCtrlMode, frameRate)
function
DEPTHAI_SERIALIZE_EXT(WarpProperties, outputWidth, outputHeight, outputFrameSize, numFramesPool, meshWidth, meshHeight, meshUri, warpHwIds, interpolation)
function
DEPTHAI_SERIALIZE_EXT(XLinkInProperties, streamName, maxDataSize, numFrames)
function
DEPTHAI_SERIALIZE_EXT(XLinkOutProperties, maxFpsLimit, streamName, metadataOnly)
enum

int32_t CameraExposureOffset

Describe possible exposure offsets
enumerator
START
enumerator
MIDDLE
enumerator
END
enum

int32_t CameraBoardSocket

Which Camera socket to use.AUTO denotes that the decision will be made by device
enumerator
AUTO
enumerator
CAM_A
enumerator
CAM_B
enumerator
CAM_C
enumerator
CAM_D
enumerator
CAM_E
enumerator
CAM_F
enumerator
CAM_G
enumerator
CAM_H
enumerator
CAM_I
enumerator
CAM_J
enumerator
RGB
enumerator
CENTER
enumerator
LEFT
enumerator
RIGHT
enum

int32_t 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).
enumerator
AUTO
enumerator
NORMAL
enumerator
HORIZONTAL_MIRROR
enumerator
VERTICAL_FLIP
enumerator
ROTATE_180_DEG
enum

int8_t CameraModel

Which CameraModel to initialize the calibration with.
enumerator
Perspective
enumerator
Fisheye
enumerator
Equirectangular
enumerator
RadialDivision
enum

int32_t CameraSensorType

enumerator
AUTO
enumerator
COLOR
enumerator
MONO
enumerator
TOF
enumerator
THERMAL
enum

int32_t Colormap

enumerator
NONE
enumerator
TURBO
enumerator
JET
enumerator
STEREO_TURBO
enumerator
STEREO_JET
enum

int32_t ConnectionInterface

enumerator
USB
enumerator
ETHERNET
enumerator
WIFI
enum

int32_t FrameEvent

enumerator
NONE
enumerator
READOUT_START
enumerator
READOUT_END
enum

std::int32_t Interpolation

Interpolation type
enumerator
AUTO
enumerator
BILINEAR
enumerator
BICUBIC
enumerator
NEAREST_NEIGHBOR
enumerator
BYPASS
enumerator
DEFAULT
enumerator
DEFAULT_DISPARITY_DEPTH
enum

int32_t MedianFilter

Median filter config
enumerator
MEDIAN_OFF
enumerator
KERNEL_3x3
enumerator
KERNEL_5x5
enumerator
KERNEL_7x7
enum

int32_t ProcessorType

On which processor the node will be placedEnum specifying processor
enumerator
LEON_CSS
enumerator
LEON_MSS
enum

int32_t UsbSpeed

Get USB Speed
enumerator
UNKNOWN
enumerator
LOW
enumerator
FULL
enumerator
HIGH
enumerator
SUPER
enumerator
SUPER_PLUS
enum

std::int32_t DatatypeEnum

enumerator
Buffer
enumerator
ImgFrame
enumerator
EncodedFrame
enumerator
NNData
enumerator
ImageManipConfig
enumerator
CameraControl
enumerator
ImgDetections
enumerator
SpatialImgDetections
enumerator
SystemInformation
enumerator
SpatialLocationCalculatorConfig
enumerator
SpatialLocationCalculatorData
enumerator
EdgeDetectorConfig
enumerator
AprilTagConfig
enumerator
AprilTags
enumerator
Tracklets
enumerator
IMUData
enumerator
StereoDepthConfig
enumerator
FeatureTrackerConfig
enumerator
ImageAlignConfig
enumerator
ToFConfig
enumerator
PointCloudConfig
enumerator
PointCloudData
enumerator
TrackedFeatures
enumerator
MessageGroup
enum

uint32_t SpatialLocationCalculatorAlgorithm

SpatialLocationCalculatorAlgorithm configuration modesContains calculation method used to obtain spatial locations.
enumerator
AVERAGE
enumerator
MEAN
enumerator
MIN
enumerator
MAX
enumerator
MODE
enumerator
MEDIAN
enum

std::int32_t LogLevel

enumerator
TRACE
enumerator
DEBUG
enumerator
INFO
enumerator
WARN
enumerator
ERR
enumerator
CRITICAL
enumerator
OFF
enum

std::int32_t IMUSensor

Available IMU sensors. More details about each sensor can be found in the datasheet:
enumerator
ACCELEROMETER_RAW
Section 2.1.1Acceleration of the device without any postprocessing, straight from the sensor. Units are [m/s^2]
enumerator
ACCELEROMETER
Section 2.1.1Acceleration of the device including gravity. Units are [m/s^2]
enumerator
LINEAR_ACCELERATION
Section 2.1.1Acceleration of the device with gravity removed. Units are [m/s^2]
enumerator
GRAVITY
Section 2.1.1Gravity. Units are [m/s^2]
enumerator
GYROSCOPE_RAW
Section 2.1.2The angular velocity of the device without any postprocessing, straight from the sensor. Units are [rad/s]
enumerator
GYROSCOPE_CALIBRATED
Section 2.1.2The angular velocity of the device. Units are [rad/s]
enumerator
GYROSCOPE_UNCALIBRATED
Section 2.1.2Angular velocity without bias compensation. Units are [rad/s]
enumerator
MAGNETOMETER_RAW
Section 2.1.3Magnetic field measurement without any postprocessing, straight from the sensor. Units are [uTesla]
enumerator
MAGNETOMETER_CALIBRATED
Section 2.1.3The fully calibrated magnetic field measurement. Units are [uTesla]
enumerator
MAGNETOMETER_UNCALIBRATED
Section 2.1.3The magnetic field measurement without hard-iron offset applied. Units are [uTesla]
enumerator
ROTATION_VECTOR
Section 2.2The 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.
enumerator
GAME_ROTATION_VECTOR
Section 2.2The 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.
enumerator
GEOMAGNETIC_ROTATION_VECTOR
Section 2.2The 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.
enumerator
ARVR_STABILIZED_ROTATION_VECTOR
Section 2.2Estimates 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.
enumerator
ARVR_STABILIZED_GAME_ROTATION_VECTOR
Section 2.2While 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.
enum

std::int32_t TrackerType

enumerator
SHORT_TERM_KCF
enumerator
SHORT_TERM_IMAGELESS
enumerator
ZERO_TERM_IMAGELESS
enumerator
ZERO_TERM_COLOR_HISTOGRAM
enum

std::int32_t TrackerIdAssignmentPolicy

enumerator
UNIQUE_ID
enumerator
SMALLEST_ID
enum

SerializationType

enumerator
LIBNOP
enumerator
JSON
enumerator
JSON_MSGPACK
class

dai::CalibrationHandler

#include CalibrationHandler.hpp
function
CalibrationHandler()
explicit function
CalibrationHandler(dai::Path eepromDataPath)
Construct a new Calibration Handler object using the eeprom json file created from calibration procedure.
Parameters
  • eepromDataPath: takes the full path to the json file containing the calibration and device info.
function
CalibrationHandler(dai::Path calibrationDataPath, dai::Path boardConfigPath)
Construct a new Calibration Handler object using the board config json file and .calib binary files created using gen1 calibration.
Parameters
  • calibrationDataPath: Full Path to the .calib binary file from the gen1 calibration. (Supports only Version 5)
  • boardConfigPath: Full Path to the board config json file containing device information.
explicit function
CalibrationHandler(EepromData eepromData)
Construct a new Calibration Handler object from EepromData object.
Parameters
  • eepromData: EepromData data structure containing the calibration data.
function
dai::EepromData getEepromData()
Get the Eeprom Data object
Returns
EepromData object which contains the raw calibration data
function
std::vector< std::vector< float > > getCameraIntrinsics(CameraBoardSocket cameraId, int resizeWidth, int resizeHeight, Point2f topLeftPixelId, Point2f bottomRightPixelId, bool keepAspectRatio)
Get the Camera Intrinsics object
Parameters
  • cameraId: Uses the cameraId to identify which camera intrinsics to return
  • resizewidth: resized width of the image for which intrinsics is requested. resizewidth = -1 represents width is same as default intrinsics
  • resizeHeight: resized height of the image for which intrinsics is requested. resizeHeight = -1 represents height is same as default intrinsics
  • topLeftPixelId: (x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image
  • bottomRightPixelId: (x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image
  • keepAspectRatio: Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side
Returns
Represents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.
function
std::vector< std::vector< float > > getCameraIntrinsics(CameraBoardSocket cameraId, Size2f destShape, Point2f topLeftPixelId, Point2f bottomRightPixelId, bool keepAspectRatio)
Get the Camera Intrinsics object
Parameters
  • cameraId: Uses the cameraId to identify which camera intrinsics to return
  • destShape: resized width and height of the image for which intrinsics is requested.
  • topLeftPixelId: (x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image
  • bottomRightPixelId: (x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image
  • keepAspectRatio: Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side
Returns
Represents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.
function
std::vector< std::vector< float > > getCameraIntrinsics(CameraBoardSocket cameraId, std::tuple< int, int > destShape, Point2f topLeftPixelId, Point2f bottomRightPixelId, bool keepAspectRatio)
Get the Camera Intrinsics object
Parameters
  • cameraId: Uses the cameraId to identify which camera intrinsics to return
  • destShape: resized width and height of the image for which intrinsics is requested.
  • topLeftPixelId: (x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image
  • bottomRightPixelId: (x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image
  • keepAspectRatio: Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side
Returns
Represents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.
function
std::tuple< std::vector< std::vector< float > >, int, int > getDefaultIntrinsics(CameraBoardSocket cameraId)
Get the Default Intrinsics object
Parameters
  • 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.
function
std::vector< float > getDistortionCoefficients(CameraBoardSocket cameraId)
Get the Distortion Coefficients object
Parameters
  • 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,tx,ty] for CameraModel::Perspective or [k1, k2, k3, k4] for CameraModel::Fisheye see
function
float getFov(CameraBoardSocket cameraId, bool useSpec)
Get the Fov of the camera
Parameters
  • cameraId: of the camera of which we are fetching fov.
  • 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.
function
uint8_t getLensPosition(CameraBoardSocket cameraId)
Get the lens position of the given camera
Parameters
  • cameraId: of the camera with lens position is requested.
Returns
lens position of the camera with given cameraId at which it was calibrated.
function
CameraModel getDistortionModel(CameraBoardSocket cameraId)
Get the distortion model of the given camera
Parameters
  • cameraId: of the camera with lens position is requested.
Returns
lens position of the camera with given cameraId at which it was calibrated.
function
std::vector< std::vector< float > > getCameraExtrinsics(CameraBoardSocket srcCamera, CameraBoardSocket dstCamera, bool useSpecTranslation)
Get the Camera Extrinsics object between two cameras from the calibration data if there is a linked connection between any two cameras then the relative rotation and translation (in centimeters) is returned by this function.
Parameters
  • srcCamera: Camera Id of the camera which will be considered as origin.
  • dstCamera: Camera Id of the destination camera to which we are fetching the rotation and translation from the SrcCamera
  • useSpecTranslation: Enabling this bool uses the translation information from the board design data
Returns
a transformationMatrix which is 4x4 in homogeneous coordinate system
function
std::vector< float > getCameraTranslationVector(CameraBoardSocket srcCamera, CameraBoardSocket dstCamera, bool useSpecTranslation)
Get the Camera translation vector between two cameras from the calibration data.
Parameters
  • srcCamera: Camera Id of the camera which will be considered as origin.
  • dstCamera: Camera Id of the destination camera to which we are fetching the translation vector from the SrcCamera
  • useSpecTranslation: Disabling this bool uses the translation information from the calibration data (not the board design data)
Returns
a translation vector like [x, y, z] in centimeters
function
float getBaselineDistance(CameraBoardSocket cam1, CameraBoardSocket cam2, bool useSpecTranslation)
Get the baseline distance between two specified cameras. By default it will get the baseline between CameraBoardSocket.CAM_C and CameraBoardSocket.CAM_B.
Parameters
  • cam1: First camera
  • cam2: Second camera
  • useSpecTranslation: Enabling this bool uses the translation information from the board design data (not the calibration data)
Returns
baseline distance in centimeters
function
std::vector< std::vector< float > > getCameraToImuExtrinsics(CameraBoardSocket cameraId, bool useSpecTranslation)
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.
Parameters
  • cameraId: Camera Id of the camera which will be considered as origin. from which Transformation matrix to the IMU will be found
  • useSpecTranslation: Enabling this bool uses the translation information from the board design data
Returns
Returns a transformationMatrix which is 4x4 in homogeneous coordinate system
function
std::vector< std::vector< float > > getImuToCameraExtrinsics(CameraBoardSocket cameraId, bool useSpecTranslation)
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.
Parameters
  • cameraId: Camera Id of the camera which will be considered as destination. To which Transformation matrix from the IMU will be found.
  • useSpecTranslation: Enabling this bool uses the translation information from the board design data
Returns
Returns a transformationMatrix which is 4x4 in homogeneous coordinate system
function
std::vector< std::vector< float > > getStereoRightRectificationRotation()
Get the Stereo Right Rectification Rotation object
Returns
returns a 3x3 rectification rotation matrix
function
std::vector< std::vector< float > > getStereoLeftRectificationRotation()
Get the Stereo Left Rectification Rotation object
Returns
returns a 3x3 rectification rotation matrix
function
dai::CameraBoardSocket getStereoLeftCameraId()
Get the camera id of the camera which is used as left camera of the stereo setup
Returns
cameraID of the camera used as left camera
function
dai::CameraBoardSocket getStereoRightCameraId()
Get the camera id of the camera which is used as right camera of the stereo setup
Returns
cameraID of the camera used as right camera
function
bool eepromToJsonFile(dai::Path destPath)
Write raw calibration/board data to json file.
Parameters
  • destPath: Full path to the json file in which raw calibration data will be stored
Returns
True on success, false otherwise
function
nlohmann::json eepromToJson()
Get JSON representation of calibration data
Returns
JSON structure
function
void setBoardInfo(std::string boardName, std::string boardRev)
Set the Board Info object
Parameters
  • version: Sets the version of the Calibration data(Current version is 6)
  • boardName: Sets your board name.
  • boardRev: set your board revision id.
function
void setBoardInfo(std::string productName, std::string boardName, std::string boardRev, std::string boardConf, std::string hardwareConf, std::string batchName, uint64_t batchTime, uint32_t boardOptions, std::string boardCustom)
Set the Board Info object. Creates version 7 EEPROM data
Parameters
  • productName: Sets product name (alias).
  • boardName: Sets board name.
  • boardRev: Sets board revision id.
  • boardConf: Sets board configuration id.
  • hardwareConf: Sets hardware configuration id.
  • batchName: Sets batch name.
  • batchTime: Sets batch time (unix timestamp).
  • boardCustom: Sets a custom board (Default empty string).
function
void setBoardInfo(std::string deviceName, std::string productName, std::string boardName, std::string boardRev, std::string boardConf, std::string hardwareConf, std::string batchName, uint64_t batchTime, uint32_t boardOptions, std::string boardCustom)
Set the Board Info object. Creates version 7 EEPROM data
Parameters
  • deviceName: Sets device name.
  • productName: Sets product name (alias).
  • boardName: Sets board name.
  • boardRev: Sets board revision id.
  • boardConf: Sets board configuration id.
  • hardwareConf: Sets hardware configuration id.
  • batchName: Sets batch name. Not supported anymore
  • batchTime: Sets batch time (unix timestamp).
  • boardCustom: Sets a custom board (Default empty string).
function
void setDeviceName(std::string deviceName)
Set the deviceName which responses to getDeviceName of Device
Parameters
  • deviceName: Sets device name.
function
void setProductName(std::string productName)
Set the productName which acts as alisas for users to identify the device
Parameters
  • productName: Sets product name (alias).
function
void setCameraIntrinsics(CameraBoardSocket cameraId, std::vector< std::vector< float >> intrinsics, Size2f frameSize)
Set the Camera Intrinsics object
Parameters
  • cameraId: CameraId of the camera for which Camera intrinsics are being loaded
  • intrinsics: 3x3 intrinsics matrix
  • frameSize: Represents the width and height of the image at which intrinsics are calculated.
function
void setCameraIntrinsics(CameraBoardSocket cameraId, std::vector< std::vector< float >> intrinsics, int width, int height)
Set the Camera Intrinsics object
Parameters
  • cameraId: CameraId of the camera for which Camera intrinsics are being loaded
  • intrinsics: 3x3 intrinsics matrix
  • width: Represents the width of the image at which intrinsics are calculated.
  • height: Represents the height of the image at which intrinsics are calculated.
function
void setCameraIntrinsics(CameraBoardSocket cameraId, std::vector< std::vector< float >> intrinsics, std::tuple< int, int > frameSize)
Set the Camera Intrinsics object
Parameters
  • cameraId: CameraId of the camera for which Camera intrinsics are being loaded
  • intrinsics: 3x3 intrinsics matrix
  • frameSize: Represents the width and height of the image at which intrinsics are calculated.
function
void setDistortionCoefficients(CameraBoardSocket cameraId, std::vector< float > distortionCoefficients)
Sets the distortion Coefficients obtained from camera calibration
Parameters
  • cameraId: Camera Id of the camera for which distortion coefficients are computed
  • distortionCoefficients: Distortion Coefficients of the respective Camera.
function
void setFov(CameraBoardSocket cameraId, float hfov)
Set the Fov of the Camera
Parameters
  • cameraId: Camera Id of the camera
  • hfov: Horizontal fov of the camera from Camera Datasheet
function
void setLensPosition(CameraBoardSocket cameraId, uint8_t lensPosition)
Sets the distortion Coefficients obtained from camera calibration
Parameters
  • cameraId: Camera Id of the camera
  • lensPosition: lens posiotion value of the camera at the time of calibration
function
void setCameraType(CameraBoardSocket cameraId, CameraModel cameraModel)
Set the Camera Type object
Parameters
  • cameraId: CameraId of the camera for which cameraModel Type is being updated.
  • cameraModel: Type of the model the camera represents
function
void setCameraExtrinsics(CameraBoardSocket srcCameraId, CameraBoardSocket destCameraId, std::vector< std::vector< float >> rotationMatrix, std::vector< float > translation, std::vector< float > specTranslation)
Set the Camera Extrinsics object
Parameters
  • srcCameraId: Camera Id of the camera which will be considered as relative origin.
  • destCameraId: Camera Id of the camera which will be considered as destination from srcCameraId.
  • rotationMatrix: Rotation between srcCameraId and destCameraId origins.
  • translation: Translation between srcCameraId and destCameraId origins.
  • specTranslation: Translation between srcCameraId and destCameraId origins from the design.
function
void setImuExtrinsics(CameraBoardSocket destCameraId, std::vector< std::vector< float >> rotationMatrix, std::vector< float > translation, std::vector< float > specTranslation)
Set the Imu to Camera Extrinsics object
Parameters
  • destCameraId: Camera Id of the camera which will be considered as destination from IMU.
  • rotationMatrix: Rotation between srcCameraId and destCameraId origins.
  • translation: Translation between IMU and destCameraId origins.
  • specTranslation: Translation between IMU and destCameraId origins from the design.
function
void setStereoLeft(CameraBoardSocket cameraId, std::vector< std::vector< float >> rectifiedRotation)
Set the Stereo Left Rectification object
Parameters
  • cameraId: CameraId of the camera which will be used as left Camera of stereo Setup
  • rectifiedRotation: Rectification rotation of the left camera required for feature matching
function
void setStereoRight(CameraBoardSocket cameraId, std::vector< std::vector< float >> rectifiedRotation)
Set the Stereo Right Rectification object
Parameters
  • cameraId: CameraId of the camera which will be used as left Camera of stereo Setup
  • rectifiedRotation: Rectification rotation of the left camera required for feature matching
function
bool validateCameraArray()
Using left camera as the head it iterates over the camera extrinsics connection to check if all the camera extrinsics are connected and no loop exists.
Returns
true on proper connection with no loops.
class

dai::CallbackHandler

function
void setCallback(std::function< std::shared_ptr< RawBuffer >(std::shared_ptr< RawBuffer >)> cb)
function
CallbackHandler(std::shared_ptr< XLinkConnection > conn, const std::string & streamName, std::function< std::shared_ptr< RawBuffer >(std::shared_ptr< RawBuffer >)> cb)
function
~CallbackHandler()
class

dai::DataOutputQueue

#include DataQueue.hpp
function
DataOutputQueue(const std::shared_ptr< XLinkConnection > conn, const std::string & streamName, unsigned int maxSize, bool blocking)
function
~DataOutputQueue()
function
bool isClosed()
Check whether queue is closed
Parameters
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.
function
void close()
Closes the queue and the underlying thread
function
void setBlocking(bool blocking)
Sets queue behavior when full (maxSize)
Parameters
  • blocking: Specifies if block or overwrite the oldest message in the queue
function
bool getBlocking()
Gets current queue behavior when full (maxSize)
Returns
True if blocking, false otherwise
function
void setMaxSize(unsigned int maxSize)
Sets queue maximum size
Parameters
  • maxSize: Specifies maximum number of messages in the queue
function
unsigned int getMaxSize()
Gets queue maximum size
Returns
Maximum queue size
function
std::string getName()
Gets queues name
Returns
Queue name
function
CallbackId addCallback(std::function< void(std::string, std::shared_ptr< ADatatype >)>)
Adds a callback on message received
Parameters
  • callback: Callback function with queue name and message pointer
Returns
Callback id
function
CallbackId addCallback(std::function< void(std::shared_ptr< ADatatype >)>)
Adds a callback on message received
Parameters
  • callback: Callback function with message pointer
Returns
Callback id
function
CallbackId addCallback(std::function< void()> callback)
Adds a callback on message received
Parameters
  • callback: Callback function without any parameters
Returns
Callback id
function
bool removeCallback(CallbackId callbackId)
Removes a callback
Parameters
  • callbackId: Id of callback to be removed
Returns
True if callback was removed, false otherwise
inline function
bool has()
Check 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
inline function
bool has()
Check whether front of the queue has a message (isn't empty)
Returns
True if queue isn't empty, false otherwise
inline function
std::shared_ptr< T > tryGet()
Try 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
inline function
std::shared_ptr< ADatatype > tryGet()
Try to retrieve message from queue. If no message available, return immediately with nullptr
Returns
Message or nullptr if no message available
inline function
std::shared_ptr< T > get()
Block until a message is available.
Returns
Message of type T or nullptr if no message available
inline function
std::shared_ptr< ADatatype > get()
Block until a message is available.
Returns
Message or nullptr if no message available
inline function
std::shared_ptr< T > front()
Gets first message in the queue.
Returns
Message of type T or nullptr if no message available
inline function
std::shared_ptr< ADatatype > front()
Gets first message in the queue.
Returns
Message or nullptr if no message available
inline function
std::shared_ptr< T > get(std::chrono::duration< Rep, Period > timeout, bool & hasTimedout)
Block until a message is available with a timeout.
Parameters
  • timeout: Duration for which the function should block
  • hasTimedout: Outputs true if timeout occurred, false otherwise
Returns
Message of type T otherwise nullptr if message isn't type T or timeout occurred
inline function
std::shared_ptr< ADatatype > get(std::chrono::duration< Rep, Period > timeout, bool & hasTimedout)
Block until a message is available with a timeout.
Parameters
  • timeout: Duration for which the function should block
  • hasTimedout: Outputs true if timeout occurred, false otherwise
Returns
Message of type T otherwise nullptr if message isn't type T or timeout occurred
inline function
std::vector< std::shared_ptr< T > > tryGetAll()
Try to retrieve all messages in the queue.
Returns
Vector of messages which can either be of type T or nullptr
inline function
std::vector< std::shared_ptr< ADatatype > > tryGetAll()
Try to retrieve all messages in the queue.
Returns
Vector of messages
inline function
std::vector< std::shared_ptr< T > > getAll()
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
inline function
std::vector< std::shared_ptr< ADatatype > > getAll()
Block until at least one message in the queue. Then return all messages from the queue.
Returns
Vector of messages
inline function
std::vector< std::shared_ptr< T > > getAll(std::chrono::duration< Rep, Period > timeout, bool & hasTimedout)
Block for maximum timeout duration. Then return all messages from the queue.
Parameters
  • timeout: Maximum duration to block
  • hasTimedout: Outputs true if timeout occurred, false otherwise
Returns
Vector of messages which can either be of type T or nullptr
inline function
std::vector< std::shared_ptr< ADatatype > > getAll(std::chrono::duration< Rep, Period > timeout, bool & hasTimedout)
Block for maximum timeout duration. Then return all messages from the queue.
Parameters
  • timeout: Maximum duration to block
  • hasTimedout: Outputs true if timeout occurred, false otherwise
Returns
Vector of messages
enum

int CallbackId

class

dai::DataInputQueue

#include DataQueue.hpp
function
DataInputQueue(const std::shared_ptr< XLinkConnection > conn, const std::string & streamName, unsigned int maxSize, bool blocking, std::size_t maxDataSize)
function
~DataInputQueue()
function
bool isClosed()
Check whether queue is closed
Parameters
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.
function
void close()
Closes the queue and the underlying thread
function
void setMaxDataSize(std::size_t maxSize)
Sets maximum message size. If message is larger than specified, then an exception is issued.
Parameters
  • maxSize: Maximum message size to add to queue
function
std::size_t getMaxDataSize()
Gets maximum queue size.
Returns
Maximum message size
function
void setBlocking(bool blocking)
Sets queue behavior when full (maxSize)
Parameters
  • blocking: Specifies if block or overwrite the oldest message in the queue
function
bool getBlocking()
Gets current queue behavior when full (maxSize)
Returns
True if blocking, false otherwise
function
void setMaxSize(unsigned int maxSize)
Sets queue maximum size
Parameters
  • maxSize: Specifies maximum number of messages in the queue
function
unsigned int getMaxSize()
Gets queue maximum size
Returns
Maximum queue size
function
std::string getName()
Gets queues name
Returns
Queue name
function
void send(const std::shared_ptr< RawBuffer > & rawMsg)
Adds a raw message to the queue, which will be picked up and sent to the device. Can either block if 'blocking' behavior is true or overwrite oldest
Parameters
  • rawMsg: Message to add to the queue
function
void send(const std::shared_ptr< ADatatype > & msg)
Adds a message to the queue, which will be picked up and sent to the device. Can either block if 'blocking' behavior is true or overwrite oldest
Parameters
  • msg: Message to add to the queue
function
void send(const ADatatype & msg)
Adds a message to the queue, which will be picked up and sent to the device. Can either block if 'blocking' behavior is true or overwrite oldest
Parameters
  • msg: Message to add to the queue
function
bool send(const std::shared_ptr< RawBuffer > & rawMsg, std::chrono::milliseconds timeout)
Adds message to the queue, which will be picked up and sent to the device. Can either block until timeout if 'blocking' behavior is true or overwrite oldest
Parameters
  • rawMsg: Message to add to the queue
  • timeout: Maximum duration to block in milliseconds
function
bool send(const std::shared_ptr< ADatatype > & msg, std::chrono::milliseconds timeout)
Adds message to the queue, which will be picked up and sent to the device. Can either block until timeout if 'blocking' behavior is true or overwrite oldest
Parameters
  • msg: Message to add to the queue
  • timeout: Maximum duration to block in milliseconds
function
bool send(const ADatatype & msg, std::chrono::milliseconds timeout)
Adds message to the queue, which will be picked up and sent to the device. Can either block until timeout if 'blocking' behavior is true or overwrite oldest
Parameters
  • msg: Message to add to the queue
  • timeout: Maximum duration to block in milliseconds
class

dai::Device

#include Device.hpp
explicit function
Device(const Pipeline & pipeline)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
function
Device(const Pipeline & pipeline, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • usb2Mode: (bool) Boot device using USB2 mode firmware
function
Device(const Pipeline & pipeline, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • maxUsbSpeed: Maximum allowed USB speed
function
Device(const Pipeline & pipeline, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • pathToCmd: Path to custom device firmware
function
Device(const Pipeline & pipeline, const DeviceInfo & devInfo)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
function
Device(const Pipeline & pipeline, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: (bool) Boot device using USB2 mode firmware
function
Device(const Pipeline & pipeline, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
Device(const Pipeline & pipeline, const DeviceInfo & devInfo, const dai::Path & pathToCmd)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
function
Device()
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
function
~Device()
function
std::shared_ptr< DataOutputQueue > getOutputQueue(const std::string & name)
Gets an output queue corresponding to stream name. If it doesn't exist it throws
Parameters
  • name: Queue/stream name, created by XLinkOut node
Returns
Smart pointer to DataOutputQueue
function
std::shared_ptr< DataOutputQueue > getOutputQueue(const std::string & name, unsigned int maxSize, bool blocking)
Gets a queue corresponding to stream name, if it exists, otherwise it throws. Also sets queue options
Parameters
  • name: Queue/stream name, set in XLinkOut node
  • maxSize: Maximum number of messages in queue
  • blocking: Queue behavior once full. True specifies blocking and false overwriting of oldest messages. Default: true
Returns
Smart pointer to DataOutputQueue
function
std::vector< std::string > getOutputQueueNames()
Get all available output queue names
Returns
Vector of output queue names
function
std::shared_ptr< DataInputQueue > getInputQueue(const std::string & name)
Gets an input queue corresponding to stream name. If it doesn't exist it throws
Parameters
  • name: Queue/stream name, set in XLinkIn node
Returns
Smart pointer to DataInputQueue
function
std::shared_ptr< DataInputQueue > getInputQueue(const std::string & name, unsigned int maxSize, bool blocking)
Gets an input queue corresponding to stream name. If it doesn't exist it throws. Also sets queue options
Parameters
  • name: Queue/stream name, set in XLinkIn node
  • maxSize: Maximum number of messages in queue
  • blocking: Queue behavior once full. True: blocking, false: overwriting of oldest messages. Default: true
Returns
Smart pointer to DataInputQueue
function
std::vector< std::string > getInputQueueNames()
Get all available input queue names
Returns
Vector of input queue names
function
std::vector< std::string > getQueueEvents(const std::vector< std::string > & queueNames, std::size_t maxNumEvents, std::chrono::microseconds timeout)
Gets or waits until any of specified queues has received a message
Parameters
  • queueNames: Names of queues for which to block
  • maxNumEvents: Maximum number of events to remove from queue - Default is unlimited
  • timeout: Timeout after which return regardless. If negative then wait is indefinite - Default is -1
Returns
Names of queues which received messages first
function
std::vector< std::string > getQueueEvents(const std::initializer_list< std::string > & queueNames, std::size_t maxNumEvents, std::chrono::microseconds timeout)
function
std::vector< std::string > getQueueEvents(std::string queueName, std::size_t maxNumEvents, std::chrono::microseconds timeout)
Gets or waits until specified queue has received a message
Parameters
  • queueName: Name of queues for which to wait for
  • maxNumEvents: Maximum number of events to remove from queue. Default is unlimited
  • timeout: Timeout after which return regardless. If negative then wait is indefinite. Default is -1
Returns
Names of queues which received messages first
function
std::vector< std::string > getQueueEvents(std::size_t maxNumEvents, std::chrono::microseconds timeout)
Gets or waits until any queue has received a message
Parameters
  • maxNumEvents: Maximum number of events to remove from queue. Default is unlimited
  • timeout: Timeout after which return regardless. If negative then wait is indefinite. Default is -1
Returns
Names of queues which received messages first
function
std::string getQueueEvent(const std::vector< std::string > & queueNames, std::chrono::microseconds timeout)
Gets or waits until any of specified queues has received a message
Parameters
  • queueNames: Names of queues for which to wait for
  • timeout: Timeout after which return regardless. If negative then wait is indefinite. Default is -1
Returns
Queue name which received a message first
function
std::string getQueueEvent(const std::initializer_list< std::string > & queueNames, std::chrono::microseconds timeout)
function
std::string getQueueEvent(std::string queueName, std::chrono::microseconds timeout)
Gets or waits until specified queue has received a message
Parameters
  • queueNames: Name of queues for which to wait for
  • timeout: Timeout after which return regardless. If negative then wait is indefinite. Default is -1
Returns
Queue name which received a message
function
std::string getQueueEvent(std::chrono::microseconds timeout)
Gets or waits until any queue has received a message
Parameters
  • timeout: Timeout after which return regardless. If negative then wait is indefinite. Default is -1
Returns
Queue name which received a message
explicit function
DeviceBase(const Pipeline & pipeline)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
inline function
DeviceBase(const Pipeline & pipeline, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(const Pipeline & pipeline, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(const Pipeline & pipeline, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • pathToCmd: Path to custom device firmware
function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
inline function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo, const dai::Path & pathToCmd)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
function
DeviceBase()
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
explicit function
DeviceBase(OpenVINO::Version version)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • version: OpenVINO version which the device will be booted with.
inline function
DeviceBase(OpenVINO::Version version, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • version: OpenVINO version which the device will be booted with
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(OpenVINO::Version version, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(OpenVINO::Version version, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • version: OpenVINO version which the device will be booted with
  • pathToCmd: Path to custom device firmware
function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
inline function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo, const dai::Path & pathToCmd)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
explicit function
DeviceBase(Config config)
Connects to any available device with custom config.
Parameters
  • config: Device custom configuration to boot with
function
DeviceBase(Config config, const DeviceInfo & devInfo)
Connects to device 'devInfo' with custom config.
Parameters
  • config: Device custom configuration to boot with
  • devInfo: DeviceInfo which specifies which device to connect to
explicit function
DeviceBase(const DeviceInfo & devInfo)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • devInfo: DeviceInfo which specifies which device to connect to
function
DeviceBase(const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(std::string nameOrDeviceId)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • nameOrDeviceId: Creates DeviceInfo with nameOrDeviceId to connect to
function
DeviceBase(std::string nameOrDeviceId, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • nameOrDeviceId: Creates DeviceInfo with nameOrDeviceId to connect to
  • maxUsbSpeed: Maximum allowed USB speed
inline function
DeviceBase(Config config, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • config: Config with which the device will be booted with
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(Config config, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(Config config, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • config: Config with which the device will be booted with
  • pathToCmd: Path to custom device firmware
inline function
DeviceBase(Config config, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(Config config, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(Config config, const DeviceInfo & devInfo, const dai::Path & pathToCmd, bool dumpOnly)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
  • dumpOnly: If true only the minimal connection is established to retrieve the crash dump
class

dai::DeviceBase

#include DeviceBase.hppDerived by dai::Device
explicit function
DeviceBase(const Pipeline & pipeline)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
inline function
DeviceBase(const Pipeline & pipeline, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(const Pipeline & pipeline, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(const Pipeline & pipeline, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • pipeline: Pipeline to be executed on the device
  • pathToCmd: Path to custom device firmware
function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
inline function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(const Pipeline & pipeline, const DeviceInfo & devInfo, const dai::Path & pathToCmd)
Connects to device specified by devInfo.
Parameters
  • pipeline: Pipeline to be executed on the device
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
function
DeviceBase()
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
explicit function
DeviceBase(OpenVINO::Version version)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • version: OpenVINO version which the device will be booted with.
inline function
DeviceBase(OpenVINO::Version version, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • version: OpenVINO version which the device will be booted with
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(OpenVINO::Version version, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(OpenVINO::Version version, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • version: OpenVINO version which the device will be booted with
  • pathToCmd: Path to custom device firmware
function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
inline function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(OpenVINO::Version version, const DeviceInfo & devInfo, const dai::Path & pathToCmd)
Connects to device specified by devInfo.
Parameters
  • version: OpenVINO version which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
explicit function
DeviceBase(Config config)
Connects to any available device with custom config.
Parameters
  • config: Device custom configuration to boot with
function
DeviceBase(Config config, const DeviceInfo & devInfo)
Connects to device 'devInfo' with custom config.
Parameters
  • config: Device custom configuration to boot with
  • devInfo: DeviceInfo which specifies which device to connect to
explicit function
DeviceBase(const DeviceInfo & devInfo)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • devInfo: DeviceInfo which specifies which device to connect to
function
DeviceBase(const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(std::string nameOrDeviceId)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • nameOrDeviceId: Creates DeviceInfo with nameOrDeviceId to connect to
function
DeviceBase(std::string nameOrDeviceId, UsbSpeed maxUsbSpeed)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout. Uses OpenVINO version OpenVINO::VERSION_UNIVERSAL
Parameters
  • nameOrDeviceId: Creates DeviceInfo with nameOrDeviceId to connect to
  • maxUsbSpeed: Maximum allowed USB speed
inline function
DeviceBase(Config config, T usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • config: Config with which the device will be booted with
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(Config config, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(Config config, const dai::Path & pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
Parameters
  • config: Config with which the device will be booted with
  • pathToCmd: Path to custom device firmware
inline function
DeviceBase(Config config, const DeviceInfo & devInfo, T usb2Mode)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • usb2Mode: Boot device using USB2 mode firmware
function
DeviceBase(Config config, const DeviceInfo & devInfo, UsbSpeed maxUsbSpeed)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • maxUsbSpeed: Maximum allowed USB speed
function
DeviceBase(Config config, const DeviceInfo & devInfo, const dai::Path & pathToCmd, bool dumpOnly)
Connects to device specified by devInfo.
Parameters
  • config: Config with which the device will be booted with
  • devInfo: DeviceInfo which specifies which device to connect to
  • pathToCmd: Path to custom device firmware
  • dumpOnly: If true only the minimal connection is established to retrieve the crash dump
function
~DeviceBase()
Device destructor
Parameters
In the destructor of the derived class, remember to call close()
function
tl::optional< Version > getBootloaderVersion()
Gets Bootloader version if it was booted through Bootloader
Returns
DeviceBootloader::Version if booted through Bootloader or none otherwise
function
bool isPipelineRunning()
Checks if devices pipeline is already running
Returns
True if running, false otherwise
function
bool startPipeline()
Starts the execution of the devices pipeline
Returns
True if pipeline started, false otherwise
function
bool startPipeline(const Pipeline & pipeline)
Starts the execution of a given pipeline
Parameters
  • pipeline: OpenVINO version of the pipeline must match the one which the device was booted with.
Returns
True if pipeline started, false otherwise
function
void setLogLevel(LogLevel level)
Sets the devices logging severity level. This level affects which logs are transferred from device to host.
Parameters
  • level: Logging severity
function
LogLevel getLogLevel()
Gets current logging severity level of the device.
Returns
Logging severity level
function
void setXLinkChunkSize(int sizeBytes)
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.
Parameters
  • sizeBytes: XLink chunk size in bytes
function
int getXLinkChunkSize()
Gets current XLink chunk size.
Returns
XLink chunk size in bytes
function
void setXLinkRateLimit(int maxRateBytesPerSecond, int burstSize, int waitUs)
Sets the maximum transmission rate for the XLink connection on device side, using a simple token bucket algorithm. Useful for bandwidth throttling
Parameters
  • maxRateBytesPerSecond: Rate limit in Bytes/second
  • burstSize: Size in Bytes for how much to attempt to send once, 0 = auto
  • waitUs: Time in microseconds to wait for replenishing tokens, 0 = auto
function
DeviceInfo getDeviceInfo()
Get the Device Info object o the device which is currently running
Returns
DeviceInfo of the current device in execution
function
std::string getDeviceName()
Get device name if available
Returns
device name or empty string if not available
function
std::string getProductName()
Get product name if available
Returns
product name or empty string if not available
function
std::string getMxId()
Get MxId of device
Returns
MxId of connected device
function
void setLogOutputLevel(LogLevel level)
Sets logging level which decides printing level to standard output. If lower than setLogLevel, no messages will be printed
Parameters
  • level: Standard output printing severity
function
LogLevel getLogOutputLevel()
Gets logging level which decides printing level to standard output.
Returns
Standard output printing severity
function
bool setIrLaserDotProjectorBrightness(float mA, int mask)
Sets the brightness of the IR Laser Dot Projector. Limits: up to 765mA at 30% duty cycle, up to 1200mA at 6% duty cycle. The duty cycle is controlled by
Parameters
  • mA: Current in mA that will determine brightness, 0 or negative to turn off
  • 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
function
bool setIrFloodLightBrightness(float mA, int mask)
Sets the brightness of the IR Flood Light. Limits: up to 1500mA at 30% duty cycle. The duty cycle is controlled by the
Parameters
  • mA: Current in mA that will determine brightness, 0 or negative to turn off
  • 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
function
bool setIrLaserDotProjectorIntensity(float intensity, int mask)
Sets the intensity of the IR Laser Dot Projector. Limits: up to 765mA at 30% frame time duty cycle when exposure time is longer than 30% frame time. Otherwise, duty cycle is 100% of exposure time, with current increased up to max 1200mA to make up for shorter duty cycle. The duty cycle is controlled by
Parameters
  • intensity: Intensity on range 0 to 1, that will determine brightness. 0 or negative to turn off
  • 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
function
bool setIrFloodLightIntensity(float intensity, int mask)
Sets the intensity of the IR Flood Light. Limits: Intensity is directly normalized to 0 - 1500mA current. The duty cycle is 30% when exposure time is longer than 30% frame time. Otherwise, duty cycle is 100% of exposure time. The duty cycle is controlled by the
Parameters
  • intensity: Intensity on range 0 to 1, that will determine brightness, 0 or negative to turn off
  • 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
function
std::vector< std::tuple< std::string, int, int > > getIrDrivers()
Retrieves detected IR laser/LED drivers.
Returns
Vector of tuples containing: driver name, I2C bus, I2C address. For OAK-D-Pro it should be
function
dai::CrashDump getCrashDump(bool clearCrashDump)
Retrieves crash dump for debugging.
function
bool hasCrashDump()
Retrieves whether the is crash dump stored on device or not.
function
ProfilingData getProfilingData()
Get current accumulated profiling data
Returns
ProfilingData from the specific device
function
int addLogCallback(std::function< void(LogMessage)> callback)
Add a callback for device logging. The callback will be called from a separate thread with the LogMessage being passed.
Parameters
  • callback: Callback to call whenever a log message arrives
Returns
Id which can be used to later remove the callback
function
bool removeLogCallback(int callbackId)
Removes a callback
Parameters
  • callbackId: Id of callback to be removed
Returns
True if callback was removed, false otherwise
function
void setSystemInformationLoggingRate(float rateHz)
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
Parameters
  • rateHz: Logging rate in Hz
function
float getSystemInformationLoggingRate()
Gets current rate of system information logging ("info" severity) in Hz.
Returns
Logging rate in Hz
function
std::vector< CameraBoardSocket > getConnectedCameras()
Get cameras that are connected to the device
Returns
Vector of connected cameras
function
std::vector< ConnectionInterface > getConnectionInterfaces()
Get connection interfaces for device
Returns
Vector of connection type
function
std::vector< CameraFeatures > getConnectedCameraFeatures()
Get cameras that are connected to the device with their features/properties
Returns
Vector of connected camera features
function
std::vector< StereoPair > getStereoPairs()
Get stereo pairs based on the device type.
Returns
Vector of stereo pairs
function
std::vector< StereoPair > getAvailableStereoPairs()
Get stereo pairs taking into account the calibration and connected cameras.
Parameters
This method will always return a subset of
Returns
Vector of stereo pairs
function
std::unordered_map< CameraBoardSocket, std::string > getCameraSensorNames()
Get sensor names for cameras that are connected to the device
Returns
Map/dictionary with camera sensor names, indexed by socket
function
std::string getConnectedIMU()
Get connected IMU type
Returns
IMU type
function
dai::Version getIMUFirmwareVersion()
Get connected IMU firmware version
Returns
IMU firmware version
function
dai::Version getEmbeddedIMUFirmwareVersion()
Get embedded IMU firmware version to which IMU can be upgraded
Returns
Get embedded IMU firmware version to which IMU can be upgraded.
function
bool startIMUFirmwareUpdate(bool forceUpdate)
Starts IMU firmware update asynchronously only if IMU node is not running. If current firmware version is the same as embedded firmware version then it's no-op. Can be overridden by forceUpdate parameter. State of firmware update can be monitored using getIMUFirmwareUpdateStatus API.
Parameters
  • 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.
function
std::tuple< bool, unsigned int > getIMUFirmwareUpdateStatus()
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
function
MemoryInfo getDdrMemoryUsage()
Retrieves current DDR memory information from device
Returns
Used, remaining and total ddr memory
function
MemoryInfo getCmxMemoryUsage()
Retrieves current CMX memory information from device
Returns
Used, remaining and total cmx memory
function
MemoryInfo getLeonCssHeapUsage()
Retrieves current CSS Leon CPU heap information from device
Returns
Used, remaining and total heap memory
function
MemoryInfo getLeonMssHeapUsage()
Retrieves current MSS Leon CPU heap information from device
Returns
Used, remaining and total heap memory
function
ChipTemperature getChipTemperature()
Retrieves current chip temperature as measured by device
Returns
Temperature of various onboard sensors
function
CpuUsage getLeonCssCpuUsage()
Retrieves average CSS Leon CPU usage
Returns
Average CPU usage and sampling duration
function
CpuUsage getLeonMssCpuUsage()
Retrieves average MSS Leon CPU usage
Returns
Average CPU usage and sampling duration
function
bool isEepromAvailable()
Check if EEPROM is available
Returns
True if EEPROM is present on board, false otherwise
function
bool flashCalibration(CalibrationHandler calibrationDataHandler)
Stores the Calibration and Device information to the Device EEPROM
Parameters
Returns
true on successful flash, false on failure
function
void flashCalibration2(CalibrationHandler calibrationDataHandler)
Stores the Calibration and Device information to the Device EEPROM
Parameters
  • std::runtime_exception: if failed to flash the calibration
Parameters
function
CalibrationHandler readCalibration()
Fetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default
Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM
function
CalibrationHandler readCalibration2()
Fetches the EEPROM data from the device and loads it into CalibrationHandler object
Parameters
  • std::runtime_exception: if no calibration is flashed
Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM
function
CalibrationHandler readCalibrationOrDefault()
Fetches the EEPROM data from the device and loads it into CalibrationHandler object If no calibration is flashed, it returns default
Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM
function
void factoryResetCalibration()
Factory reset EEPROM data if factory backup is available.
Parameters
  • std::runtime_exception: If factory reset was unsuccessful
function
void flashFactoryCalibration(CalibrationHandler calibrationHandler)
Stores the Calibration and Device information to the Device EEPROM in Factory area To perform this action, correct env variable must be set
Parameters
  • std::runtime_exception: if failed to flash the calibration
Returns
True on successful flash, false on failure
function
void flashEepromClear()
Destructive action, deletes User area EEPROM contents Requires PROTECTED permissions
Parameters
  • std::runtime_exception: if failed to flash the calibration
Returns
True on successful flash, false on failure
function
void flashFactoryEepromClear()
Destructive action, deletes Factory area EEPROM contents Requires FACTORY PROTECTED permissions
Parameters
  • std::runtime_exception: if failed to flash the calibration
Returns
True on successful flash, false on failure
function
CalibrationHandler readFactoryCalibration()
Fetches the EEPROM data from Factory area and loads it into CalibrationHandler object
Parameters
  • std::runtime_exception: if no calibration is flashed
Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM in Factory Area
function
CalibrationHandler readFactoryCalibrationOrDefault()
Fetches the EEPROM data from Factory area and loads it into CalibrationHandler object If no calibration is flashed, it returns default
Returns
The CalibrationHandler object containing the calibration currently flashed on device EEPROM in Factory Area
function
std::vector< std::uint8_t > readCalibrationRaw()
Fetches the raw EEPROM data from User area
Parameters
  • std::runtime_exception: if any error occurred
Returns
Binary dump of User area EEPROM data
function
std::vector< std::uint8_t > readFactoryCalibrationRaw()
Fetches the raw EEPROM data from Factory area
Parameters
  • std::runtime_exception: if any error occurred
Returns
Binary dump of Factory area EEPROM data
function
UsbSpeed getUsbSpeed()
Retrieves USB connection speed
Returns
USB connection speed of connected device if applicable. Unknown otherwise.
function
void setTimesync(std::chrono::milliseconds period, int numSamples, bool random)
Configures Timesync service on device. It keeps host and device clocks in sync First time timesync is started it waits until the initial sync is completed Afterwards the function changes the following parameters
Parameters
  • period: Interval between timesync runs
  • numSamples: Number of timesync samples per run which are used to compute a better value. Set to zero to disable timesync
  • random: If true partial timesync requests will be performed at random intervals, otherwise at fixed intervals
function
void setTimesync(bool enable)
Enables or disables Timesync service on device. It keeps host and device clocks in sync.
Parameters
  • enable: Enables or disables consistent timesyncing
function
void close()
Explicitly closes connection to device.
Parameters
This function does not need to be explicitly called as destructor closes the device automatically
function
bool isClosed()
Is the device already closed (or disconnected)
Parameters
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.
inline function
std::shared_ptr< XLinkConnection > getConnection()
Returns underlying XLinkConnection
inline function
std::shared_ptr< const XLinkConnection > getConnection()
Returns underlying XLinkConnection
struct

dai::DeviceBase::Config

#include DeviceBase.hpp
variable
variable
variable
bool nonExclusiveMode
variable
tl::optional< LogLevel > outputLogLevel
variable
tl::optional< LogLevel > logLevel
class

dai::DeviceBootloader

#include DeviceBootloader.hpp
function
DeviceBootloader()
explicit function
DeviceBootloader(const DeviceInfo & devInfo)
Connects to or boots device in bootloader mode depending on devInfo state; flashing not allowed
Parameters
  • devInfo: DeviceInfo of which to boot or connect to
function
DeviceBootloader(const DeviceInfo & devInfo, T allowFlashingBootloader)
Connects to or boots device in bootloader mode depending on devInfo state.
Parameters
  • devInfo: DeviceInfo of which to boot or connect to
  • allowFlashingBootloader: (bool) Set to true to allow flashing the devices bootloader
function
DeviceBootloader(const DeviceInfo & devInfo, Type type, bool allowFlashingBootloader)
Connects to device in bootloader of specified type. Throws if it wasn't possible. This constructor will automatically boot into specified bootloader type if not already running
Parameters
  • devInfo: DeviceInfo of which to boot or connect to
  • type: Type of bootloader to boot/connect to.
  • allowFlashingBootloader: Set to true to allow flashing the devices bootloader. Defaults to false
function
DeviceBootloader(const DeviceInfo & devInfo, const dai::Path & pathToBootloader, bool allowFlashingBootloader)
Connects to or boots device in bootloader mode depending on devInfo state with a custom bootloader firmware.
Parameters
  • devInfo: DeviceInfo of which to boot or connect to
  • pathToBootloader: Custom bootloader firmware to boot
  • allowFlashingBootloader: Set to true to allow flashing the devices bootloader. Defaults to false
function
DeviceBootloader(std::string nameOrDeviceId, bool allowFlashingBootloader)
Connects to device with specified name/device id
Parameters
  • nameOrDeviceId: Creates DeviceInfo with nameOrDeviceId to connect to
  • allowFlashingBootloader: Set to true to allow flashing the devices bootloader. Defaults to false
function
~DeviceBootloader()
function
std::tuple< bool, std::string > flash(std::function< void(float)> progressCallback, const Pipeline & pipeline, bool compress, std::string applicationName, Memory memory, bool checkChecksum)
Flashes a given pipeline to the device.
Parameters
  • progressCallback: Callback that sends back a value between 0..1 which signifies current flashing progress
  • pipeline: Pipeline to flash to the board
  • compress: Compresses application to reduce needed memory size
  • applicationName: Name the application that is flashed
function
std::tuple< bool, std::string > flash(const Pipeline & pipeline, bool compress, std::string applicationName, Memory memory, bool checkChecksum)
Flashes a given pipeline to the device.
Parameters
  • pipeline: Pipeline to flash to the board
  • compress: Compresses application to reduce needed memory size
  • applicationName: Optional name the application that is flashed
function
ApplicationInfo readApplicationInfo(Memory memory)
Reads information about flashed application in specified memory from device
Parameters
  • memory: Specifies which memory to query
function
std::tuple< bool, std::string > flashDepthaiApplicationPackage(std::function< void(float)> progressCallback, std::vector< uint8_t > package, Memory memory)
Flashes a specific depthai application package that was generated using createDepthaiApplicationPackage or saveDepthaiApplicationPackage
Parameters
  • progressCallback: Callback that sends back a value between 0..1 which signifies current flashing progress
  • package: Depthai application package to flash to the board
function
std::tuple< bool, std::string > flashDepthaiApplicationPackage(std::vector< uint8_t > package, Memory memory)
Flashes a specific depthai application package that was generated using createDepthaiApplicationPackage or saveDepthaiApplicationPackage
Parameters
  • package: Depthai application package to flash to the board
function
std::tuple< bool, std::string > flashClear(Memory memory)
Clears flashed application on the device, by removing SBR boot structure Doesn't remove fast boot header capability to still boot the application
function
std::tuple< bool, std::string > flashBootloader(std::function< void(float)> progressCallback, const dai::Path & path)
Flashes bootloader to the current board
Parameters
  • progressCallback: Callback that sends back a value between 0..1 which signifies current flashing progress
  • path: Optional parameter to custom bootloader to flash
function
std::tuple< bool, std::string > flashBootloader(Memory memory, Type type, std::function< void(float)> progressCallback, const dai::Path & path)
Flash selected bootloader to the current board
Parameters
  • memory: Memory to flash
  • type: Bootloader type to flash
  • progressCallback: Callback that sends back a value between 0..1 which signifies current flashing progress
  • path: Optional parameter to custom bootloader to flash
function
std::tuple< bool, std::string > flashUserBootloader(std::function< void(float)> progressCallback, const dai::Path & path)
Flashes user bootloader to the current board. Available for NETWORK bootloader type
Parameters
  • progressCallback: Callback that sends back a value between 0..1 which signifies current flashing progress
  • path: Optional parameter to custom bootloader to flash
function
std::tuple< bool, std::string > flashGpioModeBootHeader(Memory memory, int gpioMode)
Flash boot header which boots same as equivalent GPIO mode would
Parameters
  • gpioMode: GPIO mode equivalent
function
std::tuple< bool, std::string > flashUsbRecoveryBootHeader(Memory memory)
Flash USB recovery boot header. Switches to USB ROM Bootloader
Parameters
  • memory: Which memory to flash the header to
function
std::tuple< bool, std::string > flashBootHeader(Memory memory, int32_t frequency, int64_t location, int32_t dummyCycles, int64_t offset)
Flash optimized boot header
Parameters
  • memory: Which memory to flasht the header to
  • frequency: SPI specific parameter, frequency in MHz
  • location: Target location the header should boot to. Default to location of bootloader
  • dummyCycles: SPI specific parameter
  • offset: Offset in memory to flash the header to. Defaults to offset of boot header
Returns
status as std::tuple<bool, std::string>
function
std::tuple< bool, std::string > flashFastBootHeader(Memory memory, int32_t frequency, int64_t location, int32_t dummyCycles, int64_t offset)
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.
Parameters
  • memory: Which memory to flash the header to
  • frequency: SPI specific parameter, frequency in MHz
  • location: Target location the header should boot to. Default to location of bootloader
  • dummyCycles: SPI specific parameter
  • offset: Offset in memory to flash the header to. Defaults to offset of boot header
Returns
status as std::tuple<bool, std::string>
function
std::tuple< bool, std::string > flashCustom(Memory memory, size_t offset, const std::vector< uint8_t > & data, std::function< void(float)> progressCb)
Flash arbitrary data at custom offset in specified memory
Parameters
  • memory: Memory to flash
  • offset: Offset at which to flash the given data in bytes
  • progressCallback: Callback that sends back a value between 0..1 which signifies current flashing progress
  • data: Data to flash
function
std::tuple< bool, std::string > flashCustom(Memory memory, size_t offset, const uint8_t * data, size_t size, std::function< void(float)> progressCb)
function
std::tuple< bool, std::string > flashCustom(Memory memory, size_t offset, std::string filename, std::function< void(float)> progressCb)
function
std::tuple< bool, std::string > readCustom(Memory memory, size_t offset, size_t size, std::vector< uint8_t > & data, std::function< void(float)> progressCb)
Reads arbitrary data at custom offset in specified memory
Parameters
  • memory: Memory to read
  • offset: Offset at which to read the specified bytes
  • size: Number of bytes to read
  • data: Data to read to. Must be at least 'size' number of bytes big
  • progressCallback: Callback that sends back a value between 0..1 which signifies current reading progress
function
std::tuple< bool, std::string > readCustom(Memory memory, size_t offset, size_t size, uint8_t * data, std::function< void(float)> progressCb)
function
std::tuple< bool, std::string > readCustom(Memory memory, size_t offset, size_t size, std::string filename, std::function< void(float)> progressCb)
function
std::tuple< bool, std::string, std::vector< uint8_t > > readCustom(Memory memory, size_t offset, size_t size, std::function< void(float)> progressCb)
function
nlohmann::json readConfigData(Memory memory, Type type)
Reads configuration data from bootloader
Returns
Unstructured configuration data
Parameters
  • memory: Optional - from which memory to read configuration data
  • type: Optional - from which type of bootloader to read configuration data
function
std::tuple< bool, std::string > flashConfigData(nlohmann::json configData, Memory memory, Type type)
Flashes configuration data to bootloader
Parameters
  • configData: Unstructured configuration data
  • memory: Optional - to which memory flash configuration
  • type: Optional - for which type of bootloader to flash configuration
function
std::tuple< bool, std::string > flashConfigFile(const dai::Path & configPath, Memory memory, Type type)
Flashes configuration data to bootloader
Parameters
  • configPath: Unstructured configuration data
  • memory: Optional - to which memory flash configuration
  • type: Optional - for which type of bootloader to flash configuration
function
std::tuple< bool, std::string > flashConfigClear(Memory memory, Type type)
Clears configuration data
Parameters
  • memory: Optional - on which memory to clear configuration data
  • type: Optional - for which type of bootloader to clear configuration data
function
Config readConfig(Memory memory, Type type)
Reads configuration from bootloader
Parameters
  • memory: Optional - from which memory to read configuration
  • type: Optional - from which type of bootloader to read configuration
Returns
Configuration structure
function
std::tuple< bool, std::string > flashConfig(const Config & config, Memory memory, Type type)
Flashes configuration to bootloader
Parameters
  • configData: Configuration structure
  • memory: Optional - to which memory flash configuration
  • type: Optional - for which type of bootloader to flash configuration
function
MemoryInfo getMemoryInfo(Memory memory)
Retrieves information about specified memory
Parameters
  • memory: Specifies which memory to query
function
bool isUserBootloaderSupported()
Checks whether User Bootloader is supported with current bootloader
Returns
true of User Bootloader is supported, false otherwise
function
bool isUserBootloader()
Retrieves whether current bootloader is User Bootloader (B out of A/B configuration)
function
void bootMemory(const std::vector< uint8_t > & fw)
Boots a custom FW in memory
Parameters
  • fw:
Parameters
  • A: runtime exception if there are any communication issues
function
void bootUsbRomBootloader()
Boots into integrated ROM bootloader in USB mode
Parameters
  • A: runtime exception if there are any communication issues
function
Version getVersion()
Returns
Version of current running bootloader
function
tl::optional< Version > getFlashedVersion()
Returns
Version of the bootloader that is flashed on the device. Nullopt when the version could not be retrieved because the device was in X_LINK_UNBOOTED state before booting the bootloader.
function
bool isEmbeddedVersion()
Returns
True when bootloader was booted using latest bootloader integrated in the library. False when bootloader is already running on the device and just connected to.
function
Type getType()
Returns
Type of currently connected bootloader
function
bool isAllowedFlashingBootloader()
Returns
True if allowed to flash bootloader
function
void close()
Explicitly closes connection to device.
Parameters
This function does not need to be explicitly called as destructor closes the device automatically
function
bool isClosed()
Is the device already closed (or disconnected)
Parameters
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.
struct

dai::DeviceBootloader::ApplicationInfo

variable
Memory memory
variable
bool hasApplication
variable
std::string firmwareVersion
variable
std::string applicationName
struct

dai::DeviceBootloader::Config

function
void setStaticIPv4(std::string ip, std::string mask, std::string gateway)
function
void setDynamicIPv4(std::string ip, std::string mask, std::string gateway)
function
bool isStaticIPV4()
function
std::string getIPv4()
function
std::string getIPv4Mask()
function
std::string getIPv4Gateway()
function
void setDnsIPv4(std::string dns, std::string dnsAlt)
function
std::string getDnsIPv4()
function
std::string getDnsAltIPv4()
function
void setUsbTimeout(std::chrono::milliseconds ms)
function
std::chrono::milliseconds getUsbTimeout()
function
void setNetworkTimeout(std::chrono::milliseconds ms)
function
std::chrono::milliseconds getNetworkTimeout()
function
void setMacAddress(std::string mac)
function
std::string getMacAddress()
function
void setUsbMaxSpeed(UsbSpeed speed)
function
UsbSpeed getUsbMaxSpeed()
function
nlohmann::json toJson()
struct

dai::DeviceBootloader::MemoryInfo

variable
bool available
variable
std::int64_t size
variable
std::string info
enum

dai::bootloader::Type Type

enum

dai::bootloader::Memory Memory

enum

dai::bootloader::Section Section

enum

dai::Version Version

struct

dai::EepromError

struct

dai::Version

#include Version.hpp
explicit function
Version(const std::string & v)
function
Version(unsigned major, unsigned minor, unsigned patch)
function
Version(unsigned major, unsigned minor, unsigned patch, std::string buildInfo)
function
bool operator==(const Version & other)
function
bool operator<(const Version & other)
inline function
bool operator!=(const Version & rhs)
inline function
bool operator>(const Version & rhs)
inline function
bool operator<=(const Version & rhs)
inline function
bool operator>=(const Version & rhs)
function
std::string toString()
function
std::string toStringSemver()
function
std::string getBuildInfo()
function
Version getSemver()
class

dai::OpenVINO

#include OpenVINO.hpp
struct

dai::OpenVINO::Blob

#include OpenVINO.hpp
variable
Version version
variable
std::unordered_map< std::string, TensorInfo > networkInputs
variable
std::unordered_map< std::string, TensorInfo > networkOutputs
variable
uint32_t stageCount
variable
uint32_t numShaves
variable
uint32_t numSlices
variable
std::vector< uint8_t > data
function
Blob(std::vector< uint8_t > data)
function
Blob(const dai::Path & path)
enum

Version

enumerator
VERSION_2020_3
enumerator
VERSION_2020_4
enumerator
VERSION_2021_1
enumerator
VERSION_2021_2
enumerator
VERSION_2021_3
enumerator
VERSION_2021_4
enumerator
VERSION_2022_1
enumerator
VERSION_UNIVERSAL
struct

dai::Asset

#include AssetManager.hpp
variable
const std::string key
variable
std::vector< std::uint8_t > data
variable
std::uint32_t alignment
function
Asset()
inline explicit function
Asset(std::string k)
function
std::string getRelativeUri()
class

dai::AssetsMutable

function
void set(std::string, std::uint32_t offset, std::uint32_t size, std::uint32_t alignment)
class

dai::AssetManager

#include AssetManager.hpp
function
void addExisting(std::vector< std::shared_ptr< Asset >> assets)
Adds all assets in an array to the AssetManager
Parameters
  • assets: Vector of assets to add
function
std::shared_ptr< dai::Asset > set(Asset asset)
Adds or overwrites an asset object to AssetManager.
Parameters
Returns
Shared pointer to asset
function
std::shared_ptr< dai::Asset > set(const std::string & key, Asset asset)
Adds or overwrites an asset object to AssetManager with a specified key. Key value will be assigned to an Asset as well
Parameters
  • key: Key under which the asset should be stored
  • asset: Asset to store
Returns
Shared pointer to asset
function
std::shared_ptr< dai::Asset > set(const std::string & key, const dai::Path & path, int alignment)
Loads file into asset manager under specified key.
Parameters
  • key: Key under which the asset should be stored
  • path: Path to file which to load as asset
  • alignment: [Optional] alignment of asset data in asset storage. Default is 64B
function
std::shared_ptr< dai::Asset > set(const std::string & key, const std::vector< std::uint8_t > & data, int alignment)
Loads file into asset manager under specified key.
Parameters
  • key: Key under which the asset should be stored
  • data: Asset data
  • alignment: [Optional] alignment of asset data in asset storage. Default is 64B
Returns
Shared pointer to asset
function
std::shared_ptr< dai::Asset > set(const std::string & key, std::vector< std::uint8_t > && data, int alignment)
function
std::shared_ptr< const Asset > get(const std::string & key)
Returns
Asset assigned to the specified key or a nullptr otherwise
function
std::shared_ptr< Asset > get(const std::string & key)
Returns
Asset assigned to the specified key or a nullptr otherwise
function
std::vector< std::shared_ptr< const Asset > > getAll()
Returns
All asset stored in the AssetManager
function
std::vector< std::shared_ptr< Asset > > getAll()
Returns
All asset stored in the AssetManager
function
std::size_t size()
Returns
Number of asset stored in the AssetManager
function
void remove(const std::string & key)
Removes asset with key
Parameters
  • key: Key of asset to remove
function
void serialize(AssetsMutable & assets, std::vector< std::uint8_t > & assetStorage, std::string prefix)
class

dai::Node

#include Node.hppDerived by dai::NodeCRTP< Node, SPIOut, SPIOutProperties >, dai::NodeCRTP< Node, DetectionParser, DetectionParserProperties >, dai::NodeCRTP< Node, Cast, CastProperties >, dai::NodeCRTP< Node, PointCloud, PointCloudProperties >, dai::NodeCRTP< Node, AprilTag, AprilTagProperties >, dai::NodeCRTP< Node, ToF, ToFProperties >, dai::NodeCRTP< Node, SystemLogger, SystemLoggerProperties >, dai::NodeCRTP< Node, SPIIn, SPIInProperties >, dai::NodeCRTP< Node, UVC, UVCProperties >, dai::NodeCRTP< Node, ObjectTracker, ObjectTrackerProperties >, dai::NodeCRTP< Node, MonoCamera, MonoCameraProperties >, dai::NodeCRTP< Node, FeatureTracker, FeatureTrackerProperties >, dai::NodeCRTP< Node, ColorCamera, ColorCameraProperties >, dai::NodeCRTP< Node, Camera, CameraProperties >, dai::NodeCRTP< Node, Warp, WarpProperties >, dai::NodeCRTP< Node, SpatialLocationCalculator, SpatialLocationCalculatorProperties >, dai::NodeCRTP< Node, NeuralNetwork, NeuralNetworkProperties >, dai::NodeCRTP< Node, ImageManip, ImageManipProperties >, dai::NodeCRTP< Node, XLinkIn, XLinkInProperties >, dai::NodeCRTP< Node, Script, ScriptProperties >, dai::NodeCRTP< Node, IMU, IMUProperties >, dai::NodeCRTP< Node, EdgeDetector, EdgeDetectorProperties >, dai::NodeCRTP< Node, VideoEncoder, VideoEncoderProperties >, dai::NodeCRTP< Node, StereoDepth, StereoDepthProperties >, dai::NodeCRTP< Node, XLinkOut, XLinkOutProperties >, dai::NodeCRTP< Node, ImageAlign, ImageAlignProperties >, dai::NodeCRTP< Node, Sync, SyncProperties >, dai::NodeCRTP< Node, MessageDemux, MessageDemuxProperties >
variable
const Id id
variable
Properties & properties
function
Pipeline getParentPipeline()
function
const Pipeline getParentPipeline()
function
std::unique_ptr< Node > clone()
function
const char * getName()
function
std::vector< Output > getOutputs()
function
std::vector< Input > getInputs()
function
std::vector< Output * > getOutputRefs()
function
std::vector< const Output * > getOutputRefs()
function
std::vector< Input * > getInputRefs()
function
std::vector< const Input * > getInputRefs()
function
Node(const std::shared_ptr< PipelineImpl > & p, Id nodeId, std::unique_ptr< Properties > props)
function
~Node()
function
const AssetManager & getAssetManager()
function
AssetManager & getAssetManager()
struct

dai::Node::Connection

#include Node.hpp
variable
Id outputId
variable
std::string outputName
variable
std::string outputGroup
variable
Id inputId
variable
std::string inputName
variable
std::string inputGroup
function
Connection(Output out, Input in)
function
bool operator==(const Connection & rhs)
struct

dai::Node::DatatypeHierarchy

variable
DatatypeEnum datatype
variable
bool descendants
inline function
DatatypeHierarchy(DatatypeEnum d, bool c)
class

dai::Node::Input

variable
std::string group
variable
std::string name
variable
Type type
variable
bool defaultBlocking
variable
int defaultQueueSize
variable
tl::optional< bool > blocking
variable
tl::optional< int > queueSize
variable
tl::optional< bool > waitForMessage
variable
bool defaultWaitForMessage
variable
std::vector< DatatypeHierarchy > possibleDatatypes
inline function
Input(Node & par, std::string n, Type t, std::vector< DatatypeHierarchy > types)
inline function
Input(Node & par, std::string n, Type t, bool blocking, int queueSize, std::vector< DatatypeHierarchy > types)
inline function
Input(Node & par, std::string n, Type t, bool blocking, int queueSize, bool waitForMessage, std::vector< DatatypeHierarchy > types)
inline function
Input(Node & par, std::string group, std::string n, Type t, bool blocking, int queueSize, bool waitForMessage, std::vector< DatatypeHierarchy > types)
inline function
Node & getParent()
inline function
const Node & getParent()
function
std::string toString()
function
void setBlocking(bool blocking)
Overrides default input queue behavior.
Parameters
  • blocking: True blocking, false overwriting
function
bool getBlocking()
Get input queue behavior
Returns
True blocking, false overwriting
function
void setQueueSize(int size)
Overrides default input queue size. If queue size fills up, behavior depends on
Parameters
  • size: Maximum input queue size
function
int getQueueSize()
Get input queue size.
Returns
Maximum input queue size
function
void setWaitForMessage(bool waitForMessage)
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.
Parameters
  • waitForMessage: Whether to wait for message to arrive to this input or not
function
bool getWaitForMessage()
Get behavior whether to wait for this input when a Node processes certain data or not
Returns
Whether to wait for message to arrive to this input or not
function
void setReusePreviousMessage(bool reusePreviousMessage)
Equivalent to setWaitForMessage but with inverted logic.
function
bool getReusePreviousMessage()
Equivalent to getWaitForMessage but with inverted logic.
enum

Type

enumerator
SReceiver
enumerator
MReceiver
class

dai::Node::InputMap

#include Node.hpp
variable
std::string name
function
InputMap(Input defaultInput)
function
InputMap(std::string name, Input defaultInput)
function
Input & operator[](const std::string & key)
class

dai::Node::Output

variable
std::string group
variable
std::string name
variable
Type type
variable
std::vector< DatatypeHierarchy > possibleDatatypes
inline function
Output(Node & par, std::string n, Type t, std::vector< DatatypeHierarchy > types)
inline function
Output(Node & par, std::string group, std::string n, Type t, std::vector< DatatypeHierarchy > types)
inline function
Node & getParent()
inline function
const Node & getParent()
function
std::string toString()
function
bool isSamePipeline(const Input & in)
Check if this output and given input are on the same pipeline.
Parameters
canConnect for checking if connection is possible
Returns
True if output and input are on the same pipeline
function
bool canConnect(const Input & in)
Check if connection is possible
Parameters
Returns
True if connection is possible, false otherwise
function
std::vector< Connection > getConnections()
Retrieve all connections from this output
Returns
Vector of connections
function
void link(const Input & in)
Link current output to input.Throws an error if this output cannot be linked to given input, or if they are already linked
Parameters
function
void unlink(const Input & in)
Unlink a previously linked connectionThrows an error if not linked.
Parameters
  • in: Input from which to unlink from
enum

Type

enumerator
MSender
enumerator
SSender
class

dai::Node::OutputMap

#include Node.hpp
variable
std::string name
function
OutputMap(std::string name, Output defaultOutput)
function
OutputMap(Output defaultOutput)
function
Output & operator[](const std::string & key)
enum

std::int64_t Id

class

dai::NodeCRTP

variable
Properties & properties
inline function
const char * getName()
inline function
std::unique_ptr< Node > clone()
enum

Props Properties

class

dai::PipelineImpl

function
PipelineImpl()
function
PipelineImpl(const PipelineImpl &)
class

dai::Pipeline

#include Pipeline.hpp
function
Pipeline()
Constructs a new pipeline
explicit function
Pipeline(const std::shared_ptr< PipelineImpl > & pimpl)
function
Pipeline clone()
function
GlobalProperties getGlobalProperties()
Returns
Global properties of current pipeline
function
PipelineSchema getPipelineSchema(SerializationType type)
Returns
Pipeline schema
inline function
void serialize(PipelineSchema & schema, Assets & assets, std::vector< std::uint8_t > & assetStorage)
inline function
nlohmann::json serializeToJson()
inline function
std::shared_ptr< N > create()
Adds a node to pipeline.Node is specified by template argument N
inline function
void remove(std::shared_ptr< Node > node)
inline function
std::vector< std::shared_ptr< const Node > > getAllNodes()
inline function
std::vector< std::shared_ptr< Node > > getAllNodes()
inline function
std::shared_ptr< const Node > getNode(Node::Id id)
inline function
std::shared_ptr< Node > getNode(Node::Id id)
inline function
std::vector< Node::Connection > getConnections()
inline function
const NodeConnectionMap & getConnectionMap()
inline function
const NodeMap & getNodeMap()
inline function
void link(const Node::Output & out, const Node::Input & in)
Link output to an input. Both nodes must be on the same pipelineThrows an error if they aren't or cannot be connected
Parameters
  • out: Nodes output to connect from
  • in: Nodes input to connect to
inline function
void unlink(const Node::Output & out, const Node::Input & in)
Unlink output from an input.Throws an error if link doesn't exists
Parameters
  • out: Nodes output to unlink from
  • in: Nodes input to unlink to
inline function
const AssetManager & getAssetManager()
inline function
AssetManager & getAssetManager()
inline function
void setOpenVINOVersion(OpenVINO::Version version)
inline function
void setCalibrationData(CalibrationHandler calibrationDataHandler)
Sets the calibration in pipeline which overrides the calibration data in eeprom
Parameters
  • calibrationDataHandler: CalibrationHandler object which is loaded with calibration information.
inline function
CalibrationHandler getCalibrationData()
gets the calibration data which is set through pipeline
Returns
the calibrationHandler with calib data in the pipeline
inline function
OpenVINO::Version getOpenVINOVersion()
inline function
tl::optional< OpenVINO::Version > getRequiredOpenVINOVersion()
inline function
void setCameraTuningBlobPath(const dai::Path & path)
inline function
void setXLinkChunkSize(int sizeBytes)
Set chunk size for splitting device-sent XLink packets, in bytes. A larger value could increase performance, with 0 disabling chunking. A negative value won't modify the device defaults - configured per protocol, currently 64*1024 for both USB and Ethernet.
inline function
void setSippBufferSize(int sizeBytes)
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.
inline function
void setSippDmaBufferSize(int sizeBytes)
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.
inline function
bool isOpenVINOVersionCompatible(OpenVINO::Version version)
inline function
void setBoardConfig(BoardConfig board)
inline function
BoardConfig getBoardConfig()
inline function
Device::Config getDeviceConfig()
enum

PipelineImpl::NodeConnectionMap NodeConnectionMap

enum

PipelineImpl::NodeMap NodeMap

class

dai::ADatatype

#include ADatatype.hppDerived by dai::Buffer
inline explicit function
ADatatype(std::shared_ptr< RawBuffer > r)
function
~ADatatype()
function
std::shared_ptr< dai::RawBuffer > serialize()
inline function
std::shared_ptr< RawBuffer > getRaw()
class

dai::AprilTagConfig

#include AprilTagConfig.hpp
function
AprilTagConfig()
Construct AprilTagConfig message.
explicit function
AprilTagConfig(std::shared_ptr< RawAprilTagConfig > ptr)
function
~AprilTagConfig()
function
AprilTagConfig & setFamily(Family family)
Parameters
function
AprilTagConfig & set(dai::RawAprilTagConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawAprilTagConfig get()
Retrieve configuration data for AprilTag.
Returns
config for stereo depth algorithm
class

dai::AprilTags

#include AprilTags.hpp
variable
std::vector< AprilTag > & aprilTags
function
AprilTags()
Construct AprilTags message.
explicit function
AprilTags(std::shared_ptr< RawAprilTags > ptr)
function
~AprilTags()
function
AprilTags & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
AprilTags & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
AprilTags & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::Buffer

#include Buffer.hppDerived by dai::AprilTagConfig, dai::AprilTags, dai::CameraControl, dai::EdgeDetectorConfig, dai::EncodedFrame, dai::FeatureTrackerConfig, dai::IMUData, dai::ImageAlignConfig, dai::ImageManipConfig, dai::ImgDetections, dai::ImgFrame, dai::MessageGroup, dai::NNData, dai::PointCloudConfig, dai::PointCloudData, dai::SpatialImgDetections, dai::SpatialLocationCalculatorConfig, dai::SpatialLocationCalculatorData, dai::StereoDepthConfig, dai::SystemInformation, dai::ToFConfig, dai::TrackedFeatures, dai::Tracklets
function
Buffer()
explicit function
Buffer(std::shared_ptr< dai::RawBuffer > ptr)
function
~Buffer()
function
std::vector< std::uint8_t > & getData()
function
void setData(const std::vector< std::uint8_t > & data)
Parameters
  • data: Copies data to internal buffer
function
void setData(std::vector< std::uint8_t > && data)
Parameters
  • data: Moves data to internal buffer
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()
Retrieves timestamp related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
function
int64_t getSequenceNum()
Retrieves sequence number
function
Buffer & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets timestamp related to dai::Clock::now()
function
Buffer & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets timestamp related to dai::Clock::now()
function
Buffer & setSequenceNum(int64_t sequenceNum)
Retrieves sequence number
class

dai::CameraControl

#include CameraControl.hpp
function
CameraControl()
explicit function
CameraControl(std::shared_ptr< RawCameraControl > ptr)
function
~CameraControl()
function
CameraControl & setCaptureStill(bool capture)
Set a command to capture a still image
function
CameraControl & setStartStreaming()
Set a command to start streaming
function
CameraControl & setStopStreaming()
Set a command to stop streaming
function
CameraControl & setExternalTrigger(int numFramesBurst, int numFramesDiscard)
Set a command to enable external trigger snapshot modeA rising edge on the sensor FSIN pin will make it capture a sequence of
function
CameraControl & setFrameSyncMode(FrameSyncMode mode)
Set the frame sync mode for continuous streaming operation mode, translating to how the camera pin FSIN/FSYNC is used: input/output/disabled
function
CameraControl & setStrobeSensor(int activeLevel)
Enable STROBE output on sensor pin, optionally configuring the polarity. Note: for many sensors the polarity is high-active and not configurable
function
CameraControl & setStrobeExternal(int gpioNumber, int activeLevel)
Enable STROBE output driven by a MyriadX GPIO, optionally configuring the polarity This normally requires a FSIN/FSYNC/trigger input for MyriadX (usually GPIO 41), to generate timings
function
CameraControl & setStrobeDisable()
Disable STROBE output
function
CameraControl & setAutoFocusMode(AutoFocusMode mode)
Set a command to specify autofocus mode. Default
function
CameraControl & setAutoFocusTrigger()
Set a command to trigger autofocus
function
CameraControl & setAutoFocusLensRange(int infinityPosition, int macroPosition)
Set autofocus lens range,
function
CameraControl & setAutoFocusRegion(uint16_t startX, uint16_t startY, uint16_t width, uint16_t height)
Set a command to specify focus region in pixels. Note: the region should be mapped to the configured sensor resolution, before ISP scaling
Parameters
  • startX: X coordinate of top left corner of region
  • startY: Y coordinate of top left corner of region
  • width: Region width
  • height: Region height
function
CameraControl & setManualFocus(uint8_t lensPosition)
Set a command to specify manual focus position
Parameters
  • lensPosition: specify lens position 0..255
function
CameraControl & setManualFocusRaw(float lensPositionRaw)
Set a command to specify manual focus position (more precise control).
Parameters
  • lensPositionRaw: specify lens position 0.0f .. 1.0f
Returns
function
CameraControl & setAutoExposureEnable()
Set a command to enable auto exposure
function
CameraControl & setAutoExposureLock(bool lock)
Set a command to specify lock auto exposure
Parameters
  • lock: Auto exposure lock mode enabled or disabled
function
CameraControl & setAutoExposureRegion(uint16_t startX, uint16_t startY, uint16_t width, uint16_t height)
Set a command to specify auto exposure region in pixels. Note: the region should be mapped to the configured sensor resolution, before ISP scaling
Parameters
  • startX: X coordinate of top left corner of region
  • startY: Y coordinate of top left corner of region
  • width: Region width
  • height: Region height
function
CameraControl & setAutoExposureCompensation(int compensation)
Set a command to specify auto exposure compensation
Parameters
  • compensation: Compensation value between -9..9, default 0
function
CameraControl & setAutoExposureLimit(uint32_t maxExposureTimeUs)
Set a command to specify the maximum exposure time limit for auto-exposure. By default the AE algorithm prioritizes increasing exposure over ISO, up to around frame-time (subject to further limits imposed by anti-banding)
Parameters
  • maxExposureTimeUs: Maximum exposure time in microseconds
function
CameraControl & setAutoExposureLimit(std::chrono::microseconds maxExposureTime)
Set a command to specify the maximum exposure time limit for auto-exposure. By default the AE algorithm prioritizes increasing exposure over ISO, up to around frame-time (subject to further limits imposed by anti-banding)
Parameters
  • maxExposureTime: Maximum exposure time
function
CameraControl & setAntiBandingMode(AntiBandingMode mode)
Set a command to specify anti-banding mode. Anti-banding / anti-flicker works in auto-exposure mode, by controlling the exposure time to be applied in multiples of half the mains period, for example in multiple of 10ms for 50Hz (period 20ms) AC-powered illumination sources.If the scene would be too bright for the smallest exposure step (10ms in the example, with ISO at a minimum of 100), anti-banding is not effective.
Parameters
  • mode: Anti-banding mode to use. Default:
function
CameraControl & setManualExposure(uint32_t exposureTimeUs, uint32_t sensitivityIso)
Set a command to manually specify exposure
Parameters
  • exposureTimeUs: Exposure time in microseconds
  • sensitivityIso: Sensitivity as ISO value, usual range 100..1600
function
CameraControl & setManualExposure(std::chrono::microseconds exposureTime, uint32_t sensitivityIso)
Set a command to manually specify exposure
Parameters
  • exposureTime: Exposure time
  • sensitivityIso: Sensitivity as ISO value, usual range 100..1600
function
CameraControl & setAutoWhiteBalanceMode(AutoWhiteBalanceMode mode)
Set a command to specify auto white balance mode
Parameters
  • mode: Auto white balance mode to use. Default
function
CameraControl & setAutoWhiteBalanceLock(bool lock)
Set a command to specify auto white balance lock
Parameters
  • lock: Auto white balance lock mode enabled or disabled
function
CameraControl & setManualWhiteBalance(int colorTemperatureK)
Set a command to manually specify white-balance color correction
Parameters
  • colorTemperatureK: Light source color temperature in kelvins, range 1000..12000
function
CameraControl & setBrightness(int value)
Set a command to adjust image brightness
Parameters
  • value: Brightness, range -10..10, default 0
function
CameraControl & setContrast(int value)
Set a command to adjust image contrast
Parameters
  • value: Contrast, range -10..10, default 0
function
CameraControl & setSaturation(int value)
Set a command to adjust image saturation
Parameters
  • value: Saturation, range -10..10, default 0
function
CameraControl & setSharpness(int value)
Set a command to adjust image sharpness
Parameters
  • value: Sharpness, range 0..4, default 1
function
CameraControl & setLumaDenoise(int value)
Set a command to adjust luma denoise amount
Parameters
  • value: Luma denoise amount, range 0..4, default 1
function
CameraControl & setChromaDenoise(int value)
Set a command to adjust chroma denoise amount
Parameters
  • value: Chroma denoise amount, range 0..4, default 1
function
CameraControl & setSceneMode(SceneMode mode)
Set a command to specify scene mode
Parameters
  • mode: Scene mode
function
CameraControl & setEffectMode(EffectMode mode)
Set a command to specify effect mode
Parameters
  • mode: Effect mode
function
CameraControl & setControlMode(ControlMode mode)
Set a command to specify control mode
Parameters
  • mode: Control mode
function
CameraControl & setCaptureIntent(CaptureIntent mode)
Set a command to specify capture intent mode
Parameters
  • mode: Capture intent mode
function
bool getCaptureStill()
Check whether command to capture a still is set
Returns
True if capture still command is set
function
std::chrono::microseconds getExposureTime()
Retrieves exposure time
function
int getSensitivity()
Retrieves sensitivity, as an ISO value
function
int getLensPosition()
Retrieves lens position, range 0..255. Returns -1 if not available
function
float getLensPositionRaw()
Retrieves lens position, range 0.0f..1.0f.
function
CameraControl & set(dai::RawCameraControl config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawCameraControl get()
Retrieve configuration data for CameraControl.
Returns
config for CameraControl
enum

RawCameraControl::FrameSyncMode FrameSyncMode

class

dai::EdgeDetectorConfig

#include EdgeDetectorConfig.hpp
function
EdgeDetectorConfig()
Construct EdgeDetectorConfig message.
explicit function
EdgeDetectorConfig(std::shared_ptr< RawEdgeDetectorConfig > ptr)
function
~EdgeDetectorConfig()
function
void setSobelFilterKernels(const std::vector< std::vector< int >> & horizontalKernel, const std::vector< std::vector< int >> & verticalKernel)
Set sobel filter horizontal and vertical 3x3 kernels
Parameters
  • horizontalKernel: Used for horizontal gradient computation in 3x3 Sobel filter
  • verticalKernel: Used for vertical gradient computation in 3x3 Sobel filter
function
EdgeDetectorConfigData getConfigData()
Retrieve configuration data for EdgeDetector
Returns
EdgeDetectorConfigData: sobel filter horizontal and vertical 3x3 kernels
function
EdgeDetectorConfig & set(dai::RawEdgeDetectorConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawEdgeDetectorConfig get()
Retrieve configuration data for EdgeDetector.
Returns
config for EdgeDetector
class

dai::EncodedFrame

function
EncodedFrame()
Construct EncodedFrame message. Timestamp is set to now
explicit function
EncodedFrame(std::shared_ptr< RawEncodedFrame > ptr)
function
~EncodedFrame()
function
unsigned int getInstanceNum()
Retrieves instance number
function
std::chrono::microseconds getExposureTime()
Retrieves exposure time
function
int getSensitivity()
Retrieves sensitivity, as an ISO value
function
int getColorTemperature()
Retrieves white-balance color temperature of the light source, in kelvins
function
int getLensPosition()
Retrieves lens position, range 0..255. Returns -1 if not available
function
float getLensPositionRaw()
Retrieves lens position, range 0.0f..1.0f. Returns -1 if not available
function
unsigned int getQuality()
Retrieves the encoding quality
function
unsigned int getBitrate()
Retrieves the encoding bitrate
function
bool getLossless()
Returns true if encoding is lossless (JPEG only)
function
FrameType getFrameType()
Retrieves frame type (H26x only)
function
Profile getProfile()
Retrieves the encoding profile (JPEG, AVC or HEVC)
function
EncodedFrame & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > tp)
Retrieves image timestamp related to dai::Clock::now()
function
EncodedFrame & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > tp)
Sets image timestamp related to dai::Clock::now()
function
EncodedFrame & setSequenceNum(int64_t seq)
Specifies sequence number
Parameters
  • seq: Sequence number
function
EncodedFrame & setInstanceNum(unsigned int instance)
Instance number relates to the origin of the frame (which camera)
Parameters
  • instance: Instance number
function
EncodedFrame & setQuality(unsigned int quality)
Specifies the encoding quality
Parameters
  • quality: Encoding quality
function
EncodedFrame & setBitrate(unsigned int bitrate)
Specifies the encoding quality
Parameters
  • quality: Encoding quality
function
EncodedFrame & setLossless(bool lossless)
Specifies if encoding is lossless (JPEG only)
Parameters
  • lossless: True if lossless
function
EncodedFrame & setFrameType(FrameType type)
Specifies the frame type (H26x only)
Parameters
  • type: Type of h26x frame (I, P, B)
function
EncodedFrame & setProfile(Profile profile)
Specifies the encoding profile
Parameters
  • profile: Encoding profile
enum

RawEncodedFrame::Profile Profile

enum

RawEncodedFrame::FrameType FrameType

class

dai::FeatureTrackerConfig

#include FeatureTrackerConfig.hpp
function
FeatureTrackerConfig()
Construct FeatureTrackerConfig message.
explicit function
FeatureTrackerConfig(std::shared_ptr< RawFeatureTrackerConfig > ptr)
function
~FeatureTrackerConfig()
function
FeatureTrackerConfig & setCornerDetector(dai::FeatureTrackerConfig::CornerDetector::Type cornerDetector)
Set corner detector algorithm type.
Parameters
  • cornerDetector: Corner detector type, HARRIS or SHI_THOMASI
function
FeatureTrackerConfig & setCornerDetector(dai::FeatureTrackerConfig::CornerDetector config)
Set corner detector full configuration.
Parameters
  • config: Corner detector configuration
function
FeatureTrackerConfig & setOpticalFlow()
Set optical flow as motion estimation algorithm type.
function
FeatureTrackerConfig & setOpticalFlow(dai::FeatureTrackerConfig::MotionEstimator::OpticalFlow config)
Set optical flow full configuration.
Parameters
  • config: Optical flow configuration
function
FeatureTrackerConfig & setHwMotionEstimation()
Set hardware accelerated motion estimation using block matching. Faster than optical flow (software implementation) but might not be as accurate.
function
FeatureTrackerConfig & setNumTargetFeatures(std::int32_t numTargetFeatures)
Set number of target features to detect.
Parameters
  • numTargetFeatures: Number of features
function
FeatureTrackerConfig & setMotionEstimator(bool enable)
Enable or disable motion estimator.
Parameters
  • enable:
function
FeatureTrackerConfig & setMotionEstimator(dai::FeatureTrackerConfig::MotionEstimator config)
Set motion estimator full configuration.
Parameters
  • config: Motion estimator configuration
function
FeatureTrackerConfig & setFeatureMaintainer(bool enable)
Enable or disable feature maintainer.
Parameters
  • enable:
function
FeatureTrackerConfig & setFeatureMaintainer(dai::FeatureTrackerConfig::FeatureMaintainer config)
Set feature maintainer full configuration.
Parameters
  • config: feature maintainer configuration
function
FeatureTrackerConfig & set(dai::RawFeatureTrackerConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawFeatureTrackerConfig get()
Retrieve configuration data for FeatureTracker.
Returns
config for feature tracking algorithm
class

dai::IMUData

#include IMUData.hpp
variable
std::vector< IMUPacket > & packets
function
IMUData()
explicit function
IMUData(std::shared_ptr< RawIMUData > ptr)
function
~IMUData()
class

dai::ImageAlignConfig

#include ImageAlignConfig.hpp
function
ImageAlignConfig()
explicit function
ImageAlignConfig(std::shared_ptr< RawImageAlignConfig > ptr)
function
~ImageAlignConfig()
function
ImageAlignConfig & set(dai::RawImageAlignConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawImageAlignConfig get()
Retrieve configuration data for SpatialLocationCalculator.
Returns
config for SpatialLocationCalculator
class

dai::ImageManipConfig

#include ImageManipConfig.hpp
function
ImageManipConfig()
explicit function
ImageManipConfig(std::shared_ptr< RawImageManipConfig > ptr)
function
~ImageManipConfig()
function
ImageManipConfig & setCropRect(float xmin, float ymin, float xmax, float ymax)
Specifies crop with rectangle with normalized values (0..1)
Parameters
  • xmin: Top left X coordinate of rectangle
  • ymin: Top left Y coordinate of rectangle
  • xmax: Bottom right X coordinate of rectangle
  • ymax: Bottom right Y coordinate of rectangle
function
ImageManipConfig & setCropRect(std::tuple< float, float, float, float > coordinates)
Specifies crop with rectangle with normalized values (0..1)
Parameters
  • coordinates: Coordinate of rectangle
function
ImageManipConfig & setCropRotatedRect(RotatedRect rr, bool normalizedCoords)
Specifies crop with rotated rectangle. Optionally as non normalized coordinates
Parameters
  • rr: Rotated rectangle which specifies crop
  • normalizedCoords: If true coordinates are in normalized range (0..1) otherwise absolute
function
ImageManipConfig & setCenterCrop(float ratio, float whRatio)
Specifies a centered crop.
Parameters
  • ratio: Ratio between input image and crop region (0..1)
  • whRatio: Crop region aspect ratio - 1 equals to square, 1.7 equals to 16:9, ...
function
ImageManipConfig & setWarpTransformFourPoints(std::vector< Point2f > pt, bool normalizedCoords)
Specifies warp by supplying 4 points in either absolute or normalized coordinates
Parameters
  • pt: 4 points specifying warp
  • normalizedCoords: If true pt is interpreted as normalized, absolute otherwise
function
ImageManipConfig & setWarpTransformMatrix3x3(std::vector< float > mat)
Specifies warp with a 3x3 matrix
Parameters
  • mat: 3x3 matrix
function
ImageManipConfig & setWarpBorderReplicatePixels()
Specifies that warp replicates border pixels
function
ImageManipConfig & setWarpBorderFillColor(int red, int green, int blue)
Specifies fill color for border pixels. Example:
  • setWarpBorderFillColor(255,255,255) -> white
  • setWarpBorderFillColor(0,0,255) -> blue
Parameters
  • red: Red component
  • green: Green component
  • blue: Blue component
function
ImageManipConfig & setRotationDegrees(float deg)
Specifies clockwise rotation in degrees
Parameters
  • deg: Rotation in degrees
function
ImageManipConfig & setRotationRadians(float rad)
Specifies clockwise rotation in radians
Parameters
  • rad: Rotation in radians
function
ImageManipConfig & setResize(int w, int h)
Specifies output image size. After crop stage the image will be stretched to fit.
Parameters
  • w: Width in pixels
  • h: Height in pixels
function
ImageManipConfig & setResize(std::tuple< int, int > size)
Specifies output image size. After crop stage the image will be stretched to fit.
Parameters
  • size: Size in pixels
function
ImageManipConfig & setResizeThumbnail(int w, int h, int bgRed, int bgGreen, int bgBlue)
Specifies output image size. After crop stage the image will be resized by preserving aspect ration. Optionally background can be specified.
Parameters
  • w: Width in pixels
  • h: Height in pixels
  • bgRed: Red component
  • bgGreen: Green component
  • bgBlue: Blue component
function
ImageManipConfig & setResizeThumbnail(std::tuple< int, int > size, int bgRed, int bgGreen, int bgBlue)
Specifies output image size. After crop stage the image will be resized by preserving aspect ration. Optionally background can be specified.
Parameters
  • size: Size in pixels
  • bgRed: Red component
  • bgGreen: Green component
  • bgBlue: Blue component
function
ImageManipConfig & setFrameType(ImgFrame::Type name)
Specify output frame type.
Parameters
  • name: Frame type
function
ImageManipConfig & setColormap(Colormap colormap, int min, int max)
Specify gray to color conversion map
Parameters
  • colormap: map from Colormap enum or Colormap::NONE to disable
function
ImageManipConfig & setColormap(Colormap colormap, float maxf)
function
ImageManipConfig & setColormap(Colormap colormap, int max)
function
ImageManipConfig & setHorizontalFlip(bool flip)
Specify horizontal flip
Parameters
  • flip: True to enable flip, false otherwise
function
void setVerticalFlip(bool flip)
Specify vertical flip
Parameters
  • flip: True to enable vertical flip, false otherwise
function
ImageManipConfig & setReusePreviousImage(bool reuse)
Instruct ImageManip to not remove current image from its queue and use the same for next message.
Parameters
  • reuse: True to enable reuse, false otherwise
function
ImageManipConfig & setSkipCurrentImage(bool skip)
Instructs ImageManip to skip current image and wait for next in queue.
Parameters
  • skip: True to skip current image, false otherwise
function
ImageManipConfig & setKeepAspectRatio(bool keep)
Specifies to whether to keep aspect ratio or not
function
ImageManipConfig & setInterpolation(dai::Interpolation interpolation)
Specify which interpolation method to use
Parameters
  • interpolation: type of interpolation
function
float getCropXMin()
Returns
Top left X coordinate of crop region
function
float getCropYMin()
Returns
Top left Y coordinate of crop region
function
float getCropXMax()
Returns
Bottom right X coordinate of crop region
function
float getCropYMax()
Returns
Bottom right Y coordinate of crop region
function
int getResizeWidth()
Returns
Output image width
function
int getResizeHeight()
Returns
Output image height
function
CropConfig getCropConfig()
Returns
Crop configuration
function
ResizeConfig getResizeConfig()
Returns
Resize configuration
function
FormatConfig getFormatConfig()
Returns
Format configuration
function
bool isResizeThumbnail()
Returns
True if resize thumbnail mode is set, false otherwise
function
Colormap getColormap()
Returns
specified colormap
function
ImageManipConfig & set(dai::RawImageManipConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawImageManipConfig get()
Retrieve configuration data for ImageManip.
Returns
config for ImageManip
function
dai::Interpolation getInterpolation()
class

dai::ImgDetections

#include ImgDetections.hpp
variable
std::vector< ImgDetection > & detections
function
ImgDetections()
explicit function
ImgDetections(std::shared_ptr< RawImgDetections > ptr)
function
~ImgDetections()
function
ImgDetections & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
ImgDetections & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
ImgDetections & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::ImgFrame

#include ImgFrame.hpp
function
ImgFrame()
Construct ImgFrame message. Timestamp is set to now
explicit function
ImgFrame(std::shared_ptr< RawImgFrame > ptr)
function
~ImgFrame()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp(CameraExposureOffset offset)
Retrieves image timestamp (at the specified offset of exposure) related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice(CameraExposureOffset offset)
Retrieves image timestamp (at the specified offset of exposure) directly captured from device's monotonic clock, not synchronized to host time. Used when monotonicity is required.
function
unsigned int getInstanceNum()
Retrieves instance number
function
unsigned int getCategory()
Retrieves image category
function
unsigned int getWidth()
Retrieves image width in pixels
function
unsigned int getHeight()
Retrieves image height in pixels
function
Type getType()
Retrieves image type
function
std::chrono::microseconds getExposureTime()
Retrieves exposure time
function
int getSensitivity()
Retrieves sensitivity, as an ISO value
function
int getColorTemperature()
Retrieves white-balance color temperature of the light source, in kelvins
function
int getLensPosition()
Retrieves lens position, range 0..255. Returns -1 if not available
function
float getLensPositionRaw()
Retrieves lens position, range 0.0f..1.0f. Returns -1 if not available
function
ImgFrame & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Retrieves image timestamp related to dai::Clock::now()
function
ImgFrame & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
ImgFrame & setInstanceNum(unsigned int instance)
Instance number relates to the origin of the frame (which camera)
Parameters
  • instance: Instance number
function
ImgFrame & setCategory(unsigned int category)
Parameters
  • category: Image category
function
ImgFrame & setSequenceNum(int64_t seq)
Specifies sequence number
Parameters
  • seq: Sequence number
function
ImgFrame & setWidth(unsigned int width)
Specifies frame width
Parameters
  • width: frame width
function
ImgFrame & setHeight(unsigned int height)
Specifies frame height
Parameters
  • height: frame height
function
ImgFrame & setSize(unsigned int width, unsigned int height)
Specifies frame size
Parameters
  • height: frame height
  • width: frame width
function
ImgFrame & setSize(std::tuple< unsigned int, unsigned int > size)
Specifies frame size
Parameters
  • size: frame size
function
ImgFrame & setType(Type type)
Specifies frame type, RGB, BGR, ...
Parameters
  • type: Type of image
function
ImgFrame & setFrame(cv::Mat frame)
Parameters
This API only available if OpenCV support is enabled
ImgFrame buffer
Parameters
  • frame: Input cv::Mat frame from which to copy the data
function
cv::Mat getFrame(bool copy)
Parameters
This API only available if OpenCV support is enabled
Parameters
  • copy: If false only a reference to data is made, otherwise a copy
Returns
cv::Mat with corresponding to ImgFrame parameters
function
cv::Mat getCvFrame()
Parameters
This API only available if OpenCV support is enabled
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
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()
Retrieves timestamp related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
enum

RawImgFrame::Type Type

enum

class

dai::MessageGroup

#include MessageGroup.hpp
function
MessageGroup()
explicit function
MessageGroup(std::shared_ptr< RawMessageGroup > ptr)
function
~MessageGroup()
function
std::shared_ptr< ADatatype > operator[](const std::string & name)
inline function
std::shared_ptr< T > get(const std::string & name)
function
void add(const std::string & name, const std::shared_ptr< ADatatype > & value)
inline function
void add(const std::string & name, const T & value)
function
std::unordered_map< std::string, std::shared_ptr< ADatatype > >::iterator begin()
function
std::unordered_map< std::string, std::shared_ptr< ADatatype > >::iterator end()
function
bool isSynced(int64_t thresholdNs)
True if all messages in the group are in the interval
Parameters
  • thresholdNs: Maximal interval between messages
function
int64_t getIntervalNs()
Retrieves interval between the first and the last message in the group.
function
int64_t getNumMessages()
function
std::vector< std::string > getMessageNames()
Gets the names of messages in the group
function
MessageGroup & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
MessageGroup & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
MessageGroup & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::NNData

#include NNData.hpp
function
NNData()
Construct NNData message.
explicit function
NNData(std::shared_ptr< RawNNData > ptr)
function
~NNData()
function
NNData & setLayer(const std::string & name, std::vector< std::uint8_t > data)
Set a layer with datatype U8.
Parameters
  • name: Name of the layer
  • data: Data to store
function
NNData & setLayer(const std::string & name, const std::vector< int > & data)
Set a layer with datatype U8. Integers are cast to bytes.
Parameters
  • name: Name of the layer
  • data: Data to store
function
NNData & setLayer(const std::string & name, std::vector< float > data)
Set a layer with datatype FP16. Float values are converted to FP16.
Parameters
  • name: Name of the layer
  • data: Data to store
function
NNData & setLayer(const std::string & name, std::vector< double > data)
Set a layer with datatype FP16. Double values are converted to FP16.
Parameters
  • name: Name of the layer
  • data: Data to store
function
std::vector< std::string > getAllLayerNames()
Returns
Names of all layers added
function
std::vector< TensorInfo > getAllLayers()
Returns
All layers and their information
function
bool getLayer(const std::string & name, TensorInfo & tensor)
Retrieve layers tensor information
Parameters
  • name: Name of the layer
  • tensor: Outputs tensor information of that layer
Returns
True if layer exists, false otherwise
function
bool hasLayer(const std::string & name)
Checks if given layer exists
Parameters
  • name: Name of the layer
Returns
True if layer exists, false otherwise
function
bool getLayerDatatype(const std::string & name, TensorInfo::DataType & datatype)
Retrieve datatype of a layers tensor
Parameters
  • name: Name of the layer
  • datatype: Datatype of layers tensor
Returns
True if layer exists, false otherwise
function
std::vector< std::uint8_t > getLayerUInt8(const std::string & name)
Convenience function to retrieve U8 data from layer
Parameters
  • name: Name of the layer
Returns
U8 binary data
function
std::vector< float > getLayerFp16(const std::string & name)
Convenience function to retrieve float values from layers FP16 tensor
Parameters
  • name: Name of the layer
Returns
Float data
function
std::vector< std::int32_t > getLayerInt32(const std::string & name)
Convenience function to retrieve INT32 values from layers tensor
Parameters
  • name: Name of the layer
Returns
INT32 data
function
std::vector< std::uint8_t > getFirstLayerUInt8()
Convenience function to retrieve U8 data from first layer
Returns
U8 binary data
function
std::vector< float > getFirstLayerFp16()
Convenience function to retrieve float values from first layers FP16 tensor
Returns
Float data
function
std::vector< std::int32_t > getFirstLayerInt32()
Convenience function to retrieve INT32 values from first layers tensor
Returns
INT32 data
function
NNData & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
NNData & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
NNData & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::PointCloudConfig

#include PointCloudConfig.hpp
function
PointCloudConfig()
Construct PointCloudConfig message.
explicit function
PointCloudConfig(std::shared_ptr< RawPointCloudConfig > ptr)
function
~PointCloudConfig()
function
PointCloudConfig & set(dai::RawPointCloudConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawPointCloudConfig get()
Retrieve configuration data for SpatialLocationCalculator.
Returns
config for SpatialLocationCalculator
function
bool getSparse()
Retrieve sparse point cloud calculation status.
Returns
true if sparse point cloud calculation is enabled, false otherwise
function
std::array< std::array< float, 4 >, 4 > getTransformationMatrix()
Retrieve transformation matrix for point cloud calculation.
Returns
4x4 transformation matrix
function
PointCloudConfig & setSparse(bool enable)
Enable or disable sparse point cloud calculation.
Parameters
  • enable:
function
PointCloudConfig & setTransformationMatrix(const std::array< std::array< float, 4 >, 4 > & transformationMatrix)
Set 4x4 transformation matrix for point cloud calculation. Default is an identity matrix.
Parameters
  • transformationMatrix:
function
PointCloudConfig & setTransformationMatrix(const std::array< std::array< float, 3 >, 3 > & transformationMatrix)
Set 3x3 transformation matrix for point cloud calculation. Default is an identity matrix.
Parameters
  • transformationMatrix:
class

dai::PointCloudData

#include PointCloudData.hpp
function
PointCloudData()
Construct PointCloudData message.
explicit function
PointCloudData(std::shared_ptr< RawPointCloudData > ptr)
function
~PointCloudData()
function
std::vector< Point3f > & getPoints()
function
unsigned int getInstanceNum()
Retrieves instance number
function
unsigned int getWidth()
Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
function
unsigned int getHeight()
Retrieves the height in pixels - in case of a sparse point cloud, this represents the hight of the frame which was used to generate the point cloud
function
float getMinX()
Retrieves minimal x coordinate in depth units (millimeter by default)
function
float getMinY()
Retrieves minimal y coordinate in depth units (millimeter by default)
function
float getMinZ()
Retrieves minimal z coordinate in depth units (millimeter by default)
function
float getMaxX()
Retrieves maximal x coordinate in depth units (millimeter by default)
function
float getMaxY()
Retrieves maximal y coordinate in depth units (millimeter by default)
function
float getMaxZ()
Retrieves maximal z coordinate in depth units (millimeter by default)
function
bool isSparse()
Retrieves whether point cloud is sparse
function
PointCloudData & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Retrieves image timestamp related to dai::Clock::now()
function
PointCloudData & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
PointCloudData & setInstanceNum(unsigned int instance)
Instance number relates to the origin of the frame (which camera)
Parameters
  • instance: Instance number
function
PointCloudData & setSequenceNum(int64_t seq)
Specifies sequence number
Parameters
  • seq: Sequence number
function
PointCloudData & setWidth(unsigned int width)
Specifies frame width
Parameters
  • width: frame width
function
PointCloudData & setHeight(unsigned int height)
Specifies frame height
Parameters
  • height: frame height
function
PointCloudData & setSize(unsigned int width, unsigned int height)
Specifies frame size
Parameters
  • height: frame height
  • width: frame width
function
PointCloudData & setSize(std::tuple< unsigned int, unsigned int > size)
Specifies frame size
Parameters
  • size: frame size
function
PointCloudData & setMinX(float val)
Specifies minimal x coordinate in depth units (millimeter by default)
Parameters
  • val: minimal x coordinate in depth units (millimeter by default)
function
PointCloudData & setMinY(float val)
Specifies minimal y coordinate in depth units (millimeter by default)
Parameters
  • val: minimal y coordinate in depth units (millimeter by default)
function
PointCloudData & setMinZ(float val)
Specifies minimal z coordinate in depth units (millimeter by default)
Parameters
  • val: minimal z coordinate in depth units (millimeter by default)
function
PointCloudData & setMaxX(float val)
Specifies maximal x coordinate in depth units (millimeter by default)
Parameters
  • val: maximal x coordinate in depth units (millimeter by default)
function
PointCloudData & setMaxY(float val)
Specifies maximal y coordinate in depth units (millimeter by default)
Parameters
  • val: maximal y coordinate in depth units (millimeter by default)
function
PointCloudData & setMaxZ(float val)
Specifies maximal z coordinate in depth units (millimeter by default)
Parameters
  • val: maximal z coordinate in depth units (millimeter by default)
inline function
void getPclData()
function
int64_t getSequenceNum()
Retrieves sequence number
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()
Retrieves timestamp related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
struct

dai::PointCloudData::dependent_false

class

dai::SpatialImgDetections

#include SpatialImgDetections.hpp
variable
std::vector< SpatialImgDetection > & detections
Detection results.
function
SpatialImgDetections()
Construct SpatialImgDetections message.
explicit function
SpatialImgDetections(std::shared_ptr< RawSpatialImgDetections > ptr)
function
~SpatialImgDetections()
function
SpatialImgDetections & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
SpatialImgDetections & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
SpatialImgDetections & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::SpatialLocationCalculatorConfig

#include SpatialLocationCalculatorConfig.hpp
function
SpatialLocationCalculatorConfig()
explicit function
SpatialLocationCalculatorConfig(std::shared_ptr< RawSpatialLocationCalculatorConfig > ptr)
function
~SpatialLocationCalculatorConfig()
function
void setROIs(std::vector< SpatialLocationCalculatorConfigData > ROIs)
Set a vector of ROIs as configuration data.
Parameters
  • ROIs: Vector of configuration parameters for ROIs (region of interests)
function
void addROI(SpatialLocationCalculatorConfigData & ROI)
Add a new ROI to configuration data.
Parameters
  • roi: Configuration parameters for ROI (region of interest)
function
std::vector< SpatialLocationCalculatorConfigData > getConfigData()
Retrieve configuration data for SpatialLocationCalculator
Returns
Vector of configuration parameters for ROIs (region of interests)
function
SpatialLocationCalculatorConfig & set(dai::RawSpatialLocationCalculatorConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawSpatialLocationCalculatorConfig get()
Retrieve configuration data for SpatialLocationCalculator.
Returns
config for SpatialLocationCalculator
class

dai::SpatialLocationCalculatorData

#include SpatialLocationCalculatorData.hpp
variable
std::vector< SpatialLocations > & spatialLocations
function
SpatialLocationCalculatorData()
Construct SpatialLocationCalculatorData message.
explicit function
SpatialLocationCalculatorData(std::shared_ptr< RawSpatialLocations > ptr)
function
~SpatialLocationCalculatorData()
function
std::vector< SpatialLocations > & getSpatialLocations()
Retrieve configuration data for SpatialLocationCalculatorData.
Returns
Vector of spatial location data, carrying spatial information (X,Y,Z)
function
SpatialLocationCalculatorData & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
SpatialLocationCalculatorData & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
SpatialLocationCalculatorData & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::StereoDepthConfig

#include StereoDepthConfig.hpp
function
StereoDepthConfig()
Construct StereoDepthConfig message.
explicit function
StereoDepthConfig(std::shared_ptr< RawStereoDepthConfig > ptr)
function
~StereoDepthConfig()
function
StereoDepthConfig & setDepthAlign(AlgorithmControl::DepthAlign align)
Parameters
  • align: Set the disparity/depth alignment: centered (between the 'left' and 'right' inputs), or from the perspective of a rectified output stream
function
StereoDepthConfig & setConfidenceThreshold(int confThr)
Confidence threshold for disparity calculation
Parameters
  • confThr: Confidence threshold value 0..255
function
int getConfidenceThreshold()
Get confidence threshold for disparity calculation
function
StereoDepthConfig & setMedianFilter(MedianFilter median)
Parameters
  • median: Set kernel size for disparity/depth median filtering, or disable
function
MedianFilter getMedianFilter()
Get median filter setting
function
StereoDepthConfig & setBilateralFilterSigma(uint16_t sigma)
A larger value of the parameter means that farther colors within the pixel neighborhood will be mixed together, resulting in larger areas of semi-equal color.
Parameters
  • sigma: Set sigma value for 5x5 bilateral filter. 0..65535
function
uint16_t getBilateralFilterSigma()
Get sigma value for 5x5 bilateral filter
function
StereoDepthConfig & setLeftRightCheckThreshold(int threshold)
Parameters
  • threshold: Set threshold for left-right, right-left disparity map combine, 0..255
function
int getLeftRightCheckThreshold()
Get threshold for left-right check combine
function
StereoDepthConfig & setLeftRightCheck(bool enable)
Computes and combines disparities in both L-R and R-L directions, and combine them.For better occlusion handling, discarding invalid disparity values
function
StereoDepthConfig & setExtendedDisparity(bool enable)
Disparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
function
StereoDepthConfig & setSubpixel(bool enable)
Computes disparity with sub-pixel interpolation (3 fractional bits by default).Suitable for long range. Currently incompatible with extended disparity
function
StereoDepthConfig & setSubpixelFractionalBits(int subpixelFractionalBits)
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.
function
StereoDepthConfig & setDepthUnit(AlgorithmControl::DepthUnit depthUnit)
Set depth unit of depth map.Meter, centimeter, millimeter, inch, foot or custom unit is available.
function
StereoDepthConfig & setDisparityShift(int 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.
function
StereoDepthConfig & setNumInvalidateEdgePixels(int32_t 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.
function
AlgorithmControl::DepthUnit getDepthUnit()
Get depth unit of depth map.
function
float getMaxDisparity()
Useful for normalization of the disparity map.
Returns
Maximum disparity value that the node can return
function
StereoDepthConfig & set(dai::RawStereoDepthConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawStereoDepthConfig get()
Retrieve configuration data for StereoDepth.
Returns
config for stereo depth algorithm
enum

dai::MedianFilter MedianFilter

class

dai::StreamMessageParser

class

dai::SystemInformation

#include SystemInformation.hpp
variable
MemoryInfo & ddrMemoryUsage
variable
MemoryInfo & cmxMemoryUsage
variable
MemoryInfo & leonCssMemoryUsage
variable
MemoryInfo & leonMssMemoryUsage
variable
CpuUsage & leonCssCpuUsage
variable
CpuUsage & leonMssCpuUsage
variable
ChipTemperature & chipTemperature
function
SystemInformation()
Construct SystemInformation message.
explicit function
SystemInformation(std::shared_ptr< RawSystemInformation > ptr)
function
~SystemInformation()
class

dai::ToFConfig

#include ToFConfig.hpp
function
ToFConfig()
Construct ToFConfig message.
explicit function
ToFConfig(std::shared_ptr< RawToFConfig > ptr)
function
~ToFConfig()
function
ToFConfig & setMedianFilter(MedianFilter median)
Parameters
  • median: Set kernel size for median filtering, or disable
function
ToFConfig & set(dai::RawToFConfig config)
Set explicit configuration.
Parameters
  • config: Explicit configuration
function
dai::RawToFConfig get()
Retrieve configuration data for ToF.
Returns
config for feature tracking algorithm
class

dai::TrackedFeatures

#include TrackedFeatures.hpp
variable
std::vector< TrackedFeature > & trackedFeatures
function
TrackedFeatures()
Construct TrackedFeatures message.
explicit function
TrackedFeatures(std::shared_ptr< RawTrackedFeatures > ptr)
function
~TrackedFeatures()
function
TrackedFeatures & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
TrackedFeatures & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
TrackedFeatures & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::Tracklets

#include Tracklets.hpp
variable
std::vector< Tracklet > & tracklets
Retrieve data for Tracklets.
Returns
Vector of object tracker data, carrying tracking information.
function
Tracklets()
Construct Tracklets message.
explicit function
Tracklets(std::shared_ptr< RawTracklets > ptr)
function
~Tracklets()
function
Tracklets & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
Tracklets & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)
Sets image timestamp related to dai::Clock::now()
function
Tracklets & setSequenceNum(int64_t sequenceNum)
Retrieves image sequence number
class

dai::LockingQueue

function
LockingQueue()
inline explicit function
LockingQueue(unsigned maxSize, bool blocking)
inline function
void setMaxSize(unsigned sz)
inline function
void setBlocking(bool bl)
inline function
unsigned getMaxSize()
inline function
bool getBlocking()
inline function
void destruct()
function
~LockingQueue()
inline function
bool waitAndConsumeAll(std::function< void(T &)> callback, std::chrono::duration< Rep, Period > timeout)
inline function
bool waitAndConsumeAll(std::function< void(T &)> callback)
inline function
bool consumeAll(std::function< void(T &)> callback)
inline function
bool push(T const & data)
inline function
bool tryWaitAndPush(T const & data, std::chrono::duration< Rep, Period > timeout)
inline function
bool empty()
inline function
bool front(T & value)
inline function
bool tryPop(T & value)
inline function
bool waitAndPop(T & value)
inline function
bool tryWaitAndPop(T & value, std::chrono::duration< Rep, Period > timeout)
inline function
void waitEmpty()
class

dai::Path

#include Path.hpp
function
Path()
function
~Path()
function
Path(const Path &)
function
Path(Path &&)
function
Path & operator=(const Path &)
function
Path & operator=(Path &&)
inline function
Path(string_type && source)
inline function
Path(const string_type & source)
inline function
Path(const value_type * source)
inline function
std::string string()
inline function
std::string u8string()
inline function
operator string_type()
inline function
const string_type & native()
inline function
bool empty()
enum

char value_type

enum

std::basic_string< value_type > string_type

class

dai::Pimpl

function
Pimpl()
function
Pimpl(Args && ...)
function
~Pimpl()
function
T * operator->()
function
T & operator*()
struct

dai::ProfilingData

variable
long long numBytesWritten
variable
long long numBytesRead
class

dai::copyable_unique_ptr

#include copyable_unique_ptr.hpp
struct

dai::DeviceInfo

#include XLinkConnection.hpp
variable
std::string name
variable
std::string mxid
variable
XLinkDeviceState_t state
variable
XLinkProtocol_t protocol
variable
XLinkPlatform_t platform
variable
XLinkError_t status
function
DeviceInfo()
function
DeviceInfo(std::string name, std::string mxid, XLinkDeviceState_t state, XLinkProtocol_t protocol, XLinkPlatform_t platform, XLinkError_t status)
explicit function
DeviceInfo(std::string mxidOrName)
Creates a DeviceInfo by checking whether supplied parameter is a MXID or IP/USB name
Parameters
  • mxidOrName: Either MXID, IP Address or USB port name
explicit function
DeviceInfo(const deviceDesc_t & desc)
function
deviceDesc_t getXLinkDeviceDesc()
function
std::string getMxId()
function
std::string toString()
class

dai::XLinkConnection

#include XLinkConnection.hpp
function
XLinkConnection(const DeviceInfo & deviceDesc, std::vector< std::uint8_t > mvcmdBinary, XLinkDeviceState_t expectedState)
function
XLinkConnection(const DeviceInfo & deviceDesc, dai::Path pathToMvcmd, XLinkDeviceState_t expectedState)
explicit function
XLinkConnection(const DeviceInfo & deviceDesc, XLinkDeviceState_t expectedState)
function
~XLinkConnection()
function
void setRebootOnDestruction(bool reboot)
function
bool getRebootOnDestruction()
function
int getLinkId()
function
void close()
Explicitly closes xlink connection.
Parameters
This function does not need to be explicitly called as destructor closes the connection automatically
function
bool isClosed()
Is the connection already closed (or disconnected)
Parameters
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.
function
ProfilingData getProfilingData()
Get current accumulated profiling data
Returns
ProfilingData from the specific connection
class

dai::StreamPacketDesc

inline function
StreamPacketDesc()
function
StreamPacketDesc(const StreamPacketDesc &)
function
StreamPacketDesc(StreamPacketDesc && other)
function
StreamPacketDesc & operator=(const StreamPacketDesc &)
function
StreamPacketDesc & operator=(StreamPacketDesc && other)
function
~StreamPacketDesc()
class

dai::XLinkStream

function
XLinkStream(const std::shared_ptr< XLinkConnection > conn, const std::string & name, std::size_t maxWriteSize)
function
XLinkStream(const XLinkStream &)
function
XLinkStream(XLinkStream && stream)
function
XLinkStream & operator=(const XLinkStream &)
function
XLinkStream & operator=(XLinkStream && stream)
function
~XLinkStream()
function
void write(const void * data, std::size_t size)
function
void write(const std::uint8_t * data, std::size_t size)
function
void write(const std::vector< std::uint8_t > & data)
function
std::vector< std::uint8_t > read()
function
std::vector< std::uint8_t > read(XLinkTimespec & timestampReceived)
function
void read(std::vector< std::uint8_t > & data)
function
void read(std::vector< std::uint8_t > & data, XLinkTimespec & timestampReceived)
function
void writeSplit(const void * data, std::size_t size, std::size_t split)
function
void writeSplit(const std::vector< uint8_t > & data, std::size_t split)
function
StreamPacketDesc readMove()
function
bool write(const void * data, std::size_t size, std::chrono::milliseconds timeout)
function
bool write(const std::uint8_t * data, std::size_t size, std::chrono::milliseconds timeout)
function
bool write(const std::vector< std::uint8_t > & data, std::chrono::milliseconds timeout)
function
bool read(std::vector< std::uint8_t > & data, std::chrono::milliseconds timeout)
function
bool readMove(StreamPacketDesc & packet, const std::chrono::milliseconds timeout)
function
streamPacketDesc_t * readRaw()
function
bool readRaw(streamPacketDesc_t *& pPacket, std::chrono::milliseconds timeout)
function
void readRawRelease()
function
streamId_t getStreamId()
struct

dai::XLinkError

Derived by dai::XLinkReadError, dai::XLinkWriteError
variable
const XLinkError_t status
variable
const std::string streamName
inline function
XLinkError(XLinkError_t statusID, std::string stream, const std::string & message)
struct

dai::XLinkReadError

function
XLinkReadError(XLinkError_t status, const std::string & stream)
enum

XLinkError XLinkError

struct

dai::XLinkWriteError

function
XLinkWriteError(XLinkError_t status, const std::string & stream)
enum

XLinkError XLinkError

struct

dai::CameraSensorConfig

#include CameraFeatures.hpp
variable
std::int32_t width
variable
std::int32_t height
variable
float minFps
variable
float maxFps
variable
Rect fov
variable
CameraSensorType type
struct

dai::CameraFeatures

#include CameraFeatures.hpp
variable
CameraBoardSocket socket
Board socket where the camera was detected
variable
std::string sensorName
Camera sensor name, e.g: "IMX378", "OV9282"
variable
std::int32_t width
Maximum sensor resolution
variable
std::int32_t height
variable
CameraImageOrientation orientation
Default camera orientation, board dependent
variable
std::vector< CameraSensorType > supportedTypes
List of supported types of processing for the given camera.For some sensors it's not possible to determine if they are color or mono (e.g. OV9782 and OV9282), so this could return more than one entry
variable
bool hasAutofocusIC
Whether an autofocus VCM IC was detected
variable
bool hasAutofocus
Whether camera has auto focus capabilities, or is a fixed focus lens
variable
std::string name
Camera name or alias
variable
std::vector< std::string > additionalNames
Additional camera names or aliases
variable
std::vector< CameraSensorConfig > configs
Available sensor configs
variable
tl::optional< CameraSensorConfig > calibrationResolution
The resolution which should be used for calibration.
function
struct

dai::CameraInfo

#include CameraInfo.hpp
variable
uint16_t width
variable
uint16_t height
variable
uint8_t lensPosition
variable
std::vector< std::vector< float > > intrinsicMatrix
variable
std::vector< float > distortionCoeff
variable
Extrinsics extrinsics
variable
float specHfovDeg
variable
CameraModel cameraType
function
DEPTHAI_SERIALIZE(CameraInfo, cameraType, width, height, specHfovDeg, lensPosition, intrinsicMatrix, distortionCoeff, extrinsics)
struct

dai::ChipTemperature

#include ChipTemperature.hpp
variable
float css
CPU Subsystem
variable
float mss
Media Subsystem
variable
float upa
Shave Array
variable
float dss
DRAM Subsystem
variable
float average
Average of measurements
struct

dai::CpuUsage

#include CpuUsage.hpp
variable
float average
Average CPU usage, expressed with a normalized value (0-1)
variable
int32_t msTime
Time span in which the average was calculated in milliseconds
struct

dai::DetectionParserOptions

#include DetectionParserOptions.hpp
variable
DetectionNetworkType nnFamily
variable
float confidenceThreshold
variable
int classes
variable
int coordinates
variable
std::vector< float > anchors
variable
std::map< std::string, std::vector< int > > anchorMasks
variable
float iouThreshold
struct

dai::EepromData

#include EepromData.hpp
variable
uint32_t version
variable
std::string productName
variable
std::string boardCustom
variable
std::string boardName
variable
std::string boardRev
variable
std::string boardConf
variable
std::string hardwareConf
variable
std::string deviceName
variable
std::string batchName
variable
uint64_t batchTime
variable
uint32_t boardOptions
variable
std::unordered_map< CameraBoardSocket, CameraInfo > cameraData
variable
StereoRectification stereoRectificationData
variable
Extrinsics imuExtrinsics
variable
Extrinsics housingExtrinsics
variable
std::vector< uint8_t > miscellaneousData
variable
bool stereoUseSpecTranslation
variable
bool stereoEnableDistortionCorrection
variable
CameraBoardSocket verticalCameraSocket
struct

dai::Extrinsics

#include Extrinsics.hpp
variable
std::vector< std::vector< float > > rotationMatrix
variable
Point3f translation
(x, y, z) pose of destCameraSocket w.r.t currentCameraSocket obtained through calibration
variable
Point3f specTranslation
(x, y, z) pose of destCameraSocket w.r.t currentCameraSocket measured through CAD design
variable
CameraBoardSocket toCameraSocket
function
DEPTHAI_SERIALIZE(Extrinsics, rotationMatrix, translation, specTranslation, toCameraSocket)
struct

dai::MemoryInfo

#include MemoryInfo.hpp
variable
int64_t remaining
variable
int64_t used
variable
int64_t total
struct

dai::Point2f

#include Point2f.hpp
variable
float x
variable
float y
function
Point2f()
inline function
Point2f(float x, float y)
struct

dai::Point3f

#include Point3f.hpp
variable
float x
variable
float y
variable
float z
function
Point3f()
inline function
Point3f(float x, float y, float z)
struct

dai::Rect

#include Rect.hpp
variable
float x
variable
float y
variable
float width
variable
float height
function
Rect()
inline function
Rect(float x, float y, float width, float height)
inline function
Rect(const Rect & r)
inline function
Rect(const Point2f & org, const Size2f & sz)
inline function
Rect(const Point2f & pt1, const Point2f & pt2)
function
Rect & operator=(const Rect & r)
function
Rect & operator=(Rect && r)
inline function
Point2f topLeft()
The top-left corner.
inline function
Point2f bottomRight()
The bottom-right corner
inline function
Size2f size()
Size (width, height) of the rectangle
inline function
float area()
Area (width*height) of the rectangle
inline function
bool empty()
True if rectangle is empty.
inline function
bool contains(const Point2f & pt)
Checks whether the rectangle contains the point.
inline function
bool isNormalized()
Whether rectangle is normalized (coordinates in [0,1] range) or not.
inline function
Rect denormalize(int destWidth, int destHeight)
Denormalize rectangle.
Parameters
  • destWidth: Destination frame width.
  • destHeight: Destination frame height.
inline function
Rect normalize(int srcWidth, int srcHeight)
Normalize rectangle.
Parameters
  • srcWidth: Source frame width.
  • srcHeight: Source frame height.
struct

dai::RotatedRect

#include RotatedRect.hpp
variable
Point2f center
variable
Size2f size
variable
float angle
struct

dai::Size2f

#include Size2f.hpp
variable
float width
variable
float height
function
Size2f()
inline function
Size2f(float width, float height)
struct

dai::StereoPair

#include StereoPair.hpp
variable
CameraBoardSocket left
variable
CameraBoardSocket right
variable
float baseline
Baseline in centimeters.
variable
bool isVertical
function
DEPTHAI_SERIALIZE(StereoPair, left, right, baseline, isVertical)
struct

dai::StereoRectification

#include StereoRectification.hpp
variable
std::vector< std::vector< float > > rectifiedRotationLeft
variable
std::vector< std::vector< float > > rectifiedRotationRight
variable
CameraBoardSocket leftCameraSocket
variable
CameraBoardSocket rightCameraSocket
struct

dai::TensorInfo

#include TensorInfo.hpp
variable
StorageOrder order
variable
DataType dataType
variable
unsigned int numDimensions
variable
std::vector< unsigned > dims
variable
std::vector< unsigned > strides
variable
std::string name
variable
unsigned int offset
enum

int StorageOrder

enumerator
NHWC
enumerator
NHCW
enumerator
NCHW
enumerator
HWC
enumerator
CHW
enumerator
WHC
enumerator
HCW
enumerator
WCH
enumerator
CWH
enumerator
NC
enumerator
CN
enumerator
C
enumerator
H
enumerator
W
enum

int DataType

enumerator
FP16
enumerator
U8F
enumerator
INT
enumerator
FP32
enumerator
I8
struct

dai::Timestamp

#include Timestamp.hpp
variable
int64_t sec
variable
int64_t nsec
inline function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > get()
struct

dai::RawAprilTagConfig

#include RawAprilTagConfig.hpp
variable
Family family
AprilTag family.
variable
std::int32_t 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.
variable
float 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).
variable
bool 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.
variable
float 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.
variable
std::int32_t 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.
variable
QuadThresholds quadThresholds
AprilTag quad threshold parameters.
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
struct

dai::RawAprilTagConfig::QuadThresholds

#include RawAprilTagConfig.hpp
variable
std::int32_t minClusterPixels
Reject quads containing too few pixels.
variable
std::int32_t maxNmaxima
How many corner candidates to consider when segmenting a group of pixels into a quad.
variable
float 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).
variable
float 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.
variable
std::int32_t 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]).
variable
bool deglitch
Should the thresholded image be deglitched? Only useful for very noisy images
function
enum

std::int32_t Family

Supported AprilTag families.
enumerator
TAG_36H11
enumerator
TAG_36H10
enumerator
TAG_25H9
enumerator
TAG_16H5
enumerator
TAG_CIR21H7
enumerator
TAG_STAND41H12
struct

dai::AprilTag

#include RawAprilTags.hpp
variable
int id
The decoded ID of the tag
variable
int 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.
variable
float 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
variable
Point2f topLeft
The detected top left coordinates.
variable
Point2f topRight
The detected top right coordinates.
variable
Point2f bottomRight
The detected bottom right coordinates.
variable
Point2f bottomLeft
The detected bottom left coordinates.
struct

dai::RawAprilTags

#include RawAprilTags.hpp
variable
std::vector< AprilTag > aprilTags
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawAprilTags, aprilTags, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawBuffer

#include RawBuffer.hppDerived by dai::RawAprilTagConfig, dai::RawAprilTags, dai::RawCameraControl, dai::RawEdgeDetectorConfig, dai::RawEncodedFrame, dai::RawFeatureTrackerConfig, dai::RawIMUData, dai::RawImageAlignConfig, dai::RawImageManipConfig, dai::RawImgDetections, dai::RawImgFrame, dai::RawMessageGroup, dai::RawNNData, dai::RawPointCloudConfig, dai::RawPointCloudData, dai::RawSpatialImgDetections, dai::RawSpatialLocationCalculatorConfig, dai::RawSpatialLocations, dai::RawStereoDepthConfig, dai::RawSystemInformation, dai::RawToFConfig, dai::RawTrackedFeatures, dai::RawTracklets
variable
std::vector< std::uint8_t > data
variable
int64_t sequenceNum
variable
variable
Timestamp tsDevice
function
~RawBuffer()
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawBuffer, sequenceNum, ts, tsDevice)
struct

dai::RawCameraControl

#include RawCameraControl.hpp
variable
uint64_t cmdMask
variable
AutoFocusMode autoFocusMode
variable
uint8_t lensPosition
Lens/VCM position, range: 0..255. Used with
  • max 255: macro focus, at 8cm distance
  • infinite focus at about 120..130 (may vary from module to module)
  • lower values lead to out-of-focus (lens too close to the sensor array)
variable
float lensPositionRaw
variable
uint8_t lensPosAutoInfinity
variable
uint8_t lensPosAutoMacro
variable
variable
RegionParams aeRegion
variable
RegionParams afRegion
variable
variable
SceneMode sceneMode
variable
AntiBandingMode antiBandingMode
variable
CaptureIntent captureIntent
variable
ControlMode controlMode
variable
EffectMode effectMode
variable
FrameSyncMode frameSyncMode
variable
StrobeConfig strobeConfig
variable
StrobeTimings strobeTimings
variable
uint32_t aeMaxExposureTimeUs
variable
bool aeLockMode
variable
bool awbLockMode
variable
int8_t expCompensation
variable
int8_t brightness
variable
int8_t contrast
variable
int8_t saturation
variable
uint8_t sharpness
variable
uint8_t lumaDenoise
variable
uint8_t chromaDenoise
variable
uint16_t wbColorTemp
variable
uint8_t lowPowerNumFramesBurst
variable
uint8_t lowPowerNumFramesDiscard
inline function
void setCommand(Command cmd, bool value)
inline function
void clearCommand(Command cmd)
inline function
bool getCommand(Command cmd)
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawCameraControl, cmdMask, autoFocusMode, lensPosition, lensPositionRaw, lensPosAutoInfinity, lensPosAutoMacro, expManual, aeRegion, afRegion, awbMode, sceneMode, antiBandingMode, aeLockMode, awbLockMode, captureIntent, controlMode, effectMode, frameSyncMode, strobeConfig, strobeTimings, aeMaxExposureTimeUs, expCompensation, brightness, contrast, saturation, sharpness, lumaDenoise, chromaDenoise, wbColorTemp, lowPowerNumFramesBurst, lowPowerNumFramesDiscard)
struct

dai::RawCameraControl::ManualExposureParams

variable
uint32_t exposureTimeUs
variable
uint32_t sensitivityIso
variable
uint32_t frameDurationUs
function
DEPTHAI_SERIALIZE(ManualExposureParams, exposureTimeUs, sensitivityIso, frameDurationUs)
struct

dai::RawCameraControl::RegionParams

variable
uint16_t x
variable
uint16_t y
variable
uint16_t width
variable
uint16_t height
variable
uint32_t priority
function
DEPTHAI_SERIALIZE(RegionParams, x, y, width, height, priority)
struct

dai::RawCameraControl::StrobeConfig

variable
uint8_t enable
variable
uint8_t activeLevel
variable
int8_t gpioNumber
function
DEPTHAI_SERIALIZE(StrobeConfig, enable, activeLevel, gpioNumber)
struct

dai::RawCameraControl::StrobeTimings

variable
int32_t exposureBeginOffsetUs
variable
int32_t exposureEndOffsetUs
variable
uint32_t durationUs
function
enum

uint8_t Command

enumerator
START_STREAM
enumerator
STOP_STREAM
enumerator
STILL_CAPTURE
enumerator
MOVE_LENS
enumerator
AF_TRIGGER
enumerator
AE_MANUAL
enumerator
AE_AUTO
enumerator
AWB_MODE
enumerator
SCENE_MODE
enumerator
ANTIBANDING_MODE
enumerator
EXPOSURE_COMPENSATION
enumerator
AE_LOCK
enumerator
AE_TARGET_FPS_RANGE
enumerator
AWB_LOCK
enumerator
CAPTURE_INTENT
enumerator
CONTROL_MODE
enumerator
FRAME_DURATION
enumerator
SENSITIVITY
enumerator
EFFECT_MODE
enumerator
AF_MODE
enumerator
NOISE_REDUCTION_STRENGTH
enumerator
SATURATION
enumerator
BRIGHTNESS
enumerator
STREAM_FORMAT
enumerator
RESOLUTION
enumerator
SHARPNESS
enumerator
CUSTOM_USECASE
enumerator
CUSTOM_CAPT_MODE
enumerator
CUSTOM_EXP_BRACKETS
enumerator
CUSTOM_CAPTURE
enumerator
CONTRAST
enumerator
AE_REGION
enumerator
AF_REGION
enumerator
LUMA_DENOISE
enumerator
CHROMA_DENOISE
enumerator
WB_COLOR_TEMP
enumerator
EXTERNAL_TRIGGER
enumerator
AF_LENS_RANGE
enumerator
FRAME_SYNC
enumerator
STROBE_CONFIG
enumerator
STROBE_TIMINGS
enumerator
MOVE_LENS_RAW
enum

uint8_t AutoFocusMode

enumerator
OFF
Autofocus disabled. Suitable for manual focus
enumerator
AUTO
Basic automatic focus mode. In this mode, the lens does not move unless the autofocus trigger action is called.
enumerator
MACRO
Close-up focusing mode - this mode is optimized for focusing on objects very close to the camera.
enumerator
CONTINUOUS_VIDEO
In this mode, the AF algorithm modifies the lens position continually to attempt to provide a constantly-in-focus image stream. The focusing behavior should be suitable for good quality video recording; typically this means slower focus movement and no overshoots.
enumerator
CONTINUOUS_PICTURE
In this mode, the AF algorithm modifies the lens position continually to attempt to provide a constantly-in-focus image stream. The focusing behavior should be suitable for still image capture; typically this means focusing as fast as possible
enumerator
EDOF
Extended depth of field (digital focus) mode. The camera device will produce images with an extended depth of field automatically. AF triggers are ignored.
enum

uint8_t AutoWhiteBalanceMode

enumerator
OFF
The camera device's auto-white balance routine is disabled.
enumerator
AUTO
The camera device's auto-white balance routine is active.
enumerator
INCANDESCENT
The camera device's auto-white balance routine is disabled; the camera device uses incandescent light as the assumed scene illumination for white balance.
enumerator
FLUORESCENT
The camera device's auto-white balance routine is disabled; the camera device uses fluorescent light as the assumed scene illumination for white balance.
enumerator
WARM_FLUORESCENT
The camera device's auto-white balance routine is disabled; the camera device uses warm fluorescent light as the assumed scene illumination for white balance.
enumerator
DAYLIGHT
The camera device's auto-white balance routine is disabled; the camera device uses daylight light as the assumed scene illumination for white balance.
enumerator
CLOUDY_DAYLIGHT
The camera device's auto-white balance routine is disabled; the camera device uses cloudy daylight light as the assumed scene illumination for white balance.
enumerator
TWILIGHT
The camera device's auto-white balance routine is disabled; the camera device uses twilight light as the assumed scene illumination for white balance.
enumerator
SHADE
The camera device's auto-white balance routine is disabled; the camera device uses shade light as the assumed scene illumination for white balance.
enum

uint8_t SceneMode

enumerator
UNSUPPORTED
Indicates that no scene modes are set for a given capture request.
enumerator
FACE_PRIORITY
If face detection support exists, use face detection data for auto-focus, auto-white balance, and auto-exposure routines.
enumerator
ACTION
Optimized for photos of quickly moving objects. Similar to SPORTS scene mode.
enumerator
PORTRAIT
Optimized for still photos of people.
enumerator
LANDSCAPE
Optimized for photos of distant macroscopic objects.
enumerator
NIGHT
Optimized for low-light settings.
enumerator
NIGHT_PORTRAIT
Optimized for still photos of people in low-light settings.
enumerator
THEATRE
Optimized for dim, indoor settings where flash must remain off.
enumerator
BEACH
Optimized for bright, outdoor beach settings.
enumerator
SNOW
Optimized for bright, outdoor settings containing snow.
enumerator
SUNSET
Optimized for scenes of the setting sun.
enumerator
STEADYPHOTO
Optimized to avoid blurry photos due to small amounts of device motion (for example: due to hand shake).
enumerator
FIREWORKS
Optimized for nighttime photos of fireworks.
enumerator
SPORTS
Optimized for photos of quickly moving people.
enumerator
PARTY
Optimized for dim, indoor settings with multiple moving people.
enumerator
CANDLELIGHT
Optimized for dim settings where the main light source is a candle.
enumerator
BARCODE
Optimized for accurately capturing a photo of barcode for use by camera applications that wish to read the barcode value.
enum

uint8_t AntiBandingMode

enumerator
OFF
The camera device will not adjust exposure duration to avoid banding problems.
enumerator
MAINS_50_HZ
The camera device will adjust exposure duration to avoid banding problems with 50Hz illumination sources.
enumerator
MAINS_60_HZ
The camera device will adjust exposure duration to avoid banding problems with 60Hz illumination sources.
enumerator
AUTO
The camera device will automatically adapt its antibanding routine to the current illumination condition. This is the default mode if AUTO is available on given camera device.
enum

uint8_t CaptureIntent

enumerator
CUSTOM
The goal of this request doesn't fall into the other categories. The camera device will default to preview-like behavior.
enumerator
PREVIEW
This request is for a preview-like use case.
enumerator
STILL_CAPTURE
This request is for a still capture-type use case.
enumerator
VIDEO_RECORD
This request is for a video recording use case.
enumerator
VIDEO_SNAPSHOT
This request is for a video snapshot (still image while recording video) use case. The camera device should take the highest-quality image possible (given the other settings) without disrupting the frame rate of video recording.
enumerator
ZERO_SHUTTER_LAG
This request is for a ZSL usecase; the application will stream full-resolution images and reprocess one or several later for a final capture.
enum

uint8_t ControlMode

enumerator
OFF
Full application control of pipeline. All control by the device's metering and focusing (3A) routines is disabled.
enumerator
AUTO
Use settings for each individual 3A routine. Manual control of capture parameters is disabled.
enumerator
USE_SCENE_MODE
Use a specific scene mode. Enabling this disables Auto-Exposure, AWB and AF controls;
enum

uint8_t EffectMode

enumerator
OFF
No color effect will be applied.
enumerator
MONO
A "monocolor" effect where the image is mapped into a single color. This will typically be grayscale.
enumerator
NEGATIVE
A "photo-negative" effect where the image's colors are inverted.
enumerator
SOLARIZE
A "solarisation" effect (Sabattier effect) where the image is wholly or partially reversed in tone.
enumerator
SEPIA
A "sepia" effect where the image is mapped into warm gray, red, and brown tones.
enumerator
POSTERIZE
A "posterization" effect where the image uses discrete regions of tone rather than a continuous gradient of tones.
enumerator
WHITEBOARD
A "whiteboard" effect where the image is typically displayed as regions of white, with black or grey details.
enumerator
BLACKBOARD
A "blackboard" effect where the image is typically displayed as regions of black, with white or grey details.
enumerator
AQUA
An "aqua" effect where a blue hue is added to the image.
enum

uint8_t FrameSyncMode

enumerator
OFF
enumerator
OUTPUT
enumerator
INPUT
struct

dai::EdgeDetectorConfigData

#include RawEdgeDetectorConfig.hpp
variable
std::vector< std::vector< int > > 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
variable
std::vector< std::vector< int > > 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
struct

dai::RawEdgeDetectorConfig

#include RawEdgeDetectorConfig.hpp
variable
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawEdgeDetectorConfig, config)
struct

dai::RawEncodedFrame

variable
variable
uint32_t instanceNum
variable
uint32_t quality
variable
uint32_t bitrate
variable
Profile profile
variable
bool lossless
variable
FrameType type
variable
uint32_t frameOffset
variable
uint32_t frameSize
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawEncodedFrame, cam, instanceNum, quality, bitrate, profile, lossless, type, frameOffset, frameSize, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawEncodedFrame::CameraSettings

variable
int32_t exposureTimeUs
variable
int32_t sensitivityIso
variable
int32_t lensPosition
variable
int32_t wbColorTemp
variable
float lensPositionRaw
function
DEPTHAI_SERIALIZE(CameraSettings, exposureTimeUs, sensitivityIso, lensPosition, wbColorTemp, lensPositionRaw)
enum

std::uint8_t Profile

enumerator
JPEG
enumerator
AVC
enumerator
HEVC
enum

std::uint8_t FrameType

enumerator
I
enumerator
P
enumerator
B
enumerator
Unknown
struct

dai::RawFeatureTrackerConfig

#include RawFeatureTrackerConfig.hpp
variable
CornerDetector cornerDetector
Corner detector configuration. Used for feature detection.
variable
MotionEstimator motionEstimator
Motion estimator configuration. Used for feature reidentification between current and previous features.
variable
FeatureMaintainer featureMaintainer
FeatureMaintainer configuration. Used for feature maintaining.
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
struct

dai::RawFeatureTrackerConfig::CornerDetector

#include RawFeatureTrackerConfig.hpp
variable
Type type
Corner detector algorithm type.
variable
std::int32_t 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.
variable
std::int32_t numTargetFeatures
Target number of features to detect. Maximum number of features is determined at runtime based on algorithm type.
variable
std::int32_t 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.
variable
bool 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.
variable
bool enableSorting
Enable sorting detected features based on their score or not.
variable
Thresholds thresholds
Threshold settings. These are advanced settings, suitable for debugging/special cases.
function
struct

dai::RawFeatureTrackerConfig::CornerDetector::Thresholds

#include RawFeatureTrackerConfig.hpp
variable
float 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.
variable
float min
Minimum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto, 6000000 for HARRIS, 1200 for SHI_THOMASI. Empirical value.
variable
float max
Maximum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto. Empirical value.
variable
float decreaseFactor
When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.
variable
float increaseFactor
When detected number of features doesn't exceed the maximum in a cell, threshold is increased by multiplying its value with this factor.
function
enum

std::int32_t Type

enumerator
HARRIS
Harris corner detector.
enumerator
SHI_THOMASI
Shi-Thomasi corner detector.
struct

dai::RawFeatureTrackerConfig::FeatureMaintainer

#include RawFeatureTrackerConfig.hpp
variable
bool enable
Enable feature maintaining or not.
variable
float 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.
variable
float 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.
variable
float 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.
function
struct

dai::RawFeatureTrackerConfig::MotionEstimator

#include RawFeatureTrackerConfig.hpp
variable
bool enable
Enable motion estimation or not.
variable
Type type
Motion estimator algorithm type.
variable
OpticalFlow opticalFlow
Optical flow configuration. Takes effect only if MotionEstimator algorithm type set to LUCAS_KANADE_OPTICAL_FLOW.
function
DEPTHAI_SERIALIZE(MotionEstimator, enable, type, opticalFlow)
struct

dai::RawFeatureTrackerConfig::MotionEstimator::OpticalFlow

#include RawFeatureTrackerConfig.hpp
variable
std::int32_t 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.
variable
std::int32_t 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
variable
std::int32_t 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
variable
float 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.
variable
std::int32_t 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.
function
enum

std::int32_t Type

enumerator
LUCAS_KANADE_OPTICAL_FLOW
Using the pyramidal Lucas-Kanade optical flow method.
enumerator
HW_MOTION_ESTIMATION
Using a dense motion estimation hardware block (Block matcher).
struct

dai::IMUReport

Derived by dai::IMUReportAccelerometer, dai::IMUReportGyroscope, dai::IMUReportMagneticField, dai::IMUReportRotationVectorWAcc
variable
int32_t sequence
The sequence number increments once for each report sent. Gaps in the sequence numbers indicate missing or dropped reports. Max value 2^32 after which resets to 0.
variable
Accuracy accuracy
Accuracy of sensor
variable
Timestamp timestamp
Generation timestamp, synced to host time
variable
Timestamp tsDevice
Generation timestamp, direct device monotonic clock
inline function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()
Retrieves timestamp related to dai::Clock::now()
inline function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()
Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
inline function
int32_t getSequenceNum()
Retrieves IMU report sequence number
enum

std::uint8_t Accuracy

enumerator
UNRELIABLE
enumerator
LOW
enumerator
MEDIUM
enumerator
HIGH
struct

dai::IMUReportAccelerometer

#include RawIMUData.hpp
variable
float x
variable
float y
variable
float z
struct

dai::IMUReportGyroscope

#include RawIMUData.hpp
variable
float x
variable
float y
variable
float z
struct

dai::IMUReportMagneticField

#include RawIMUData.hpp
variable
float x
variable
float y
variable
float z
struct

dai::IMUReportRotationVectorWAcc

#include RawIMUData.hpp
variable
float i
variable
float j
variable
float k
variable
float real
variable
float rotationVectorAccuracy
struct

dai::IMUPacket

#include RawIMUData.hpp
variable
variable
variable
variable
struct

dai::RawIMUData

variable
std::vector< IMUPacket > packets
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawIMUData, packets, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawImageAlignConfig

#include RawImageAlignConfig.hpp
variable
uint16_t staticDepthPlane
Optional static depth plane to align to, in depth units, by default millimeters
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
function
struct

dai::RawImageManipConfig

#include RawImageManipConfig.hpp
variable
CropConfig cropConfig
variable
ResizeConfig resizeConfig
variable
FormatConfig formatConfig
variable
bool enableCrop
variable
bool enableResize
variable
bool enableFormat
variable
bool reusePreviousImage
variable
bool skipCurrentImage
variable
Interpolation interpolation
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawImageManipConfig, cropConfig, resizeConfig, formatConfig, enableCrop, enableResize, enableFormat, reusePreviousImage, skipCurrentImage, interpolation)
struct

dai::RawImageManipConfig::CropConfig

variable
CropRect cropRect
variable
RotatedRect cropRotatedRect
variable
bool enableCenterCropRectangle
variable
float cropRatio
variable
float widthHeightAspectRatio
variable
bool enableRotatedRect
variable
bool normalizedCoords
function
DEPTHAI_SERIALIZE(CropConfig, cropRect, cropRotatedRect, enableCenterCropRectangle, cropRatio, widthHeightAspectRatio, enableRotatedRect, normalizedCoords)
struct

dai::RawImageManipConfig::CropRect

variable
float xmin
variable
float ymin
variable
float xmax
variable
float ymax
function
DEPTHAI_SERIALIZE(CropRect, xmin, ymin, xmax, ymax)
struct

dai::RawImageManipConfig::FormatConfig

variable
RawImgFrame::Type type
variable
bool flipHorizontal
variable
bool flipVertical
variable
Colormap colormap
variable
int colormapMin
variable
int colormapMax
function
DEPTHAI_SERIALIZE(FormatConfig, type, flipHorizontal, flipVertical, colormap, colormapMin, colormapMax)
struct

dai::RawImageManipConfig::ResizeConfig

variable
int width
variable
int height
variable
bool lockAspectRatioFill
variable
char bgRed
variable
char bgGreen
variable
char bgBlue
variable
std::vector< Point2f > warpFourPoints
variable
bool normalizedCoords
variable
bool enableWarp4pt
variable
std::vector< float > warpMatrix3x3
variable
bool enableWarpMatrix
variable
bool warpBorderReplicate
variable
float rotationAngleDeg
variable
bool enableRotation
variable
bool keepAspectRatio
Whether to keep aspect ratio of input or not
function
DEPTHAI_SERIALIZE(ResizeConfig, width, height, lockAspectRatioFill, bgRed, bgGreen, bgBlue, warpFourPoints, normalizedCoords, enableWarp4pt, warpMatrix3x3, enableWarpMatrix, warpBorderReplicate, rotationAngleDeg, enableRotation, keepAspectRatio)
struct

dai::ImgDetection

#include RawImgDetections.hppDerived by dai::SpatialImgDetection
variable
uint32_t label
variable
float confidence
variable
float xmin
variable
float ymin
variable
float xmax
variable
float ymax
struct

dai::RawImgDetections

#include RawImgDetections.hpp
variable
std::vector< ImgDetection > detections
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawImgDetections, detections, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawImgFrame

#include RawImgFrame.hpp
variable
variable
variable
uint32_t category
variable
uint32_t instanceNum
variable
dai::FrameEvent event
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawImgFrame, fb, cam, category, instanceNum, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawImgFrame::CameraSettings

variable
int32_t exposureTimeUs
variable
int32_t sensitivityIso
variable
int32_t lensPosition
variable
int32_t wbColorTemp
variable
float lensPositionRaw
function
DEPTHAI_SERIALIZE(CameraSettings, exposureTimeUs, sensitivityIso, lensPosition, wbColorTemp, lensPositionRaw)
struct

dai::RawImgFrame::Specs

variable
Type type
variable
unsigned int width
variable
unsigned int height
variable
unsigned int stride
variable
unsigned int bytesPP
variable
unsigned int p1Offset
variable
unsigned int p2Offset
variable
unsigned int p3Offset
function
DEPTHAI_SERIALIZE(Specs, type, width, height, stride, bytesPP, p1Offset, p2Offset, p3Offset)
enum

Type

enumerator
YUV422i
enumerator
YUV444p
enumerator
YUV420p
enumerator
YUV422p
enumerator
YUV400p
enumerator
RGBA8888
enumerator
RGB161616
enumerator
RGB888p
enumerator
BGR888p
enumerator
RGB888i
enumerator
BGR888i
enumerator
LUT2
enumerator
LUT4
enumerator
LUT16
enumerator
RAW16
enumerator
RAW14
enumerator
RAW12
enumerator
RAW10
enumerator
RAW8
enumerator
PACK10
enumerator
PACK12
enumerator
YUV444i
enumerator
NV12
enumerator
NV21
enumerator
BITSTREAM
enumerator
HDR
enumerator
RGBF16F16F16p
enumerator
BGRF16F16F16p
enumerator
RGBF16F16F16i
enumerator
BGRF16F16F16i
enumerator
GRAY8
enumerator
GRAYF16
enumerator
NONE
struct

dai::RawGroupMessage

variable
std::shared_ptr< RawBuffer > buffer
variable
uint32_t index
function
DEPTHAI_SERIALIZE(RawGroupMessage, index)
struct

dai::RawMessageGroup

variable
std::unordered_map< std::string, RawGroupMessage > group
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawMessageGroup, group, RawBuffer::ts, RawBuffer::tsDevice, RawBuffer::sequenceNum)
struct

dai::RawNNData

#include RawNNData.hpp
variable
std::vector< TensorInfo > tensors
variable
unsigned int batchSize
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawNNData, tensors, batchSize, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawPointCloudConfig

#include RawPointCloudConfig.hpp
variable
bool sparse
variable
std::array< std::array< float, 4 >, 4 > transformationMatrix
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawPointCloudConfig, sparse, transformationMatrix)
struct

dai::RawPointCloudData

variable
unsigned int width
variable
unsigned int height
variable
uint32_t instanceNum
variable
float minx
variable
float miny
variable
float minz
variable
float maxx
variable
float maxy
variable
float maxz
variable
bool sparse
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawPointCloudData, width, height, minx, miny, minz, maxx, maxy, maxz, sparse, instanceNum, RawBuffer::ts, RawBuffer::tsDevice, RawBuffer::sequenceNum)
struct

dai::SpatialImgDetection

#include RawSpatialImgDetections.hpp
variable
Point3f spatialCoordinates
variable
struct

dai::RawSpatialImgDetections

#include RawSpatialImgDetections.hpp
variable
std::vector< SpatialImgDetection > detections
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawSpatialImgDetections, detections, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::SpatialLocationCalculatorConfigThresholds

#include RawSpatialLocationCalculatorConfig.hpp
variable
uint32_t lowerThreshold
Values less or equal than this threshold are not taken into calculation.
variable
uint32_t upperThreshold
Values greater or equal than this threshold are not taken into calculation.
struct

dai::SpatialLocationCalculatorConfigData

#include RawSpatialLocationCalculatorConfig.hpp
variable
Rect roi
Region of interest for spatial location calculation.
variable
SpatialLocationCalculatorConfigThresholds depthThresholds
Upper and lower thresholds for depth values to take into consideration.
variable
SpatialLocationCalculatorAlgorithm 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.
variable
std::int32_t stepSize
Step size for calculation. Step size 1 means that every pixel is taken into calculation, size 2 means every second etc. Default value AUTO: for AVERAGE, MIN, MAX step size is 1; for MODE/MEDIAN it's 2.
struct

dai::RawSpatialLocationCalculatorConfig

#include RawSpatialLocationCalculatorConfig.hpp
variable
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawSpatialLocationCalculatorConfig, config)
struct

dai::SpatialLocations

#include RawSpatialLocations.hpp
variable
SpatialLocationCalculatorConfigData config
Configuration for selected ROI
variable
float 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.
variable
float depthMode
Most frequent of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to MODE.
variable
float depthMedian
Median of depth values inside the ROI between the specified thresholds in config. Calculated only if calculation method is set to MEDIAN.
variable
std::uint16_t 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.
variable
std::uint16_t 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.
variable
std::uint32_t depthAveragePixelCount
Number of depth values used in calculations.
variable
Point3f spatialCoordinates
Spatial coordinates - x,y,z; x,y are the relative positions of the center of ROI to the center of depth map
struct

dai::RawSpatialLocations

#include RawSpatialLocations.hpp
variable
std::vector< SpatialLocations > spatialLocations
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawSpatialLocations, spatialLocations, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::RawStereoDepthConfig

#include RawStereoDepthConfig.hpp
variable
AlgorithmControl algorithmControl
Controls the flow of stereo algorithm - left-right check, subpixel etc.
variable
PostProcessing postProcessing
Controls the postprocessing of disparity and/or depth map.
variable
CensusTransform censusTransform
Census transform settings.
variable
CostMatching costMatching
Cost matching settings.
variable
CostAggregation costAggregation
Cost aggregation settings.
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
struct

dai::RawStereoDepthConfig::AlgorithmControl

variable
DepthAlign depthAlign
Set the disparity/depth alignment to the perspective of a rectified output, or center it
variable
DepthUnit depthUnit
Measurement unit for depth data. Depth data is integer value, multiple of depth unit.
variable
float 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.
variable
bool enableLeftRightCheck
Computes and combines disparities in both L-R and R-L directions, and combine them. For better occlusion handling
variable
bool enableExtended
Disparity range increased from 95 to 190, combined from full resolution and downscaled images. Suitable for short range objects
variable
bool enableSubpixel
Computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
variable
std::int32_t 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
variable
std::int32_t subpixelFractionalBits
Number of fractional bits for subpixel modeValid values: 3,4,5Defines the number of fractional disparities: 2^xMedian filter postprocessing is supported only for 3 fractional bits
variable
std::int32_t 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.
variable
tl::optional< float > centerAlignmentShiftFactor
Used only for debug purposes. centerAlignmentShiftFactor is set automatically in firmware, from camera extrinsics when depth alignment to camera is enabled. Center alignment is achieved by shifting the obtained disparity map by a scale factor. It's used to align to a different camera that is on the same horizontal baseline as the two stereo cameras. E.g. if we have a device with 10 cm stereo baseline, and we have another camera inbetween, 9cm from the LEFT camera and 1 cm from the RIGHT camera we can align the obtained disparity map using a scale factor of 0.9. Note that aligning disparity map to a different camera involves 2 steps:
variable
std::int32_t 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.
function
enum

int32_t DepthAlign

Align the disparity/depth to the perspective of a rectified output, or center it
enumerator
RECTIFIED_RIGHT
enumerator
RECTIFIED_LEFT
enumerator
CENTER
enum

int32_t DepthUnit

Measurement unit for depth data
enumerator
METER
enumerator
CENTIMETER
enumerator
MILLIMETER
enumerator
INCH
enumerator
FOOT
enumerator
CUSTOM
struct

dai::RawStereoDepthConfig::CensusTransform

#include RawStereoDepthConfig.hpp
variable
KernelSize kernelSize
Census transform kernel size.
variable
uint64_t 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.
variable
bool enableMeanMode
If enabled, each pixel in the window is compared with the mean window value instead of the central pixel.
variable
uint32_t threshold
Census transform comparison threshold value.
function
enum

std::int32_t KernelSize

Census transform kernel size possible values.
enumerator
AUTO
enumerator
KERNEL_5x5
enumerator
KERNEL_7x7
enumerator
KERNEL_7x9
struct

dai::RawStereoDepthConfig::CostAggregation

#include RawStereoDepthConfig.hpp
variable
uint8_t divisionFactor
Cost calculation linear equation parameters.
variable
uint16_t horizontalPenaltyCostP1
Horizontal P1 penalty cost parameter.
variable
uint16_t horizontalPenaltyCostP2
Horizontal P2 penalty cost parameter.
variable
uint16_t verticalPenaltyCostP1
Vertical P1 penalty cost parameter.
variable
uint16_t verticalPenaltyCostP2
Vertical P2 penalty cost parameter.
function
struct

dai::RawStereoDepthConfig::CostMatching

#include RawStereoDepthConfig.hpp
variable
DisparityWidth disparityWidth
Disparity search range, default 96 pixels.
variable
bool 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.
variable
uint8_t invalidDisparityValue
Used only for debug purposes, SW postprocessing handled only invalid value of 0 properly.
variable
uint8_t confidenceThreshold
Disparities with confidence value under this threshold are accepted. Higher confidence threshold means disparities with less confidence are accepted too.
variable
LinearEquationParameters linearEquationParameters
Cost calculation linear equation parameters.
function
struct

dai::RawStereoDepthConfig::CostMatching::LinearEquationParameters

#include RawStereoDepthConfig.hpp
variable
uint8_t alpha
variable
uint8_t beta
variable
uint8_t threshold
function
DEPTHAI_SERIALIZE(LinearEquationParameters, alpha, beta, threshold)
enum

std::uint32_t DisparityWidth

Disparity search range: 64 or 96 pixels are supported by the HW.
enumerator
DISPARITY_64
enumerator
DISPARITY_96
struct

dai::RawStereoDepthConfig::PostProcessing

#include RawStereoDepthConfig.hpp
variable
MedianFilter median
Set kernel size for disparity/depth median filtering, or disable
variable
std::int16_t 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.
variable
SpatialFilter spatialFilter
Edge-preserving filtering: This type of filter will smooth the depth noise while attempting to preserve edges.
variable
TemporalFilter temporalFilter
Temporal filtering with optional persistence.
variable
ThresholdFilter thresholdFilter
Threshold filtering. Filters out distances outside of a given interval.
variable
BrightnessFilter 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.
variable
SpeckleFilter speckleFilter
Speckle filtering. Removes speckle noise.
variable
DecimationFilter decimationFilter
Decimation filter. Reduces disparity/depth map x/y complexity, reducing runtime complexity for other filters.
function
struct

dai::RawStereoDepthConfig::PostProcessing::BrightnessFilter

#include RawStereoDepthConfig.hpp
variable
std::int32_t minBrightness
Minimum pixel brightness. If input pixel is less or equal than this value the depth value is invalidated.
variable
std::int32_t maxBrightness
Maximum range in depth units. If input pixel is less or equal than this value the depth value is invalidated.
function
struct

dai::RawStereoDepthConfig::PostProcessing::DecimationFilter

#include RawStereoDepthConfig.hpp
variable
std::uint32_t decimationFactor
Decimation factor. Valid values are 1,2,3,4. Disparity/depth map x/y resolution will be decimated with this value.
variable
DecimationMode decimationMode
Decimation algorithm type.
function
enum

int32_t DecimationMode

Decimation algorithm type.
enumerator
PIXEL_SKIPPING
enumerator
NON_ZERO_MEDIAN
enumerator
NON_ZERO_MEAN
struct

dai::RawStereoDepthConfig::PostProcessing::SpatialFilter

#include RawStereoDepthConfig.hpp
variable
bool enable
Whether to enable or disable the filter.
variable
std::uint8_t 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.
variable
float alpha
The Alpha factor in an exponential moving average with Alpha=1 - no filter. Alpha = 0 - infinite filter. Determines the amount of smoothing.
variable
std::int32_t 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.
variable
std::int32_t numIterations
Number of iterations over the image in both horizontal and vertical direction.
function
struct

dai::RawStereoDepthConfig::PostProcessing::SpeckleFilter

#include RawStereoDepthConfig.hpp
variable
bool enable
Whether to enable or disable the filter.
variable
std::uint32_t speckleRange
Speckle search range.
function
DEPTHAI_SERIALIZE(SpeckleFilter, enable, speckleRange)
struct

dai::RawStereoDepthConfig::PostProcessing::TemporalFilter

#include RawStereoDepthConfig.hpp
variable
bool enable
Whether to enable or disable the filter.
variable
PersistencyMode persistencyMode
Persistency mode. If the current disparity/depth value is invalid, it will be replaced by an older value, based on persistency mode.
variable
float 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.
variable
std::int32_t 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.
function
enum

int32_t PersistencyMode

Persistency algorithm type.
enumerator
PERSISTENCY_OFF
enumerator
VALID_8_OUT_OF_8
enumerator
VALID_2_IN_LAST_3
enumerator
VALID_2_IN_LAST_4
enumerator
VALID_2_OUT_OF_8
enumerator
VALID_1_IN_LAST_2
enumerator
VALID_1_IN_LAST_5
enumerator
VALID_1_IN_LAST_8
enumerator
PERSISTENCY_INDEFINITELY
struct

dai::RawStereoDepthConfig::PostProcessing::ThresholdFilter

#include RawStereoDepthConfig.hpp
variable
std::int32_t minRange
Minimum range in depth units. Depth values under this value are invalidated.
variable
std::int32_t maxRange
Maximum range in depth units. Depth values over this value are invalidated.
function
DEPTHAI_SERIALIZE(ThresholdFilter, minRange, maxRange)
enum

dai::MedianFilter MedianFilter

struct

dai::RawSystemInformation

#include RawSystemInformation.hpp
variable
MemoryInfo ddrMemoryUsage
variable
MemoryInfo cmxMemoryUsage
variable
MemoryInfo leonCssMemoryUsage
variable
MemoryInfo leonMssMemoryUsage
variable
CpuUsage leonCssCpuUsage
variable
CpuUsage leonMssCpuUsage
variable
ChipTemperature chipTemperature
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
struct

dai::RawToFConfig

#include RawToFConfig.hpp
variable
MedianFilter median
Set kernel size for depth median filtering, or disable
variable
int phaseUnwrappingLevel
variable
uint16_t phaseUnwrapErrorThreshold
variable
bool enablePhaseShuffleTemporalFilter
variable
bool enableBurstMode
variable
bool enableDistortionCorrection
variable
tl::optional< bool > enableFPPNCorrection
variable
tl::optional< bool > enableOpticalCorrection
variable
tl::optional< bool > enableTemperatureCorrection
variable
tl::optional< bool > enableWiggleCorrection
variable
tl::optional< bool > enablePhaseUnwrapping
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawToFConfig, median, enablePhaseShuffleTemporalFilter, enableBurstMode, enableDistortionCorrection, enableFPPNCorrection, enableOpticalCorrection, enableTemperatureCorrection, enableWiggleCorrection, enablePhaseUnwrapping, phaseUnwrappingLevel, phaseUnwrapErrorThreshold)
struct

dai::TrackedFeature

#include RawTrackedFeatures.hpp
variable
Point2f position
x, y position of the detected feature
variable
uint32_t id
Feature ID. Persistent between frames if motion estimation is enabled.
variable
uint32_t age
Feature age in frames
variable
float harrisScore
Feature harris score
variable
float trackingError
Feature tracking error
struct

dai::RawTrackedFeatures

#include RawTrackedFeatures.hpp
variable
std::vector< TrackedFeature > trackedFeatures
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawTrackedFeatures, trackedFeatures, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::Tracklet

#include RawTracklets.hpp
variable
Rect roi
Tracked region of interest.
variable
std::int32_t id
Tracklet's ID.
variable
std::int32_t label
Tracklet's label ID.
variable
std::int32_t age
Number of frames it is being tracked for.
variable
TrackingStatus status
Status of tracklet.
variable
ImgDetection srcImgDetection
Image detection that is tracked.
variable
Point3f spatialCoordinates
Spatial coordinates of tracklet.
function
enum

std::int32_t TrackingStatus

enumerator
NEW
The object is newly added.
enumerator
TRACKED
The object is being tracked.
enumerator
LOST
The object gets lost now. The object can be tracked again automatically(long term tracking) or by specifying detected object manually(short term and zero term tracking).
enumerator
REMOVED
The object is removed.
struct

dai::RawTracklets

#include RawTracklets.hpp
variable
std::vector< Tracklet > tracklets
inline function
void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)
inline function
DatatypeEnum getType()
function
DEPTHAI_SERIALIZE(RawTracklets, tracklets, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice)
struct

dai::BoardConfig

variable
USB usb
variable
Network network
variable
std::vector< std::string > 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)
variable
tl::optional< uint32_t > watchdogTimeoutMs
variable
tl::optional< uint32_t > watchdogInitialDelayMs
variable
std::unordered_map< std::int8_t, GPIO > gpio
variable
std::unordered_map< std::int8_t, UART > uart
variable
tl::optional< bool > pcieInternalClock
variable
tl::optional< bool > usb3PhyInternalClock
variable
tl::optional< bool > mipi4LaneRgb
variable
tl::optional< bool > emmc
variable
tl::optional< std::string > logPath
variable
tl::optional< size_t > logSizeMax
variable
tl::optional< LogLevel > logVerbosity
variable
tl::optional< bool > logDevicePrints
variable
bool nonExclusiveMode
variable
std::unordered_map< CameraBoardSocket, Camera > camera
variable
tl::optional< IMU > imu
variable
tl::optional< UVC > uvc
struct

dai::BoardConfig::Camera

#include BoardConfig.hpp
variable
std::string name
variable
tl::optional< CameraSensorType > sensorType
variable
tl::optional< CameraImageOrientation > orientation
struct

dai::BoardConfig::GPIO

#include BoardConfig.hpp
variable
Mode mode
variable
Direction direction
variable
Level level
variable
Pull pull
variable
Drive drive
variable
bool schmitt
variable
bool slewFast
function
GPIO()
inline function
GPIO(Direction direction)
inline function
GPIO(Direction direction, Level level)
inline function
GPIO(Direction direction, Level level, Pull pull)
inline function
GPIO(Direction direction, Mode mode)
inline function
GPIO(Direction direction, Mode mode, Pull pull)
enum

std::int8_t Mode

enumerator
ALT_MODE_0
enumerator
ALT_MODE_1
enumerator
ALT_MODE_2
enumerator
ALT_MODE_3
enumerator
ALT_MODE_4
enumerator
ALT_MODE_5
enumerator
ALT_MODE_6
enumerator
DIRECT
enum

std::int8_t Direction

enumerator
INPUT
enumerator
OUTPUT
enum

std::int8_t Level

enumerator
LOW
enumerator
HIGH
enum

std::int8_t Pull

enumerator
NO_PULL
enumerator
PULL_UP
enumerator
PULL_DOWN
enumerator
BUS_KEEPER
enum

std::int8_t Drive

enumerator
MA_2
enumerator
MA_4
enumerator
MA_8
enumerator
MA_12
struct

dai::BoardConfig::IMU

variable
int8_t bus
variable
int8_t interrupt
variable
int8_t wake
variable
int8_t csGpio
variable
int8_t boot
variable
int8_t reset
inline function
IMU()
struct

dai::BoardConfig::Network

#include BoardConfig.hpp
variable
uint16_t mtu
Network MTU, 0 is auto (usually 1500 for Ethernet) or forwarded from bootloader (not yet implemented there). Note: not advised to increase past 1500 for now
variable
bool xlinkTcpNoDelay
Sets the
struct

dai::BoardConfig::UART

#include BoardConfig.hpp
variable
std::int8_t tmp
struct

dai::BoardConfig::USB

#include BoardConfig.hpp
variable
uint16_t vid
variable
uint16_t pid
variable
uint16_t flashBootedVid
variable
uint16_t flashBootedPid
variable
UsbSpeed maxSpeed
variable
std::string productName
variable
std::string manufacturer
struct

dai::BoardConfig::UVC

#include BoardConfig.hpp
variable
std::string cameraName
variable
uint16_t width
variable
uint16_t height
variable
RawImgFrame::Type frameType
variable
bool enable
inline function
UVC(uint16_t width, uint16_t height)
inline function
UVC()
struct

dai::CrashDump

variable
std::vector< CrashReport > crashReports
variable
std::string depthaiCommitHash
variable
std::string deviceId
inline function
nlohmann::json serializeToJson()
struct

dai::CrashDump::CrashReport

variable
ProcessorType processor
variable
std::string errorSource
variable
uint32_t crashedThreadId
variable
ErrorSourceInfo errorSourceInfo
variable
std::vector< ThreadCallstack > threadCallstack
function
DEPTHAI_SERIALIZE(CrashReport, processor, errorSource, crashedThreadId, errorSourceInfo, threadCallstack)
struct

dai::CrashDump::CrashReport::ErrorSourceInfo

variable
AssertContext assertContext
variable
TrapContext trapContext
variable
uint32_t errorId
function
DEPTHAI_SERIALIZE(ErrorSourceInfo, assertContext, trapContext, errorId)
struct

dai::CrashDump::CrashReport::ErrorSourceInfo::AssertContext

variable
std::string fileName
variable
std::string functionName
variable
uint32_t line
function
DEPTHAI_SERIALIZE(AssertContext, fileName, functionName, line)
struct

dai::CrashDump::CrashReport::ErrorSourceInfo::TrapContext

variable
uint32_t trapNumber
variable
uint32_t trapAddress
variable
std::string trapName
function
DEPTHAI_SERIALIZE(TrapContext, trapNumber, trapAddress, trapName)
struct

dai::CrashDump::CrashReport::ThreadCallstack

variable
uint32_t threadId
variable
std::string threadName
variable
std::string threadStatus
variable
uint32_t stackBottom
variable
uint32_t stackTop
variable
uint32_t stackPointer
variable
uint32_t instructionPointer
variable
std::vector< CallstackContext > callStack
function
DEPTHAI_SERIALIZE(ThreadCallstack, threadId, threadName, threadStatus, stackBottom, stackTop, stackPointer, instructionPointer, callStack)
struct

dai::CrashDump::CrashReport::ThreadCallstack::CallstackContext

variable
uint32_t callSite
variable
uint32_t calledTarget
variable
uint32_t framePointer
variable
std::string context
function
DEPTHAI_SERIALIZE(CallstackContext, callSite, calledTarget, framePointer, context)
struct

dai::LogMessage

variable
std::string nodeIdName
variable
LogLevel level
variable
variable
size_t colorRangeStart
variable
size_t colorRangeEnd
variable
std::string payload
struct

dai::AssetView

variable
std::uint8_t * data
variable
std::uint32_t size
variable
std::uint32_t alignment
inline function
AssetView(std::uint8_t * d, std::uint32_t s, std::uint32_t a)
class

dai::Assets

Derived by dai::AssetsMutable
inline function
void setStorage(std::uint8_t * ps)
inline function
bool has(const std::string & key)
inline function
AssetView get(const std::string & key)
inline function
std::vector< std::pair< std::string, AssetView > > getAll()
function
DEPTHAI_SERIALIZE(Assets, map)
struct

dai::NodeConnectionSchema

#include NodeConnectionSchema.hpp
variable
int64_t node1Id
variable
std::string node1OutputGroup
variable
std::string node1Output
variable
int64_t node2Id
variable
std::string node2InputGroup
variable
std::string node2Input
inline function
bool operator==(const NodeConnectionSchema & rhs)
struct

dai::NodeIoInfo

#include NodeIoInfo.hpp
variable
std::string group
variable
std::string name
variable
Type type
variable
bool blocking
variable
int queueSize
variable
bool waitForMessage
variable
uint32_t id
enum

Type

enumerator
MSender
enumerator
SSender
enumerator
MReceiver
enumerator
SReceiver
struct

dai::NodeObjInfo

#include NodeObjInfo.hpp
variable
int64_t id
variable
std::string name
variable
std::vector< std::uint8_t > properties
variable
std::unordered_map< std::tuple< std::string, std::string >, NodeIoInfo, IoInfoKey > ioInfo
struct

dai::NodeObjInfo::IoInfoKey

inline function
std::size_t operator()(const std::tuple< std::string, std::string > & k)
struct

dai::PipelineSchema

#include PipelineSchema.hpp
variable
std::vector< NodeConnectionSchema > connections
variable
GlobalProperties globalProperties
variable
std::unordered_map< int64_t, NodeObjInfo > nodes
struct

dai::TraceEvent

variable
Event event
variable
Status status
variable
uint32_t srcId
variable
uint32_t dstId
variable
Timestamp timestamp
enum

std::uint8_t Event

enumerator
SEND
enumerator
RECEIVE
enum

std::uint8_t Status

enumerator
START
enumerator
END
enumerator
TIMEOUT
struct

dai::AprilTagProperties

#include AprilTagProperties.hpp
variable
RawAprilTagConfig initialConfig
variable
bool inputConfigSync
struct

dai::CameraProperties

#include CameraProperties.hpp
variable
RawCameraControl initialControl
Initial controls applied to ColorCamera node
variable
CameraBoardSocket boardSocket
Which socket will color camera use
variable
std::string cameraName
Which camera name will color camera use
variable
CameraImageOrientation imageOrientation
Camera sensor image orientation / pixel readout
variable
ColorOrder colorOrder
For 24 bit color these can be either RGB or BGR
variable
bool interleaved
Are colors interleaved (R1G1B1, R2G2B2, ...) or planar (R1R2..., G1G2..., B1B2)
variable
bool fp16
Are values FP16 type (0.0 - 255.0)
variable
uint32_t previewHeight
Preview frame output height
variable
uint32_t previewWidth
Preview frame output width
variable
int32_t videoWidth
Preview frame output width
variable
int32_t videoHeight
Preview frame output height
variable
int32_t stillWidth
Preview frame output width
variable
int32_t stillHeight
Preview frame output height
variable
int32_t resolutionWidth
Select the camera sensor width
variable
int32_t resolutionHeight
Select the camera sensor height
variable
float fps
Camera sensor FPS
variable
int isp3aFps
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.
variable
float sensorCropX
Initial sensor crop, -1 signifies center crop
variable
float sensorCropY
variable
bool previewKeepAspectRatio
Whether to keep aspect ratio of input (video/preview size) or not
variable
IspScale ispScale
Configure scaling for
variable
CameraSensorType sensorType
variable
int numFramesPoolRaw
Pool sizes
variable
int numFramesPoolIsp
variable
int numFramesPoolVideo
variable
int numFramesPoolPreview
variable
int numFramesPoolStill
variable
WarpMeshSource warpMeshSource
variable
std::string warpMeshUri
variable
int warpMeshWidth
variable
int warpMeshHeight
variable
tl::optional< float > calibAlpha
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.
variable
int warpMeshStepWidth
variable
int warpMeshStepHeight
variable
tl::optional< bool > rawPacked
Configures whether the camera
struct

dai::CameraProperties::IspScale

variable
int32_t horizNumerator
variable
int32_t horizDenominator
variable
int32_t vertNumerator
variable
int32_t vertDenominator
function
DEPTHAI_SERIALIZE(IspScale, horizNumerator, horizDenominator, vertNumerator, vertDenominator)
enum

int32_t ColorOrder

For 24 bit color these can be either RGB or BGR
enumerator
BGR
enumerator
RGB
enum

WarpMeshSource

Warp mesh source
enumerator
AUTO
enumerator
NONE
enumerator
CALIBRATION
enumerator
URI
struct

dai::CastProperties

#include CastProperties.hpp
variable
dai::RawImgFrame::Type outputType
variable
tl::optional< float > scale
variable
tl::optional< float > offset
variable
int numFramesPool
struct

dai::ColorCameraProperties

#include ColorCameraProperties.hpp
variable
RawCameraControl initialControl
variable
CameraBoardSocket boardSocket
Which socket will color camera use
variable
std::string cameraName
Which camera name will color camera use
variable
CameraImageOrientation imageOrientation
Camera sensor image orientation / pixel readout
variable
ColorOrder colorOrder
For 24 bit color these can be either RGB or BGR
variable
bool interleaved
Are colors interleaved (R1G1B1, R2G2B2, ...) or planar (R1R2..., G1G2..., B1B2)
variable
bool fp16
Are values FP16 type (0.0 - 255.0)
variable
uint32_t previewHeight
Preview frame output height
variable
uint32_t previewWidth
Preview frame output width
variable
int32_t videoWidth
Preview frame output width
variable
int32_t videoHeight
Preview frame output height
variable
int32_t stillWidth
Preview frame output width
variable
int32_t stillHeight
Preview frame output height
variable
SensorResolution resolution
Select the camera sensor resolution
variable
float fps
Camera sensor FPS
variable
int isp3aFps
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.
variable
float sensorCropX
Initial sensor crop, -1 signifies center crop
variable
float sensorCropY
variable
bool previewKeepAspectRatio
Whether to keep aspect ratio of input (video size) or not
variable
IspScale ispScale
Configure scaling for
variable
int numFramesPoolRaw
Pool sizes
variable
int numFramesPoolIsp
variable
int numFramesPoolVideo
variable
int numFramesPoolPreview
variable
int numFramesPoolStill
variable
std::vector< dai::FrameEvent > eventFilter
List of events to receive, the rest will be ignored
variable
tl::optional< bool > rawPacked
Configures whether the camera
struct

dai::ColorCameraProperties::IspScale

variable
int32_t horizNumerator
variable
int32_t horizDenominator
variable
int32_t vertNumerator
variable
int32_t vertDenominator
function
DEPTHAI_SERIALIZE(IspScale, horizNumerator, horizDenominator, vertNumerator, vertDenominator)
enum

int32_t SensorResolution

Select the camera sensor resolution
enumerator
THE_1080_P
enumerator
THE_4_K
enumerator
THE_12_MP
enumerator
THE_13_MP
enumerator
THE_720_P
enumerator
THE_800_P
enumerator
THE_1200_P
enumerator
THE_5_MP
enumerator
THE_4000X3000
enumerator
THE_5312X6000
enumerator
THE_48_MP
enumerator
THE_1440X1080
enumerator
THE_1352X1012
enumerator
THE_2024X1520
enum

int32_t ColorOrder

For 24 bit color these can be either RGB or BGR
enumerator
BGR
enumerator
RGB
struct

dai::DetectionNetworkProperties

#include DetectionNetworkProperties.hppDerived by dai::PropertiesSerializable< DetectionNetworkProperties, SpatialDetectionNetworkProperties >
variable
struct

dai::DetectionParserProperties

#include DetectionParserProperties.hpp
variable
int numFramesPool
variable
std::unordered_map< std::string, TensorInfo > networkInputs
variable
struct

dai::EdgeDetectorProperties

#include EdgeDetectorProperties.hpp
variable
RawEdgeDetectorConfig initialConfig
variable
int outputFrameSize
Maximum output frame size in bytes (eg: 300x300 BGR image -> 300*300*3 bytes)
variable
int numFramesPool
struct

dai::FeatureTrackerProperties

#include FeatureTrackerProperties.hpp
variable
RawFeatureTrackerConfig initialConfig
Initial feature tracker config
variable
std::int32_t 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.
variable
std::int32_t 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.
struct

dai::GlobalProperties

#include GlobalProperties.hpp
variable
double leonCssFrequencyHz
Set frequency of Leon OS - Increasing can improve performance, at the cost of higher power draw
variable
double leonMssFrequencyHz
Set frequency of Leon RT - Increasing can improve performance, at the cost of higher power draw
variable
tl::optional< std::string > pipelineName
variable
tl::optional< std::string > pipelineVersion
variable
tl::optional< dai::EepromData > calibData
Calibration data sent through pipeline
variable
tl::optional< std::uint32_t > cameraTuningBlobSize
Camera tuning blob size in bytes
variable
std::string cameraTuningBlobUri
Uri which points to camera tuning blob
variable
int32_t 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.
variable
uint32_t 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.
variable
uint32_t 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.
struct

dai::IMUSensorConfig

variable
bool sensitivityEnabled
variable
bool sensitivityRelative
variable
uint16_t changeSensitivity
variable
uint32_t reportRate
variable
IMUSensor sensorId
struct

dai::IMUProperties

variable
std::vector< IMUSensorConfig > imuSensors
variable
std::int32_t batchReportThreshold
variable
std::int32_t maxBatchReports
variable
tl::optional< bool > enableFirmwareUpdate
struct

dai::ImageAlignProperties

#include ImageAlignProperties.hpp
variable
RawImageAlignConfig initialConfig
variable
int numFramesPool
variable
int alignWidth
Optional output width
variable
int alignHeight
Optional output height
variable
std::vector< int > warpHwIds
variable
Interpolation interpolation
variable
bool outKeepAspectRatio
Whether to keep aspect ratio of the input or not
variable
std::int32_t numShaves
Number of shaves reserved.
enum

dai::Interpolation Interpolation

struct

dai::ImageManipProperties

#include ImageManipProperties.hpp
variable
RawImageManipConfig initialConfig
variable
int outputFrameSize
variable
int numFramesPool
variable
int meshWidth
variable
int meshHeight
variable
std::string meshUri
struct

dai::MessageDemuxProperties

#include MessageDemuxProperties.hpp
variable
char dummy
struct

dai::MonoCameraProperties

#include MonoCameraProperties.hpp
variable
RawCameraControl initialControl
variable
CameraBoardSocket boardSocket
Which socket will mono camera use
variable
std::string cameraName
Which camera name will mono camera use
variable
CameraImageOrientation imageOrientation
Camera sensor image orientation / pixel readout
variable
SensorResolution resolution
Select the camera sensor resolution
variable
float fps
Camera sensor FPS
variable
int isp3aFps
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.
variable
int numFramesPool
Frame pool size for the main output, ISP processed
variable
int numFramesPoolRaw
Frame pool size for the
variable
std::vector< dai::FrameEvent > eventFilter
List of events to receive, the rest will be ignored
variable
tl::optional< bool > rawPacked
Configures whether the camera
enum

int32_t SensorResolution

Select the camera sensor resolution: 1280×720, 1280×800, 640×400, 640×480, 1920×1200
enumerator
THE_720_P
enumerator
THE_800_P
enumerator
THE_400_P
enumerator
THE_480_P
enumerator
THE_1200_P
struct

dai::NeuralNetworkProperties

#include NeuralNetworkProperties.hppDerived by dai::PropertiesSerializable< NeuralNetworkProperties, DetectionNetworkProperties >
variable
tl::optional< std::uint32_t > blobSize
Blob binary size in bytes
variable
std::string blobUri
Uri which points to blob
variable
std::uint32_t numFrames
Number of available output tensors in pool
variable
std::uint32_t numThreads
Number of threads to create for running inference. 0 = auto
variable
std::uint32_t numNCEPerThread
Number of NCE (Neural Compute Engine) per inference thread. 0 = auto
struct

dai::ObjectTrackerProperties

#include ObjectTrackerProperties.hpp
variable
float trackerThreshold
Confidence threshold for tracklets. Above this threshold detections will be tracked. Default 0, all detections are tracked.
variable
std::int32_t maxObjectsToTrack
Maximum number of objects to track. Maximum 60 for SHORT_TERM_KCF, maximum 1000 for other tracking methods. Default 60.
variable
std::vector< std::uint32_t > detectionLabelsToTrack
Which detections labels to track. Default all labels are tracked.
variable
TrackerType trackerType
Tracking method.
variable
TrackerIdAssignmentPolicy trackerIdAssignmentPolicy
New ID assignment policy.
variable
bool trackingPerClass
Whether tracker should take into consideration class label for tracking.
struct

dai::PointCloudProperties

#include PointCloudProperties.hpp
variable
RawPointCloudConfig initialConfig
variable
int numFramesPool
struct

dai::Properties

#include Properties.hppDerived by dai::PropertiesSerializable< Properties, ToFProperties >, dai::PropertiesSerializable< Properties, ImageAlignProperties >, dai::PropertiesSerializable< Properties, CameraProperties >, dai::PropertiesSerializable< Properties, ObjectTrackerProperties >, dai::PropertiesSerializable< Properties, NeuralNetworkProperties >, dai::PropertiesSerializable< Properties, EdgeDetectorProperties >, dai::PropertiesSerializable< Properties, VideoEncoderProperties >, dai::PropertiesSerializable< Properties, FeatureTrackerProperties >, dai::PropertiesSerializable< Properties, ColorCameraProperties >, dai::PropertiesSerializable< Properties, UVCProperties >, dai::PropertiesSerializable< Properties, SystemLoggerProperties >, dai::PropertiesSerializable< Properties, SyncProperties >, dai::PropertiesSerializable< Properties, SPIInProperties >, dai::PropertiesSerializable< Properties, MonoCameraProperties >, dai::PropertiesSerializable< Properties, XLinkOutProperties >, dai::PropertiesSerializable< Properties, GlobalProperties >, dai::PropertiesSerializable< Properties, StereoDepthProperties >, dai::PropertiesSerializable< Properties, SPIOutProperties >, dai::PropertiesSerializable< Properties, XLinkInProperties >, dai::PropertiesSerializable< Properties, AprilTagProperties >, dai::PropertiesSerializable< Properties, IMUProperties >, dai::PropertiesSerializable< Properties, MessageDemuxProperties >, dai::PropertiesSerializable< Properties, CastProperties >, dai::PropertiesSerializable< Properties, WarpProperties >, dai::PropertiesSerializable< Properties, SpatialLocationCalculatorProperties >, dai::PropertiesSerializable< Properties, ScriptProperties >, dai::PropertiesSerializable< Properties, PointCloudProperties >, dai::PropertiesSerializable< Properties, DetectionParserProperties >, dai::PropertiesSerializable< Properties, ImageManipProperties >
function
void serialize(std::vector< std::uint8_t > & data, SerializationType type)
function
std::unique_ptr< Properties > clone()
function
~Properties()
struct

dai::PropertiesSerializable

#include Properties.hpp
inline function
void serialize(std::vector< std::uint8_t > & data, SerializationType type)
inline function
std::unique_ptr< Properties > clone()
struct

dai::SPIInProperties

#include SPIInProperties.hpp
variable
std::string streamName
Name of stream
variable
int busId
SPI bus to use
variable
std::uint32_t maxDataSize
Maximum input data size
variable
std::uint32_t numFrames
Number of frames in pool
struct

dai::SPIOutProperties

#include SPIOutProperties.hpp
variable
std::string streamName
Name of stream
variable
int busId
SPI bus to use
struct

dai::ScriptProperties

#include ScriptProperties.hpp
variable
std::string scriptUri
Uri which points to actual script
variable
std::string scriptName
Name of script
variable
ProcessorType processor
Which processor should execute the script
struct

dai::SpatialDetectionNetworkProperties

#include SpatialDetectionNetworkProperties.hpp
variable
float detectedBBScaleFactor
variable
variable
SpatialLocationCalculatorAlgorithm calculationAlgorithm
variable
std::int32_t stepSize
struct

dai::SpatialLocationCalculatorProperties

#include SpatialLocationCalculatorProperties.hpp
struct

dai::StereoDepthProperties

#include StereoDepthProperties.hpp
variable
RawStereoDepthConfig initialConfig
variable
CameraBoardSocket depthAlignCamera
Which camera to align disparity/depth to. When configured (not AUTO), takes precedence over 'depthAlign'
variable
bool enableRectification
Enable stereo rectification/dewarp or not. Useful to disable when replaying pre-recorded rectified frames.
variable
std::int32_t rectifyEdgeFillColor
Fill color for missing data at frame edges - grayscale 0..255, or -1 to replicate pixels
variable
tl::optional< std::int32_t > width
Input frame width. Optional (taken from MonoCamera nodes if they exist)
variable
tl::optional< std::int32_t > height
Input frame height. Optional (taken from MonoCamera nodes if they exist)
variable
tl::optional< std::int32_t > outWidth
Output disparity/depth width. Currently only used when aligning to RGB
variable
tl::optional< std::int32_t > outHeight
Output disparity/depth height. Currently only used when aligning to RGB
variable
bool outKeepAspectRatio
Whether to keep aspect ratio of the input (rectified) or not
variable
RectificationMesh mesh
Specify a direct warp mesh to be used for rectification, instead of intrinsics + extrinsic matrices
variable
bool 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.
variable
int numFramesPool
variable
std::int32_t 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.
variable
std::int32_t 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.
variable
bool 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));
variable
tl::optional< bool > 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.
variable
tl::optional< float > baseline
Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
variable
tl::optional< float > focalLength
Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
variable
tl::optional< bool > disparityToDepthUseSpecTranslation
Use baseline information for disparity to depth conversion from specs (design data) or from calibration. Suitable for debugging. Utilizes calibrated value as default
variable
tl::optional< bool > rectificationUseSpecTranslation
Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Suitable for debugging. Default: false
variable
tl::optional< bool > depthAlignmentUseSpecTranslation
Use baseline information for depth alignment from specs (design data) or from calibration. Suitable for debugging. Utilizes calibrated value as default
variable
tl::optional< float > alphaScaling
Free scaling parameter between 0 (when all the pixels in the undistorted image are valid) and 1 (when all the source image pixels are retained in the undistorted image). On some high distortion lenses, and/or due to rectification (image rotated) invalid areas may appear even with alpha=0, in these cases alpha < 0.0 helps removing invalid areas. See getOptimalNewCameraMatrix from opencv for more details.
struct

dai::StereoDepthProperties::RectificationMesh

variable
std::string meshLeftUri
Uri which points to the mesh array for 'left' input rectification
variable
std::string meshRightUri
Uri which points to the mesh array for 'right' input rectification
variable
tl::optional< std::uint32_t > meshSize
Mesh array size in bytes, for each of 'left' and 'right' (need to match)
variable
uint16_t stepWidth
Distance between mesh points, in the horizontal direction
variable
uint16_t stepHeight
Distance between mesh points, in the vertical direction
function
enum

dai::MedianFilter MedianFilter

struct

dai::SyncProperties

#include SyncProperties.hpp
variable
uint64_t syncThresholdNs
The maximal interval the messages can be apart in nanoseconds.
variable
int32_t syncAttempts
The number of syncing attempts before fail (num of replaced messages).
struct

dai::SystemLoggerProperties

#include SystemLoggerProperties.hpp
variable
float rateHz
Rate at which the messages are going to be sent in hertz
struct

dai::ToFProperties

#include ToFProperties.hpp
variable
RawToFConfig initialConfig
Initial ToF config
variable
int numFramesPool
Num frames in output pool
variable
std::int32_t numShaves
Number of shaves reserved for ToF decoding.
variable
std::vector< int > warpHwIds
struct

dai::UVCProperties

#include UVCProperties.hpp
variable
std::unordered_map< int, int > gpioInit
variable
std::unordered_map< int, int > gpioStreamOn
variable
std::unordered_map< int, int > gpioStreamOff
struct

dai::VideoEncoderProperties

#include VideoEncoderProperties.hpp
variable
std::int32_t bitrate
Specifies preferred bitrate (in bit/s) of compressed output bitstream in CBR mode"0" for automatic computation, based on input resolution and FPS: 720p30: 4Mbps, 1080p30: 8.5Mbps, 1440p30: 14Mbps, 2160p30: 20Mbps
variable
std::int32_t keyframeFrequency
Every x number of frames a keyframe will be inserted
variable
std::int32_t maxBitrate
Specifies maximum bitrate (in bit/s) of compressed output bitstream in CBR mode"0" to follow
variable
std::int32_t numBFrames
Specifies number of B frames to be inserted
variable
std::uint32_t numFramesPool
This options specifies how many frames are available in this node's pool. Helps when receiver is slow at consuming.Value "0" indicates automatic number of frames assignment
variable
std::int32_t outputFrameSize
Specifies max output frame size in pool. Value "0" indicates auto
variable
Profile profile
Encoding profile, H264, H265 or MJPEG
variable
std::int32_t quality
Value between 0-100% (approximates quality)
variable
bool lossless
Lossless mode ([M]JPEG only)
variable
RateControlMode rateCtrlMode
Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
variable
float frameRate
Frame rate
enum

int RateControlMode

Rate control mode specifies if constant or variable bitrate should be used (H264 / H265)
enumerator
CBR
enumerator
VBR
enum

int Profile

Encoding profile, H264 (AVC), H265 (HEVC) or MJPEG
enumerator
H264_BASELINE
enumerator
H264_HIGH
enumerator
H264_MAIN
enumerator
H265_MAIN
enumerator
MJPEG
struct

dai::WarpProperties

#include WarpProperties.hpp
variable
int outputWidth
variable
int outputHeight
variable
int outputFrameSize
variable
int numFramesPool
variable
int meshWidth
variable
int meshHeight
variable
std::string meshUri
variable
std::vector< int > warpHwIds
variable
Interpolation interpolation
enum

dai::Interpolation Interpolation

struct

dai::XLinkInProperties

#include XLinkInProperties.hpp
variable
std::string streamName
Name of stream
variable
std::uint32_t maxDataSize
Maximum input data size
variable
std::uint32_t numFrames
Number of frames in pool
struct

dai::XLinkOutProperties

#include XLinkOutProperties.hpp
variable
float maxFpsLimit
Set a limit to how many packets will be sent further to host
variable
std::string streamName
Name of stream
variable
bool metadataOnly
Whether to transfer data or only object attributes
namespace

dai::bootloader

static constant
constexpr static const char * XLINK_CHANNEL_BOOTLOADER
static constant
constexpr static const char * XLINK_CHANNEL_WATCHDOG
static constant
constexpr static std::uint32_t XLINK_STREAM_MAX_SIZE
static constant
constexpr static const std::chrono::milliseconds XLINK_WATCHDOG_TIMEOUT
function
DEPTHAI_BOOTLOADER_NLOHMANN_DEFINE_TYPE_OPTIONAL_NON_INTRUSIVE(NetworkConfig, timeoutMs, ipv4, ipv4Mask, ipv4Gateway, ipv4Dns, ipv4DnsAlt, staticIpv4, ipv6, ipv6Prefix, ipv6Gateway, ipv6Dns, ipv6DnsAlt, staticIpv6, mac)
function
DEPTHAI_BOOTLOADER_NLOHMANN_DEFINE_TYPE_OPTIONAL_NON_INTRUSIVE(UsbConfig, timeoutMs, maxUsbSpeed, vid, pid)
function
DEPTHAI_BOOTLOADER_NLOHMANN_DEFINE_TYPE_OPTIONAL_NON_INTRUSIVE(Config, appMem, usb, network, userBlSize, userBlChecksum)
inline function
const Structure getStructure(Type type)
enum

std::int32_t Memory

enumerator
AUTO
enumerator
FLASH
enumerator
EMMC
enum

std::int32_t Section

enumerator
AUTO
enumerator
HEADER
enumerator
BOOTLOADER
enumerator
BOOTLOADER_CONFIG
enumerator
APPLICATION
enumerator
USER_BOOTLOADER
enum

std::int32_t Type

enumerator
AUTO
enumerator
USB
enumerator
NETWORK
struct

dai::bootloader::NetworkConfig

variable
int timeoutMs
If timeout < 0 - waits forever if timeout == 0 - no timeout if timeout > 0 - waits timeout milliseconds
variable
std::uint32_t ipv4
variable
std::uint32_t ipv4Mask
variable
std::uint32_t ipv4Gateway
variable
std::uint32_t ipv4Dns
variable
std::uint32_t ipv4DnsAlt
variable
bool staticIpv4
variable
std::array< uint32_t, 4 > ipv6
variable
std::uint32_t ipv6Prefix
variable
std::array< uint32_t, 4 > ipv6Gateway
variable
std::array< uint32_t, 4 > ipv6Dns
variable
std::array< uint32_t, 4 > ipv6DnsAlt
variable
bool staticIpv6
variable
std::array< uint8_t, 6 > mac
struct

dai::bootloader::UsbConfig

variable
int timeoutMs
If timeout < 0 - waits forever if timeout == 0 - no timeout if timeout > 0 - waits timeout milliseconds
variable
int maxUsbSpeed
UNKNOWN = 0, LOW, FULL, HIGH, SUPER, SUPER_PLUS
variable
uint16_t vid
variable
uint16_t pid
struct

dai::bootloader::Config

Derived by dai::DeviceBootloader::Config
variable
Memory appMem
variable
variable
variable
uint32_t userBlSize
variable
uint32_t userBlChecksum
struct

dai::bootloader::Structure

Derived by dai::bootloader::NetworkBootloaderStructure, dai::bootloader::UsbBootloaderStructure
variable
std::map< Section, long > offset
variable
std::map< Section, long > size
function
Structure()
struct

dai::bootloader::NetworkBootloaderStructure

inline function
NetworkBootloaderStructure()
struct

dai::bootloader::UsbBootloaderStructure

inline function
UsbBootloaderStructure()
namespace

dai::bootloader::request

enum

uint32_t Command

enumerator
USB_ROM_BOOT
enumerator
BOOT_APPLICATION
enumerator
UPDATE_FLASH
enumerator
GET_BOOTLOADER_VERSION
enumerator
BOOT_MEMORY
enumerator
UPDATE_FLASH_EX
enumerator
UPDATE_FLASH_EX_2
enumerator
NO_OP
enumerator
GET_BOOTLOADER_TYPE
enumerator
SET_BOOTLOADER_CONFIG
enumerator
GET_BOOTLOADER_CONFIG
enumerator
BOOTLOADER_MEMORY
enumerator
GET_BOOTLOADER_COMMIT
enumerator
UPDATE_FLASH_BOOT_HEADER
enumerator
READ_FLASH
enumerator
GET_APPLICATION_DETAILS
enumerator
GET_MEMORY_DETAILS
enumerator
IS_USER_BOOTLOADER
struct

dai::bootloader::request::UsbRomBoot

inline function
UsbRomBoot()
struct

dai::bootloader::request::BootApplication

inline function
BootApplication()
struct

dai::bootloader::request::UpdateFlash

variable
Storage storage
variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
UpdateFlash()
enum

uint32_t Storage

enumerator
SBR
enumerator
BOOTLOADER
struct

dai::bootloader::request::GetBootloaderVersion

inline function
GetBootloaderVersion()
struct

dai::bootloader::request::BootMemory

variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
BootMemory()
struct

dai::bootloader::request::UpdateFlashEx

variable
Memory memory
variable
Section section
variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
UpdateFlashEx()
struct

dai::bootloader::request::UpdateFlashEx2

variable
Memory memory
variable
uint32_t offset
variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
UpdateFlashEx2()
struct

dai::bootloader::request::GetBootloaderType

inline function
GetBootloaderType()
struct

dai::bootloader::request::SetBootloaderConfig

variable
Memory memory
variable
int64_t offset
variable
uint32_t clearConfig
variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
SetBootloaderConfig()
struct

dai::bootloader::request::GetBootloaderConfig

variable
Memory memory
variable
int64_t offset
variable
uint32_t maxSize
inline function
GetBootloaderConfig()
struct

dai::bootloader::request::BootloaderMemory

inline function
BootloaderMemory()
struct

dai::bootloader::request::GetBootloaderCommit

inline function
GetBootloaderCommit()
struct

dai::bootloader::request::UpdateFlashBootHeader

variable
Type type
variable
int64_t offset
variable
int64_t location
variable
int32_t dummyCycles
variable
int32_t frequency
variable
int32_t gpioMode
inline function
UpdateFlashBootHeader()
enum

int32_t Type

enumerator
GPIO_MODE
enumerator
USB_RECOVERY
enumerator
NORMAL
enumerator
FAST
struct

dai::bootloader::request::ReadFlash

variable
Memory memory
variable
uint32_t offset
variable
uint32_t totalSize
inline function
ReadFlash()
struct

dai::bootloader::request::GetApplicationDetails

variable
Memory memory
inline function
GetApplicationDetails()
struct

dai::bootloader::request::GetMemoryDetails

variable
Memory memory
inline function
GetMemoryDetails()
struct

dai::bootloader::request::IsUserBootloader

inline function
IsUserBootloader()
namespace

dai::bootloader::response

enum

uint32_t Command

enumerator
FLASH_COMPLETE
enumerator
FLASH_STATUS_UPDATE
enumerator
BOOTLOADER_VERSION
enumerator
BOOTLOADER_TYPE
enumerator
GET_BOOTLOADER_CONFIG
enumerator
BOOTLOADER_MEMORY
enumerator
BOOT_APPLICATION
enumerator
BOOTLOADER_COMMIT
enumerator
READ_FLASH
enumerator
APPLICATION_DETAILS
enumerator
MEMORY_DETAILS
enumerator
IS_USER_BOOTLOADER
enumerator
NO_OP
struct

dai::bootloader::response::FlashComplete

variable
uint32_t success
variable
char errorMsg
inline function
FlashComplete()
struct

dai::bootloader::response::FlashStatusUpdate

variable
float progress
inline function
FlashStatusUpdate()
struct

dai::bootloader::response::BootloaderVersion

variable
uint32_t major
variable
uint32_t minor
variable
uint32_t patch
inline function
BootloaderVersion()
struct

dai::bootloader::response::BootloaderType

variable
Type type
inline function
BootloaderType()
struct

dai::bootloader::response::GetBootloaderConfig

variable
uint32_t success
variable
char errorMsg
variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
GetBootloaderConfig()
struct

dai::bootloader::response::BootloaderMemory

variable
Memory memory
inline function
BootloaderMemory()
struct

dai::bootloader::response::BootApplication

variable
uint32_t success
variable
char errorMsg
inline function
BootApplication()
struct

dai::bootloader::response::BootloaderCommit

variable
char commitStr
inline function
BootloaderCommit()
struct

dai::bootloader::response::ReadFlash

variable
uint32_t success
variable
char errorMsg
variable
uint32_t totalSize
variable
uint32_t numPackets
inline function
ReadFlash()
struct

dai::bootloader::response::ApplicationDetails

variable
uint32_t success
variable
char errorMsg
variable
uint32_t hasApplication
variable
uint32_t hasFirmwareVersion
variable
uint32_t hasApplicationName
variable
char firmwareVersionStr
variable
char applicationNameStr
inline function
ApplicationDetails()
struct

dai::bootloader::response::MemoryDetails

variable
uint32_t hasMemory
variable
Memory memory
variable
int64_t memorySize
variable
char memoryInfo
inline function
MemoryDetails()
struct

dai::bootloader::response::IsUserBootloader

variable
uint32_t isUserBootloader
inline function
IsUserBootloader()
struct

dai::bootloader::response::NoOp

variable
uint32_t invalidOp
inline function
NoOp()
namespace

dai::device

static constant
static constant
static constant
static constant
static constant
static constant
static constant
static constant
static constant
namespace

dai::node

class

dai::node::AprilTag

#include AprilTag.hpp
variable
AprilTagConfig initialConfig
Initial config to use when calculating spatial location data.
variable
Input inputConfig
Input AprilTagConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input inputImage
Input message with depth data used to retrieve spatial information about detected object. Default queue is non-blocking with size 4.
variable
Output out
Outputs AprilTags message that carries spatial location results.
variable
Output outConfig
Outputs AprilTagConfig message that contains current configuration.
variable
Output passthroughInputImage
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
function
AprilTag(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
AprilTag(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setWaitForConfigInput(bool wait)
Specify whether or not wait until configuration message arrives to inputConfig Input.
Parameters
  • wait: True to wait for configuration message, false otherwise.
class

dai::node::Camera

#include Camera.hpp
variable
CameraControl initialControl
Initial control options to apply to sensor
variable
Input inputConfig
Input for ImageManipConfig message, which can modify crop parameters in runtimeDefault queue is non-blocking with size 8
variable
Input inputControl
Input for CameraControl message, which can modify camera parameters in runtimeDefault queue is blocking with size 8
variable
Output video
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.Suitable for use with VideoEncoder node
variable
Output preview
Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.Suitable for use with NeuralNetwork node
variable
Output 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.
variable
Output 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
variable
Output 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.
variable
Output 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
function
Camera(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
Constructs Camera node.
function
Camera(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setBoardSocket(CameraBoardSocket boardSocket)
Specify which board socket to use
Parameters
  • boardSocket: Board socket to use
function
CameraBoardSocket getBoardSocket()
Retrieves which board socket to use
Returns
Board socket to use
function
void setCamera(std::string name)
Specify which camera to use by name
Parameters
  • name: Name of the camera to use
function
std::string getCamera()
Retrieves which camera to use by name
Returns
Name of the camera to use
function
void setImageOrientation(CameraImageOrientation imageOrientation)
function
CameraImageOrientation getImageOrientation()
function
void setSize(std::tuple< int, int > size)
function
void setSize(int width, int height)
function
void setPreviewSize(int width, int height)
function
void setPreviewSize(std::tuple< int, int > size)
function
void setVideoSize(int width, int height)
function
void setVideoSize(std::tuple< int, int > size)
function
void setStillSize(int width, int height)
function
void setStillSize(std::tuple< int, int > size)
function
void setFps(float fps)
Set rate at which camera should produce frames
Parameters
  • fps: Rate in frames per second
function
void setIsp3aFps(int isp3aFps)
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.
function
float getFps()
Get rate at which camera should produce frames
Returns
Rate in frames per second
function
std::tuple< int, int > getPreviewSize()
function
int getPreviewWidth()
function
int getPreviewHeight()
function
std::tuple< int, int > getVideoSize()
function
int getVideoWidth()
function
int getVideoHeight()
function
std::tuple< int, int > getStillSize()
function
int getStillWidth()
function
int getStillHeight()
function
std::tuple< int, int > getSize()
function
int getWidth()
function
int getHeight()
function
void setMeshSource(Properties::WarpMeshSource source)
function
function
void loadMeshFile(const dai::Path & warpMesh)
Specify local filesystem paths to the undistort mesh calibration files.When a mesh calibration is set, it overrides the camera intrinsics/extrinsics matrices. Overrides useHomographyRectification behavior. Mesh format: a sequence of (y,x) points as 'float' with coordinates from the input image to be mapped in the output. The mesh can be subsampled, configured by With a 1280x800 resolution and the default (16,16) step, the required mesh size is:width: 1280 / 16 + 1 = 81height: 800 / 16 + 1 = 51
function
void loadMeshData(span< const std::uint8_t > warpMesh)
Specify mesh calibration data for undistortion See
function
void setMeshStep(int width, int height)
Set the distance between mesh points. Default: (32, 32)
function
std::tuple< int, int > getMeshStep()
function
void setCalibrationAlpha(float alpha)
function
tl::optional< float > getCalibrationAlpha()
function
void setRawOutputPacked(bool packed)
Configures whether the camera ToF.
class

dai::node::Cast

#include Cast.hpp
variable
Input input
Input NNData or ImgFrame message.
variable
Output output
Output ImgFrame message.
variable
Output passthroughInput
Passthrough input message.
function
Cast(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
Cast(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
Cast & setNumFramesPool(int numFramesPool)
Set number of frames in pool
Parameters
  • numFramesPool: Number of frames in pool
function
Cast & setOutputFrameType(dai::RawImgFrame::Type outputType)
Set output frame type
Parameters
  • outputType: Output frame type
function
Cast & setScale(float scale)
Set scale
Parameters
  • scale: Scale
function
Cast & setOffset(float offset)
Set offset
Parameters
  • offset: Offset
class

dai::node::ColorCamera

#include ColorCamera.hpp
variable
CameraControl initialControl
Initial control options to apply to sensor
variable
Input inputConfig
Input for ImageManipConfig message, which can modify crop parameters in runtimeDefault queue is non-blocking with size 8
variable
Input inputControl
Input for CameraControl message, which can modify camera parameters in runtimeDefault queue is blocking with size 8
variable
Output video
Outputs ImgFrame message that carries NV12 encoded (YUV420, UV plane interleaved) frame data.Suitable for use with VideoEncoder node
variable
Output preview
Outputs ImgFrame message that carries BGR/RGB planar/interleaved encoded frame data.Suitable for use with NeuralNetwork node
variable
Output 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.
variable
Output 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
variable
Output 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.
variable
Output 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
function
ColorCamera(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
Constructs ColorCamera node.
function
ColorCamera(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
int getScaledSize(int input, int num, int denom)
Computes the scaled size given numerator and denominator
function
void setBoardSocket(CameraBoardSocket boardSocket)
Specify which board socket to use
Parameters
  • boardSocket: Board socket to use
function
CameraBoardSocket getBoardSocket()
Retrieves which board socket to use
Returns
Board socket to use
function
void setCamera(std::string name)
Specify which camera to use by name
Parameters
  • name: Name of the camera to use
function
std::string getCamera()
Retrieves which camera to use by name
Returns
Name of the camera to use
function
void setCamId(int64_t id)
function
int64_t getCamId()
function
void setImageOrientation(CameraImageOrientation imageOrientation)
function
CameraImageOrientation getImageOrientation()
function
void setColorOrder(ColorCameraProperties::ColorOrder colorOrder)
function
function
void setInterleaved(bool interleaved)
function
bool getInterleaved()
function
void setFp16(bool fp16)
function
bool getFp16()
function
void setPreviewSize(int width, int height)
function
void setPreviewSize(std::tuple< int, int > size)
function
void setPreviewNumFramesPool(int num)
function
void setVideoSize(int width, int height)
function
void setVideoSize(std::tuple< int, int > size)
function
void setVideoNumFramesPool(int num)
function
void setStillSize(int width, int height)
function
void setStillSize(std::tuple< int, int > size)
function
void setStillNumFramesPool(int num)
function
void setResolution(Properties::SensorResolution resolution)
function
function
void setRawNumFramesPool(int num)
function
void setIspNumFramesPool(int num)
function
void setNumFramesPool(int raw, int isp, int preview, int video, int still)
function
void setIspScale(int numerator, int denominator)
Set 'isp' output scaling (numerator/denominator), preserving the aspect ratio. The fraction numerator/denominator is simplified first to a irreducible form, then a set of hardware scaler constraints applies: max numerator = 16, max denominator = 63
function
void setIspScale(std::tuple< int, int > scale)
function
void setIspScale(int horizNum, int horizDenom, int vertNum, int vertDenom)
Set 'isp' output scaling, per each direction. If the horizontal scaling factor (horizNum/horizDen) is different than the vertical scaling factor (vertNum/vertDen), a distorted (stretched or squished) image is generated
function
void setIspScale(std::tuple< int, int > horizScale, std::tuple< int, int > vertScale)
function
void setFps(float fps)
Set rate at which camera should produce frames
Parameters
  • fps: Rate in frames per second
function
void setIsp3aFps(int isp3aFps)
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.
function
void setFrameEventFilter(const std::vector< dai::FrameEvent > & events)
function
std::vector< dai::FrameEvent > getFrameEventFilter()
function
float getFps()
Get rate at which camera should produce frames
Returns
Rate in frames per second
function
std::tuple< int, int > getPreviewSize()
function
int getPreviewWidth()
function
int getPreviewHeight()
function
std::tuple< int, int > getVideoSize()
function
int getVideoWidth()
function
int getVideoHeight()
function
std::tuple< int, int > getStillSize()
function
int getStillWidth()
function
int getStillHeight()
function
std::tuple< int, int > getResolutionSize()
function
int getResolutionWidth()
function
int getResolutionHeight()
function
std::tuple< int, int > getIspSize()
function
int getIspWidth()
function
int getIspHeight()
function
void sensorCenterCrop()
Specify sensor center crop. Resolution size / video size
function
void setSensorCrop(float x, float y)
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).
Parameters
  • x: Top left X coordinate
  • y: Top left Y coordinate
function
std::tuple< float, float > getSensorCrop()
Returns
Sensor top left crop coordinates
function
float getSensorCropX()
function
float getSensorCropY()
function
void setWaitForConfigInput(bool wait)
Specify to wait until inputConfig receives a configuration message, before sending out a frame.
Parameters
  • wait: True to wait for inputConfig message, false otherwise
function
bool getWaitForConfigInput()
Returns
True if wait for inputConfig message, false otherwise
function
void setPreviewKeepAspectRatio(bool keep)
Specifies whether preview output should preserve aspect ratio, after downscaling from video size or not.
Parameters
  • 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
function
bool getPreviewKeepAspectRatio()
Returns
Preview keep aspect ratio option
function
int getPreviewNumFramesPool()
function
int getVideoNumFramesPool()
function
int getStillNumFramesPool()
function
int getRawNumFramesPool()
function
int getIspNumFramesPool()
function
void setRawOutputPacked(bool packed)
Configures whether the camera ToF.
class

dai::node::DetectionNetwork

#include DetectionNetwork.hpp
variable
Output out
Outputs ImgDetections message that carries parsed detection results. Overrides NeuralNetwork 'out' with ImgDetections output message type.
variable
Output outNetwork
Outputs unparsed inference results.
function
void setConfidenceThreshold(float thresh)
Specifies confidence threshold at which to filter the rest of the detections.
Parameters
  • thresh: Detection confidence must be greater than specified threshold to be added to the list
function
float getConfidenceThreshold()
Retrieves threshold at which to filter the rest of the detections.
Returns
Detection confidence
class

dai::node::MobileNetDetectionNetwork

#include DetectionNetwork.hpp
function
MobileNetDetectionNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
MobileNetDetectionNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
class

dai::node::YoloDetectionNetwork

#include DetectionNetwork.hpp
function
YoloDetectionNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
YoloDetectionNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setNumClasses(int numClasses)
function
void setCoordinateSize(int coordinates)
function
void setAnchors(std::vector< float > anchors)
function
void setAnchorMasks(std::map< std::string, std::vector< int >> anchorMasks)
function
void setIouThreshold(float thresh)
function
int getNumClasses()
function
int getCoordinateSize()
function
std::vector< float > getAnchors()
function
std::map< std::string, std::vector< int > > getAnchorMasks()
function
float getIouThreshold()
class

dai::node::DetectionParser

#include DetectionParser.hpp
variable
Input input
Input NN results with detection data to parse Default queue is blocking with size 5
variable
Output out
Outputs image frame with detected edges
function
DetectionParser(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
DetectionParser(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
function
int getNumFramesPool()
Returns number of frames in pool
function
void setBlob(const OpenVINO::Blob & blob)
Retrieves some input tensor information from the blob
Parameters
  • blob: OpenVINO blob to retrieve the information from
function
void setNNFamily(DetectionNetworkType type)
Sets NN Family to parse
function
DetectionNetworkType getNNFamily()
Gets NN Family to parse
function
void setConfidenceThreshold(float thresh)
Specifies confidence threshold at which to filter the rest of the detections.
Parameters
  • thresh: Detection confidence must be greater than specified threshold to be added to the list
function
float getConfidenceThreshold()
Retrieves threshold at which to filter the rest of the detections.
Returns
Detection confidence
function
void setNumClasses(int numClasses)
function
void setCoordinateSize(int coordinates)
function
void setAnchors(std::vector< float > anchors)
function
void setAnchorMasks(std::map< std::string, std::vector< int >> anchorMasks)
function
void setIouThreshold(float thresh)
function
int getNumClasses()
function
int getCoordinateSize()
function
std::vector< float > getAnchors()
function
std::map< std::string, std::vector< int > > getAnchorMasks()
function
float getIouThreshold()
class

dai::node::EdgeDetector

#include EdgeDetector.hpp
variable
EdgeDetectorConfig initialConfig
Initial config to use for edge detection.
variable
Input inputConfig
Input EdgeDetectorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input inputImage
Input image on which edge detection is performed. Default queue is non-blocking with size 4.
variable
Output outputImage
Outputs image frame with detected edges
variable
Output passthroughInputImage
Passthrough message on which the calculation was performed.
function
EdgeDetector(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
EdgeDetector(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setWaitForConfigInput(bool wait)
Specify whether or not wait until configuration message arrives to inputConfig Input.
Parameters
  • wait: True to wait for configuration message, false otherwise.
function
bool getWaitForConfigInput()
Returns
True if wait for inputConfig message, false otherwise
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
function
void setMaxOutputFrameSize(int maxFrameSize)
Specify maximum size of output image.
Parameters
  • maxFrameSize: Maximum frame size in bytes
class

dai::node::FeatureTracker

#include FeatureTracker.hpp
variable
FeatureTrackerConfig initialConfig
Initial config to use for feature tracking.
variable
Input inputConfig
Input FeatureTrackerConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input inputImage
Input message with frame data on which feature tracking is performed. Default queue is non-blocking with size 4.
variable
Output outputFeatures
Outputs TrackedFeatures message that carries tracked features results.
variable
Output passthroughInputImage
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
function
FeatureTracker(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
FeatureTracker(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setWaitForConfigInput(bool wait)
Specify whether or not wait until configuration message arrives to inputConfig Input.
Parameters
  • wait: True to wait for configuration message, false otherwise.
function
bool getWaitForConfigInput()
Returns
True if wait for inputConfig message, false otherwise
function
void setHardwareResources(int numShaves, int numMemorySlices)
Specify allocated hardware resources for feature tracking. 2 shaves/memory slices are required for optical flow, 1 for corner detection only.
Parameters
  • numShaves: Number of shaves. Maximum 2.
  • numMemorySlices: Number of memory slices. Maximum 2.
class

dai::node::IMU

#include IMU.hpp
variable
Output out
Outputs IMUData message that carries IMU packets.
function
IMU(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
Constructs IMU node.
function
IMU(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void enableIMUSensor(IMUSensorConfig sensorConfig)
Enable a new IMU sensor with explicit configuration
function
void enableIMUSensor(const std::vector< IMUSensorConfig > & sensorConfigs)
Enable a list of IMU sensors with explicit configuration
function
void enableIMUSensor(IMUSensor sensor, uint32_t reportRate)
Enable a new IMU sensor with default configuration
function
void enableIMUSensor(const std::vector< IMUSensor > & sensors, uint32_t reportRate)
Enable a list of IMU sensors with default configuration
function
void setBatchReportThreshold(std::int32_t batchReportThreshold)
Above this packet threshold data will be sent to host, if queue is not blocked
function
std::int32_t getBatchReportThreshold()
Above this packet threshold data will be sent to host, if queue is not blocked
function
void setMaxBatchReports(std::int32_t maxBatchReports)
Maximum number of IMU packets in a batch report
function
std::int32_t getMaxBatchReports()
Maximum number of IMU packets in a batch report
function
void enableFirmwareUpdate(bool enable)
class

dai::node::ImageAlign

#include ImageAlign.hpp
variable
ImageAlignConfig initialConfig
Initial config to use when calculating spatial location data.
variable
Input inputConfig
Input message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input input
Input message. Default queue is non-blocking with size 4.
variable
Input inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
variable
Output outputAligned
Outputs ImgFrame message that is aligned to inputAlignTo.
variable
Output passthroughInput
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
function
ImageAlign(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
ImageAlign(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
ImageAlign & setOutputSize(int alignWidth, int alignHeight)
Specify the output size of the aligned image
function
ImageAlign & setOutKeepAspectRatio(bool keep)
Specify whether to keep aspect ratio when resizing
function
ImageAlign & setInterpolation(Interpolation interp)
Specify interpolation method to use when resizing
function
ImageAlign & setNumShaves(int numShaves)
Specify number of shaves to use for this node
function
ImageAlign & setNumFramesPool(int numFramesPool)
Specify number of frames in the pool
class

dai::node::ImageManip

#include ImageManip.hpp
variable
ImageManipConfig initialConfig
Initial config to use when manipulating frames
variable
Input inputConfig
Input ImageManipConfig message with ability to modify parameters in runtime Default queue is blocking with size 8
variable
Input inputImage
Input image to be modified Default queue is blocking with size 8
variable
Output out
Outputs ImgFrame message that carries modified image.
function
ImageManip(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
ImageManip(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setCropRect(float xmin, float ymin, float xmax, float ymax)
function
void setCenterCrop(float ratio, float whRatio)
function
void setResize(int w, int h)
function
void setResizeThumbnail(int w, int h, int bgRed, int bgGreen, int bgBlue)
function
void setFrameType(ImgFrame::Type name)
function
void setHorizontalFlip(bool flip)
function
void setKeepAspectRatio(bool keep)
function
void setWaitForConfigInput(bool wait)
Specify whether or not wait until configuration message arrives to inputConfig Input.
Parameters
  • wait: True to wait for configuration message, false otherwise.
function
bool getWaitForConfigInput()
Returns
True if wait for inputConfig message, false otherwise
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
function
void setMaxOutputFrameSize(int maxFrameSize)
Specify maximum size of output image.
Parameters
  • maxFrameSize: Maximum frame size in bytes
function
void setWarpMesh(const std::vector< Point2f > & meshData, int width, int height)
Set a custom warp mesh
Parameters
  • meshData: 2D plane of mesh points, starting from top left to bottom right
  • width: Width of mesh
  • height: Height of mesh
function
void setWarpMesh(const std::vector< std::pair< float, float >> & meshData, int width, int height)
class

dai::node::MessageDemux

variable
Input input
Input message of type MessageGroup
variable
OutputMap outputs
A map of outputs, where keys are same as in the input MessageGroup
function
MessageDemux(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
MessageDemux(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
class

dai::node::MonoCamera

#include MonoCamera.hpp
variable
CameraControl initialControl
Initial control options to apply to sensor
variable
Input inputControl
Input for CameraControl message, which can modify camera parameters in runtime Default queue is blocking with size 8
variable
Output out
Outputs ImgFrame message that carries RAW8 encoded (grayscale) frame data.Suitable for use StereoDepth node. Processed by ISP
variable
Output raw
Outputs ImgFrame message that carries RAW10-packed (MIPI CSI-2 format) frame data.Captured directly from the camera sensor
variable
Output 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
function
MonoCamera(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
MonoCamera(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setBoardSocket(CameraBoardSocket boardSocket)
Specify which board socket to use
Parameters
  • boardSocket: Board socket to use
function
CameraBoardSocket getBoardSocket()
Retrieves which board socket to use
Returns
Board socket to use
function
void setCamera(std::string name)
Specify which camera to use by name
Parameters
  • name: Name of the camera to use
function
std::string getCamera()
Retrieves which camera to use by name
Returns
Name of the camera to use
function
void setCamId(int64_t id)
function
int64_t getCamId()
function
void setImageOrientation(CameraImageOrientation imageOrientation)
function
CameraImageOrientation getImageOrientation()
function
void setResolution(Properties::SensorResolution resolution)
function
function
void setFrameEventFilter(const std::vector< dai::FrameEvent > & events)
function
std::vector< dai::FrameEvent > getFrameEventFilter()
function
void setFps(float fps)
Set rate at which camera should produce frames
Parameters
  • fps: Rate in frames per second
function
void setIsp3aFps(int isp3aFps)
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.
function
float getFps()
Get rate at which camera should produce frames
Returns
Rate in frames per second
function
std::tuple< int, int > getResolutionSize()
function
int getResolutionWidth()
function
int getResolutionHeight()
function
void setNumFramesPool(int num)
function
void setRawNumFramesPool(int num)
function
int getNumFramesPool()
function
int getRawNumFramesPool()
function
void setRawOutputPacked(bool packed)
Configures whether the camera ToF.
class

dai::node::NeuralNetwork

#include NeuralNetwork.hpp
variable
Input input
Input message with data to be inferred upon Default queue is blocking with size 5
variable
Output out
Outputs NNData message that carries inference results
variable
Output passthrough
Passthrough message on which the inference was performed.Suitable for when input queue is set to non-blocking behavior.
variable
InputMap 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
variable
OutputMap passthroughs
Passthroughs which correspond to specified input
function
NeuralNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
NeuralNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setBlobPath(const dai::Path & path)
Load network blob into assets and use once pipeline is started.
Parameters
  • Error: if file doesn't exist or isn't a valid network blob.
Parameters
  • path: Path to network blob
function
void setBlob(OpenVINO::Blob blob)
Load network blob into assets and use once pipeline is started.
Parameters
  • blob: Network blob
function
void setBlob(const dai::Path & path)
Same functionality as the setBlobPath(). Load network blob into assets and use once pipeline is started.
Parameters
  • Error: if file doesn't exist or isn't a valid network blob.
Parameters
  • path: Path to network blob
function
void setNumPoolFrames(int numFrames)
Specifies how many frames will be available in the pool
Parameters
  • numFrames: How many frames will pool have
function
void setNumInferenceThreads(int numThreads)
How many threads should the node use to run the network.
Parameters
  • numThreads: Number of threads to dedicate to this node
function
void setNumNCEPerInferenceThread(int numNCEPerThread)
How many Neural Compute Engines should a single thread use for inference
Parameters
  • numNCEPerThread: Number of NCE per thread
function
int getNumInferenceThreads()
How many inference threads will be used to run the network
Returns
Number of threads, 0, 1 or 2. Zero means AUTO
class

dai::node::ObjectTracker

#include ObjectTracker.hpp
variable
Input 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.
variable
Input inputDetectionFrame
Input ImgFrame message on which object detection was performed. Default queue is non-blocking with size 4.
variable
Input inputDetections
Input message with image detection from neural network. Default queue is non-blocking with size 4.
variable
Output out
Outputs Tracklets message that carries object tracking results.
variable
Output passthroughTrackerFrame
Passthrough ImgFrame message on which tracking was performed. Suitable for when input queue is set to non-blocking behavior.
variable
Output passthroughDetectionFrame
Passthrough ImgFrame message on which object detection was performed. Suitable for when input queue is set to non-blocking behavior.
variable
Output passthroughDetections
Passthrough image detections message from neural network output. Suitable for when input queue is set to non-blocking behavior.
function
ObjectTracker(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
ObjectTracker(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setTrackerThreshold(float threshold)
Specify tracker threshold.
Parameters
  • threshold: Above this threshold the detected objects will be tracked. Default 0, all image detections are tracked.
function
void setMaxObjectsToTrack(std::int32_t maxObjectsToTrack)
Specify maximum number of object to track.
Parameters
  • maxObjectsToTrack: Maximum number of object to track. Maximum 60 in case of SHORT_TERM_KCF, otherwise 1000.
function
void setDetectionLabelsToTrack(std::vector< std::uint32_t > labels)
Specify detection labels to track.
Parameters
  • labels: Detection labels to track. Default every label is tracked from image detection network output.
function
void setTrackerType(TrackerType type)
Specify tracker type algorithm.
Parameters
  • type: Tracker type.
function
void setTrackerIdAssignmentPolicy(TrackerIdAssignmentPolicy type)
Specify tracker ID assignment policy.
Parameters
  • type: Tracker ID assignment policy.
function
void setTrackingPerClass(bool trackingPerClass)
Whether tracker should take into consideration class label for tracking.
class

dai::node::PointCloud

#include PointCloud.hpp
variable
PointCloudConfig initialConfig
Initial config to use when computing the point cloud.
variable
Input inputConfig
Input PointCloudConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input inputDepth
Input message with depth data used to create the point cloud. Default queue is non-blocking with size 4.
variable
Output outputPointCloud
Outputs PointCloudData message
variable
Output passthroughDepth
Passthrough depth from which the point cloud was calculated. Suitable for when input queue is set to non-blocking behavior.
function
PointCloud(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
PointCloud(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
class

dai::node::SPIIn

#include SPIIn.hpp
variable
Output out
Outputs message of same type as send from host.
function
SPIIn(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
SPIIn(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setStreamName(const std::string & name)
Specifies stream name over which the node will receive data
Parameters
  • name: Stream name
function
void setBusId(int id)
Specifies SPI Bus number to use
Parameters
  • id: SPI Bus id
function
void setMaxDataSize(std::uint32_t maxDataSize)
Set maximum message size it can receive
Parameters
  • maxDataSize: Maximum size in bytes
function
void setNumFrames(std::uint32_t numFrames)
Set number of frames in pool for sending messages forward
Parameters
  • numFrames: Maximum number of frames in pool
function
std::string getStreamName()
function
int getBusId()
function
std::uint32_t getMaxDataSize()
function
std::uint32_t getNumFrames()
class

dai::node::SPIOut

#include SPIOut.hpp
variable
Input input
Input for any type of messages to be transferred over SPI streamDefault queue is blocking with size 8
inline function
SPIOut(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
inline function
SPIOut(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
inline function
void setStreamName(std::string name)
Specifies stream name over which the node will send data
Parameters
  • name: Stream name
inline function
void setBusId(int busId)
Specifies SPI Bus number to use
Parameters
  • id: SPI Bus id
class

dai::node::Script

variable
InputMap inputs
Inputs to Script node. Can be accessed using subscript operator (Eg: inputs['in1']) By default inputs are set to blocking with queue size 8
variable
OutputMap outputs
Outputs from Script node. Can be accessed subscript operator (Eg: outputs['out1'])
function
Script(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
Script(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setScriptPath(const dai::Path & path, const std::string & name)
Specify local filesystem path to load the script
Parameters
  • path: Filesystem path to load the script
  • name: Optionally set a name of this script, otherwise the name defaults to the path
function
void setScript(const std::string & script, const std::string & name)
Sets script data to be interpreted
Parameters
  • script: Script string to be interpreted
  • name: Optionally set a name of this script
function
void setScript(const std::vector< std::uint8_t > & data, const std::string & name)
Sets script data to be interpreted
Parameters
  • data: Binary data that represents the script to be interpreted
  • name: Optionally set a name of this script
function
dai::Path getScriptPath()
function
std::string getScriptName()
function
void setProcessor(ProcessorType type)
Set on which processor the script should run
Parameters
  • type: Processor type - Leon CSS or Leon MSS
function
ProcessorType getProcessor()
Get on which processor the script should run
Returns
Processor type - Leon CSS or Leon MSS
class

dai::node::SpatialDetectionNetwork

#include SpatialDetectionNetwork.hpp
variable
Input input
Input message with data to be inferred upon Default queue is blocking with size 5
variable
Input inputDepth
Input message with depth data used to retrieve spatial information about detected object Default queue is non-blocking with size 4
variable
Output out
Outputs ImgDetections message that carries parsed detection results.
variable
Output boundingBoxMapping
Outputs mapping of detected bounding boxes relative to depth mapSuitable for when displaying remapped bounding boxes on depth frame
variable
Output passthrough
Passthrough message on which the inference was performed.Suitable for when input queue is set to non-blocking behavior.
variable
Output 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.
variable
Output spatialLocationCalculatorOutput
Output of SpatialLocationCalculator node, which is used internally by SpatialDetectionNetwork. Suitable when extra information is required from SpatialLocationCalculator node, e.g. minimum, maximum distance.
function
void setBoundingBoxScaleFactor(float scaleFactor)
Specifies scale factor for detected bounding boxes.
Parameters
  • scaleFactor: Scale factor must be in the interval (0,1].
function
void setDepthLowerThreshold(uint32_t lowerThreshold)
Specifies lower threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
Parameters
  • lowerThreshold: LowerThreshold must be in the interval [0,upperThreshold] and less than upperThreshold.
function
void setDepthUpperThreshold(uint32_t upperThreshold)
Specifies upper threshold in depth units (millimeter by default) for depth values which will used to calculate spatial data
Parameters
  • upperThreshold: UpperThreshold must be in the interval (lowerThreshold,65535].
function
void setSpatialCalculationAlgorithm(dai::SpatialLocationCalculatorAlgorithm calculationAlgorithm)
Specifies spatial location calculator algorithm: Average/Min/Max
Parameters
  • calculationAlgorithm: Calculation algorithm.
function
void setSpatialCalculationStepSize(int stepSize)
Specifies spatial location calculator step size for depth calculation. Step size 1 means that every pixel is taken into calculation, size 2 means every second etc.
Parameters
  • stepSize: Step size.
class

dai::node::MobileNetSpatialDetectionNetwork

#include SpatialDetectionNetwork.hpp
function
MobileNetSpatialDetectionNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
class

dai::node::YoloSpatialDetectionNetwork

#include SpatialDetectionNetwork.hpp
function
YoloSpatialDetectionNetwork(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
void setNumClasses(const int numClasses)
function
void setCoordinateSize(const int coordinates)
function
void setAnchors(std::vector< float > anchors)
function
void setAnchorMasks(std::map< std::string, std::vector< int >> anchorMasks)
function
void setIouThreshold(float thresh)
function
int getNumClasses()
function
int getCoordinateSize()
function
std::vector< float > getAnchors()
function
std::map< std::string, std::vector< int > > getAnchorMasks()
function
float getIouThreshold()
class

dai::node::SpatialLocationCalculator

#include SpatialLocationCalculator.hpp
variable
SpatialLocationCalculatorConfig initialConfig
Initial config to use when calculating spatial location data.
variable
Input inputConfig
Input SpatialLocationCalculatorConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input inputDepth
Input message with depth data used to retrieve spatial information about detected object. Default queue is non-blocking with size 4.
variable
Output out
Outputs SpatialLocationCalculatorData message that carries spatial location results.
variable
Output passthroughDepth
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
function
SpatialLocationCalculator(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
SpatialLocationCalculator(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setWaitForConfigInput(bool wait)
Specify whether or not wait until configuration message arrives to inputConfig Input.
Parameters
  • wait: True to wait for configuration message, false otherwise.
function
bool getWaitForConfigInput()
Returns
True if wait for inputConfig message, false otherwise
class

dai::node::StereoDepth

#include StereoDepth.hpp
variable
StereoDepthConfig initialConfig
Initial config to use for StereoDepth.
variable
Input inputConfig
Input StereoDepthConfig message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input left
Input for left ImgFrame of left-right pairDefault queue is non-blocking with size 8
variable
Input right
Input for right ImgFrame of left-right pairDefault queue is non-blocking with size 8
variable
Output 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
variable
Output 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
variable
Output syncedLeft
Passthrough ImgFrame message from 'left' Input.
variable
Output syncedRight
Passthrough ImgFrame message from 'right' Input.
variable
Output rectifiedLeft
Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
variable
Output rectifiedRight
Outputs ImgFrame message that carries RAW8 encoded (grayscale) rectified frame data.
variable
Output outConfig
Outputs StereoDepthConfig message that contains current stereo configuration.
variable
Output debugDispLrCheckIt1
Outputs ImgFrame message that carries left-right check first iteration (before combining with second iteration) disparity map. Useful for debugging/fine tuning.
variable
Output debugDispLrCheckIt2
Outputs ImgFrame message that carries left-right check second iteration (before combining with first iteration) disparity map. Useful for debugging/fine tuning.
variable
Output 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.
variable
Output 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.
variable
Output debugDispCostDump
Outputs ImgFrame message that carries cost dump of disparity map. Useful for debugging/fine tuning.
variable
Output confidenceMap
Outputs ImgFrame message that carries RAW8 confidence map. Lower values means higher confidence of the calculated disparity value. RGB alignment, left-right check or any postproccessing (e.g. median filter) is not performed on confidence map.
function
StereoDepth(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
StereoDepth(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setEmptyCalibration()
Specify that a passthrough/dummy calibration should be used, when input frames are already rectified (e.g. sourced from recordings on the host)
function
void loadMeshFiles(const dai::Path & pathLeft, const dai::Path & pathRight)
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 With a 1280x800 resolution and the default (16,16) step, the required mesh size is:width: 1280 / 16 + 1 = 81height: 800 / 16 + 1 = 51
function
void loadMeshData(const std::vector< std::uint8_t > & dataLeft, const std::vector< std::uint8_t > & dataRight)
Specify mesh calibration data for 'left' and 'right' inputs, as vectors of bytes. Overrides useHomographyRectification behavior. See
function
void setMeshStep(int width, int height)
Set the distance between mesh points. Default: (16, 16)
function
void setInputResolution(int width, int height)
Specify input resolution sizeOptional if MonoCamera exists, otherwise necessary
function
void setInputResolution(std::tuple< int, int > resolution)
Specify input resolution sizeOptional if MonoCamera exists, otherwise necessary
function
void setOutputSize(int width, int height)
Specify disparity/depth output resolution size, implemented by scaling.Currently only applicable when aligning to RGB camera
function
void setOutputKeepAspectRatio(bool keep)
Specifies whether the frames resized by
function
void setMedianFilter(dai::MedianFilter median)
Parameters
  • median: Set kernel size for disparity/depth median filtering, or disable
function
void setDepthAlign(Properties::DepthAlign align)
Parameters
  • align: Set the disparity/depth alignment: centered (between the 'left' and 'right' inputs), or from the perspective of a rectified output stream
function
void setDepthAlign(CameraBoardSocket camera)
Parameters
  • camera: Set the camera from whose perspective the disparity/depth will be aligned
function
void setConfidenceThreshold(int confThr)
Confidence threshold for disparity calculation
Parameters
  • confThr: Confidence threshold value 0..255
function
void setRectification(bool enable)
Rectify input images or not.
function
void setLeftRightCheck(bool enable)
Computes and combines disparities in both L-R and R-L directions, and combine them.For better occlusion handling, discarding invalid disparity values
function
void setSubpixel(bool enable)
Computes disparity with sub-pixel interpolation (3 fractional bits by default).Suitable for long range. Currently incompatible with extended disparity
function
void setSubpixelFractionalBits(int subpixelFractionalBits)
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.
function
void setExtendedDisparity(bool enable)
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
function
void setRectifyEdgeFillColor(int color)
Fill color for missing data at frame edges
Parameters
  • color: Grayscale 0..255, or -1 to replicate pixels
function
void setRectifyMirrorFrame(bool enable)
DEPRECATED function. It was removed, since rectified images are not flipped anymore. Mirror rectified frames, only when LR-check mode is disabled. Default A side effect of this option is disparity alignment to the perspective of left or right input:
Parameters
  • enable: True for normal disparity/depth, otherwise mirrored
function
void setOutputRectified(bool enable)
Enable outputting rectified frames. Optimizes computation on device side when disabled. DEPRECATED. The outputs are auto-enabled if used
function
void setOutputDepth(bool enable)
Enable outputting 'depth' stream (converted from disparity). In certain configurations, this will disable 'disparity' stream. DEPRECATED. The output is auto-enabled if used
function
void setRuntimeModeSwitch(bool enable)
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.
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
function
float getMaxDisparity()
Useful for normalization of the disparity map.
Returns
Maximum disparity value that the node can return
function
void setPostProcessingHardwareResources(int numShaves, int numMemorySlices)
Specify allocated hardware resources for stereo depth. Suitable only to increase post processing runtime.
Parameters
  • numShaves: Number of shaves.
  • numMemorySlices: Number of memory slices.
function
void setDefaultProfilePreset(PresetMode mode)
Sets a default preset based on specified option.
Parameters
  • mode: Stereo depth preset mode
function
void setFocalLengthFromCalibration(bool focalLengthFromCalibration)
Whether to use focal length from calibration intrinsics or calculate based on calibration FOV. Default value is true.
function
void useHomographyRectification(bool 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.
Parameters
  • 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.
function
void enableDistortionCorrection(bool enableDistortionCorrection)
Equivalent to useHomographyRectification(!enableDistortionCorrection)
function
void setBaseline(float baseline)
Override baseline from calibration. Used only in disparity to depth conversion. Units are centimeters.
function
void setFocalLength(float focalLength)
Override focal length from calibration. Used only in disparity to depth conversion. Units are pixels.
function
void setDisparityToDepthUseSpecTranslation(bool specTranslation)
Use baseline information for disparity to depth conversion from specs (design data) or from calibration. Default: true
function
void setRectificationUseSpecTranslation(bool specTranslation)
Obtain rectification matrices using spec translation (design data) or from calibration in calculations. Should be used only for debugging. Default: false
function
void setDepthAlignmentUseSpecTranslation(bool specTranslation)
Use baseline information for depth alignment from specs (design data) or from calibration. Default: true
function
void setAlphaScaling(float alpha)
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.
enum

std::uint32_t PresetMode

Preset modes for stereo depth.
enumerator
HIGH_ACCURACY
Prefers accuracy over density. More invalid depth values, but less outliers.
enumerator
HIGH_DENSITY
Prefers density over accuracy. Less invalid depth values, but more outliers.
class

dai::node::Sync

variable
InputMap inputs
A map of inputs
variable
Output out
Output message of type MessageGroup
function
Sync(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
Sync(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setSyncThreshold(std::chrono::nanoseconds syncThreshold)
Set the maximal interval between messages in the group
Parameters
  • syncThreshold: Maximal interval between messages in the group
function
void setSyncAttempts(int syncAttempts)
Set the number of attempts to get the specified max interval between messages in the group
Parameters
  • 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
function
std::chrono::nanoseconds getSyncThreshold()
Gets the maximal interval between messages in the group in milliseconds
function
int getSyncAttempts()
Gets the number of sync attempts
class

dai::node::SystemLogger

#include SystemLogger.hpp
variable
Output out
Outputs SystemInformation message that carries various system information like memory and CPU usage, temperatures, ...
function
SystemLogger(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
SystemLogger(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setRate(float hz)
Specify logging rate, at which messages will be sent out
Parameters
  • hz: Sending rate in hertz (messages per second)
function
float getRate()
Gets logging rate, at which messages will be sent out
class

dai::node::ToF

#include ToF.hpp
variable
ToFConfig initialConfig
Initial config to use for depth calculation.
variable
Input inputConfig
Input ToF message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
variable
Input input
Input raw ToF data. Default queue is blocking with size 8.
variable
Output depth
Outputs ImgFrame message that carries decoded depth image.
variable
Output amplitude
Outputs ImgFrame message that carries amplitude image.
variable
Output intensity
Outputs ImgFrame message that carries intensity image.
variable
Output phase
Outputs ImgFrame message that carries phase image, useful for debugging. float32 type.
function
ToF(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
Constructs ToF node.
function
ToF(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
ToF & setNumShaves(int numShaves)
Specify number of shaves reserved for ToF decoding.
function
ToF & setNumFramesPool(int numFramesPool)
Specify number of frames in output pool
Parameters
  • numFramesPool: Number of frames in output pool
class

dai::node::UVC

#include UVC.hpp
variable
Input input
Input for image frames to be streamed over UVCDefault queue is blocking with size 8
function
UVC(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
UVC(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setGpiosOnInit(std::unordered_map< int, int > list)
function
void setGpiosOnStreamOn(std::unordered_map< int, int > list)
function
void setGpiosOnStreamOff(std::unordered_map< int, int > list)
class

dai::node::VideoEncoder

#include VideoEncoder.hpp
variable
Input input
Input for NV12 ImgFrame to be encoded Default queue is blocking with size set by 'setNumFramesPool' (4).
variable
Output bitstream
Outputs ImgFrame message that carries BITSTREAM encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with out.
variable
Output out
Outputs EncodedFrame message that carries encoded (MJPEG, H264 or H265) frame data. Mutually exclusive with bitstream.
function
VideoEncoder(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
VideoEncoder(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setDefaultProfilePreset(float fps, Properties::Profile profile)
Sets a default preset based on specified frame rate and profile
Parameters
  • fps: Frame rate in frames per second
  • profile: Encoding profile
function
void setDefaultProfilePreset(int width, int height, float fps, Properties::Profile profile)
Sets a default preset based on specified input size, frame rate and profile
Parameters
  • width: Input frame width
  • height: Input frame height
  • fps: Frame rate in frames per second
  • profile: Encoding profile
function
void setDefaultProfilePreset(std::tuple< int, int > size, float fps, Properties::Profile profile)
Sets a default preset based on specified input size, frame rate and profile
Parameters
  • size: Input frame size
  • fps: Frame rate in frames per second
  • profile: Encoding profile
function
void setNumFramesPool(int frames)
Set number of frames in pool
Parameters
  • frames: Number of pool frames
function
int getNumFramesPool()
Get number of frames in pool
Returns
Number of pool frames
function
void setRateControlMode(Properties::RateControlMode mode)
function
void setProfile(Properties::Profile profile)
function
void setProfile(std::tuple< int, int > size, Properties::Profile profile)
function
void setProfile(int width, int height, Properties::Profile profile)
function
void setBitrate(int bitrate)
function
void setBitrateKbps(int bitrateKbps)
function
void setKeyframeFrequency(int freq)
Set keyframe frequency. Every Nth frame a keyframe is inserted.Applicable only to H264 and H265 profilesExamples:
  • 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
function
void setNumBFrames(int numBFrames)
function
void setQuality(int quality)
Set quality for [M]JPEG profile
Parameters
  • quality: Value between 0-100%. Approximates quality
function
void setLossless(bool lossless)
Set lossless mode. Applies only to [M]JPEG profile
Parameters
  • lossless: True to enable lossless jpeg encoding, false otherwise
function
void setFrameRate(float frameRate)
Sets expected frame rate
Parameters
  • frameRate: Frame rate in frames per second
function
void setMaxOutputFrameSize(int maxFrameSize)
Specifies maximum output encoded frame size
function
Properties::RateControlMode getRateControlMode()
function
Properties::Profile getProfile()
function
int getBitrate()
function
int getBitrateKbps()
function
int getKeyframeFrequency()
function
int getNumBFrames()
function
int getQuality()
function
std::tuple< int, int > getSize()
function
int getWidth()
function
int getHeight()
function
float getFrameRate()
function
bool getLossless()
function
int getMaxOutputFrameSize()
class

dai::node::Warp

#include Warp.hpp
variable
Input inputImage
Input image to be modified Default queue is blocking with size 8
variable
Output out
Outputs ImgFrame message that carries warped image.
function
Warp(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
Warp(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setOutputSize(std::tuple< int, int > size)
Sets output frame size in pixels
Parameters
  • size: width and height in pixels
function
void setOutputSize(int width, int height)
function
void setWarpMesh(const std::vector< Point2f > & meshData, int width, int height)
Set a custom warp mesh
Parameters
  • meshData: 2D plane of mesh points, starting from top left to bottom right
  • width: Width of mesh
  • height: Height of mesh
function
void setWarpMesh(const std::vector< std::pair< float, float >> & meshData, int width, int height)
function
void setNumFramesPool(int numFramesPool)
Specify number of frames in pool.
Parameters
  • numFramesPool: How many frames should the pool have
function
void setMaxOutputFrameSize(int maxFrameSize)
Specify maximum size of output image.
Parameters
  • maxFrameSize: Maximum frame size in bytes
function
void setHwIds(std::vector< int > ids)
Specify which hardware warp engines to use
Parameters
  • ids: Which warp engines to use (0, 1, 2)
function
std::vector< int > getHwIds()
function
void setInterpolation(dai::Interpolation interpolation)
Specify which interpolation method to use
Parameters
  • interpolation: type of interpolation
function
dai::Interpolation getInterpolation()
class

dai::node::XLinkIn

#include XLinkIn.hpp
variable
Output out
Outputs message of same type as send from host.
function
XLinkIn(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
XLinkIn(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setStreamName(const std::string & name)
Specifies XLink stream name to use.The name should not start with double underscores '__', as those are reserved for internal use.
Parameters
  • name: Stream name
function
void setMaxDataSize(std::uint32_t maxDataSize)
Set maximum message size it can receive
Parameters
  • maxDataSize: Maximum size in bytes
function
void setNumFrames(std::uint32_t numFrames)
Set number of frames in pool for sending messages forward
Parameters
  • numFrames: Maximum number of frames in pool
function
std::string getStreamName()
function
std::uint32_t getMaxDataSize()
function
std::uint32_t getNumFrames()
class

dai::node::XLinkOut

#include XLinkOut.hpp
variable
Input input
Input for any type of messages to be transferred over XLink streamDefault queue is blocking with size 8
function
XLinkOut(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId)
function
XLinkOut(const std::shared_ptr< PipelineImpl > & par, int64_t nodeId, std::unique_ptr< Properties > props)
function
void setStreamName(const std::string & name)
Specifies XLink stream name to use.The name should not start with double underscores '__', as those are reserved for internal use.
Parameters
  • name: Stream name
function
void setFpsLimit(float fps)
Specifies a message sending limit. It's approximated from specified rate.
Parameters
  • fps: Approximate rate limit in messages per second
function
void setMetadataOnly(bool metadataOnly)
Specify whether to transfer only messages attributes and not buffer data
function
std::string getStreamName()
function
float getFpsLimit()
function
bool getMetadataOnly()
namespace

dai::utility

function
std::uint32_t checksum(const void * buffer, std::size_t size, uint32_t prevChecksum)
Simple hash function - djb2
Parameters
  • buffer: Pointer to buffer of data to hash
  • size: Size of buffer in bytes
  • prevChecksum: Previous checksum - useful for doing hash on blocks of data
function
std::uint32_t checksum(const void * buffer, std::size_t size)
Simple hash function - djb2
Parameters
  • buffer: Pointer to buffer of data to hash
  • size: Size of buffer in bytes
inline function
bool serialize(const T & obj, std::vector< std::uint8_t > & data)
inline function
bool deserialize(const std::uint8_t * data, std::size_t size, T & obj)
inline function
bool serialize(const T & obj, std::vector< std::uint8_t > & data, SerializationType type)
inline function
std::vector< std::uint8_t > serialize(const T & obj, SerializationType type)
inline function
bool deserialize(const std::uint8_t * data, std::size_t size, T & obj, SerializationType type)
inline function
bool deserialize(const std::vector< std::uint8_t > & data, T & obj, SerializationType type)
inline function
std::vector< std::uint8_t > serialize(const T & obj)
inline function
bool deserialize(const std::vector< std::uint8_t > & data, T & obj)
inline function
bool serialize(const T & obj, std::vector< std::uint8_t > & data)
inline function
std::vector< std::uint8_t > serialize(const T & obj)
inline function
bool deserialize(const std::uint8_t * data, std::size_t size, T & obj)
inline function
bool deserialize(const std::vector< std::uint8_t > & data, T & obj)
class

dai::utility::VectorWriter

inline function
VectorWriter(Args &&... args)
function
VectorWriter(const VectorWriter &)
function
VectorWriter & operator=(const VectorWriter &)
inline function
nop::Status< void > Prepare(std::size_t)
inline function
nop::Status< void > Write(std::uint8_t byte)
inline function
nop::Status< void > Write(const void * begin, const void * end)
inline function
nop::Status< void > Skip(std::size_t padding_bytes, std::uint8_t padding_value)
inline function
const std::vector< std::uint8_t > & ref()
inline function
std::vector< std::uint8_t > & ref()
inline function
std::vector< std::uint8_t > && take()