class XLinkIn
Canonical

depthai.XLinkIn

XLinkIn节点。通过XLink接收消息。

方法

getMaxDataSize(self)

获取最大消息大小(以字节为单位)

getNumFrames(self)

获取池中的帧数

getStreamFrames(self)

获取流名称

setMaxDataSize(self,maxDataSize)

设置可以接收的最大数据大小

setNumFrames(self,numFrames)

设置池中用于转发消息的帧数

setStreamFrame(self,streamName)

指定要使用的XLink流名称。

属性

out

输出与主机发送相同类型的消息。

getMaxDataSize(self: depthai.XLinkIn) int

获取最大消息大小(以字节为单位)

getNumFrames(self: depthai.XLinkIn) int

获取池中的帧数

getStreamName(self: depthai.XLinkIn) str

获取流名称

out()

输出与主机发送相同类型的消息。

setStreamName(self: depthai.XLinkIn, streamName: string)

指定要使用的XLink流名称。

该名称不应以双下划线“ __”开头,因为保留给内部使用。

参数name:

流名称

setMaxDataSize(self: depthai.XLinkIn, maxDataSize: int)

设置可以接收的最大邮件大小

参数maxDataSize:

最大大小(以字节为单位)

setNumFrames(self: depthai.XLinkIn, numFrames: int)

设置池中用于转发消息的帧数。

参数numFrames:

池中的最大帧数

class XLinkOut
Canonical

depthai.XLinkOut

XLinkOut节点。通过XLink发送消息。

方法

getFpsLimit(self)

每秒获取消息中的速率限制

getMetadataOnly(self)

获取是否仅传输消息属性而不传输数据

getStreamName(self)

获取流名称

setFpsLimit(self,fpsLimit)

指定消息发送限制

setMetadataOnly(self,arg0)

指定是否仅传输消息属性,而不传输缓冲区数据

setStreamName(self,streamName)

指定要使用的XLink流名称。

属性

input

通过XLink流传输的任何类型的消息的输入

getFpsLimit(self: depthai.XLinkOut) float

每秒获取消息中的速率限制

getMetadataOnly(self: depthai.XLinkOut) bool

获取是否仅传输消息属性而不传输数据

getStreamName(self: depthai.XLinkOut) str

获取流名称

input()

通过XLink流传输的任何类型的消息的输入

默认队列被阻止,大小为8

setStreamName(self: depthai.XLinkOut, streamName: str)

指定要使用的XLink流名称。

该名称不应以双下划线“ __”开头,因为保留给内部使用。

参数name:

流名称

setFpsLimit(self: depthai.XLinkOut, fpsLimit: float)

指定消息发送限制。它是从指定比率近似得出的。

参数fps:

每秒消息中的近似速率限制

setMetadataOnly(self: depthai.arg0: bool)

指定是否仅传输消息属性,而不传输缓冲区数据

class XLinkDeviceState
Canonical

depthai.XLinkDeviceState

成员

X_LINK_ANY_STATE

X_LINK_BOOTED

X_LINK_UNBOOTED

X_LINK_BOOTLOADER

属性

name
class XLinkPlatform
Canonical

depthai.XLinkPlatform

成员

X_LINK_ANY_PLATFORM

X_LINK_MYRIAD_2

X_LINK_MYRIAD_X

属性

name
class XLinkProtocol
Canonical

depthai.XLinkProtocol

成员

X_LINK_USB_VSC

X_LINK_USB_CDC

X_LINK_PCIE

X_LINK_IPC

X_LINK_NMB_OF_PROTOCOLS

X_LINK_ANY_PROTOCOL

属性

name
class ColorCamera
Canonical

depthai.ColorCamera

ColorCamera节点。与颜色传感器一起使用。

Inputs

inputConfig

可链接到 ImageManipConfig,ImageManipConfig消息的输入, 允许修改裁剪区域,水平翻转,帧数据类型等。默认队列是非阻塞的,大小为8。

inputControl

适用于传感器的初始控制选项,可链接到 CameraControl,CameraControl消息的输入, 允许将信号发送到相机,例如捕获静止图像。默认队列是非阻塞的,大小为8。

Outputs

video

彩色摄像机视频流NV12编码(YUV420,UV平面交错)输出,适用于VideoEncoder

preview

彩色摄像机视频流按比例缩放至预览大小,可使用 setPreviewSize() ,输出ImgFrame消息,该消息携带BGR / RGB平面/交错编码帧数据。

适用于NeuralNetwork节点。

still

彩色摄像机输出,经过NV12编码(YUV420,UV平面交错),当从 inputControl 输入发送“拍摄静止”命令时捕获。

方法

getCamId(self: depthai.ColorCamera) int

获取使用的摄像头,彩色相机的ID为0

setCamId(self: depthai.ColorCamera, arg0: int)

设置使用的摄像头 colorcamera的ID为0

Warning

getCamId/setCamId最新版depthai已不推荐使用,请使用以下两种方法。

setBoardSocket(boardSocket: CameraBoardSocket)

将摄像机插槽分配给节点

getBoardSocket() CameraBoardSocket

检索要使用的板卡插槽

setColorOrder(colorOrder: ColorCameraProperties.ColorOrder)

设置框架的颜色顺序

getColorOrder() ColorCameraProperties.ColorOrder

获取预览输出帧的颜色顺序。RGB或BGR。

setFp16(fp16: bool)

强制帧值为FP16格式

getFp16() bool

获取预览输出帧的fp16(0..255)数据

setFps(fps: float)

限制节点的FPS,从而允许例如减少此节点产生的帧数量

getFps() float

获取相机应产生帧的速率

getImageOrientation(self: depthai.ColorCamera) CameraImageOrientation

获取相机图像方向

setImageOrientation(self: depthai.ColorCamera, boardSocket: CameraImageOrientation)

设置相机图像方向

getInterleaved(self: depthai.ColorCamera) bool

获取预览输出帧的平面或交错数据

setInterleaved(self: depthai.ColorCamera, interleaved: bool)

设置预览输出帧的平面或交错数据

setPreviewSize(width: int, height: int)

设置所需的预览尺寸,可用作 preview 输出

getPreviewSize() Tuple[int, int]

以元组的形式返回先前使用 setPreviewSize() 设置的预览大小

getPreviewWidth() int

返回先前使用 setPreviewSize() 设置的预览宽度

getPreviewHeight() int

返回先前使用 setPreviewSize() 设置的预览的高度

setVideoSize(width: int, height: int)

设置所需的视频尺寸,可用作 video 输出

getVideoSize() Tuple[int, int]

返回先前使用 setVideoSize() 设置的视频尺寸

getVideoWidth() int

返回先前使用 setVideoSize() 设置的视频的宽度

getVideoHeight() int

返回先前使用 setVideoSize() 设置的视频的高度

setStillSize()

设置 still 输出产生的所需图像尺寸

getStillSize()

返回先前使用 setStillSize() 设置的框架尺寸

getStillWidth()

返回先前使用 setStillSize() 设置的帧的宽度

getStillHeight()

返回先前使用 setStillSize() 设置的框架的高度

setResolution(resolution: ColorCameraProperties.SensorResolution)

设置相机传感器分辨率,确定可以从该节点获得的最大分辨率

getResolution() ColorCameraProperties.SensorResolution

返回先前使用 setResolution() 设置的传感器分辨率

getResolutionSize() Tuple[int, int]

返回传感器分辨率尺寸

getResolutionWidth() int

返回传感器分辨率宽度

getResolutionHeight() int

返回传感器分辨率高度

sensorCenterCrop()

从原始传感器分辨率 (使用设置 setResolution())启用中心裁切

setSensorCrop(x: float, y: float)

将范围内的值设置为裁剪参数,确定裁剪框的大小 [0, 1]

getSensorCrop() Tuple[float, float]

返回以前使用 setSensorCrop() 设置的传感器裁剪集的x和y参数

getSensorCropX() float

返回以前使用 setSensorCrop() 设置的传感器裁剪集的x参数

getSensorCropY() float

返回以前使用 setSensorCrop() 设置的传感器裁剪集的y参数

setWaitForConfigInput(wait: bool)

如果设置为 True, 则仅当配置信息到达时,才会处理来自摄像机传感器的帧并将其发送到输出

getWaitForConfigInput() bool

返回先前使用 setWaitForConfigInput() 设置的值,如果等待inputConfig消息,则为true,否则为false

setPreviewKeepAspectRatio(keep: bool)

如果设置为 True, preview 则将裁剪输出并调整其大小以保留相机分辨率的h / w比例。否则,图像将被压缩到任一方向,以实现使用指定的精确输出 setPreviewSize()

getPreviewKeepAspectRatio() bool

返回先前使用 setPreviewKeepAspectRatio() 设置的值,预览保持纵横比选项

class MonoCamera
Canonical

depthai.MonoCamera

MonoCamera节点。与灰度传感器一起使用。

Outputs

out

输出ImgFrame消息,该消息携带RAW8编码的(灰度)帧数据。

适合使用StereoDepth节点。

initialControl

适用于传感器的初始控制选项

inputControl

CameraControl消息的输入,可以在运行时中修改摄像机参数默认队列被阻止,大小为8

方法

getCamId(self: depthai.MonoCamera) int

获取使用的摄像头id, 左边灰度相机的ID为1,右边灰度相机的ID为2

setCamId(self: depthai.ColorCamera, arg0: int)

设置使用的摄像头id, 左边灰度相机的ID为1,右边灰度相机的ID为2

Warning

getCamId/setCamId最新版depthai已不推荐使用,请使用以下两种方法。

setBoardSocket()

设置要使用的板卡插槽

getBoardSocket()

检索要使用的板卡插槽

getImageOrientation(self: depthai.ColorCamera) CameraImageOrientation

获取相机图像方向

setImageOrientation(self: depthai.ColorCamera, boardSocket: CameraImageOrientation)

设置相机图像方向

setResolution(resolution: MonoCameraProperties.SensorResolution)

设置传感器分辨率

getResolution() MonoCameraProperties.SensorResolution

获取传感器分辨率

setFps(fps: float)

设置相机产生帧的速率,每秒帧率。

getFps() float

获取相机应产生帧的速率,每秒帧率。

getResolutionSize() Tuple[int, int]

获取传感器分辨率大小

getResolutionWidth() int

获取传感器分辨率宽度

getResolutionHeight() int

获取传感器分辨率高度

class NNdata
Canonical

depthai.NNData

NNData消息。承载张量及其元数据

方法

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

添加的所有图层的名称

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

所有图层及其信息

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

便利功能,可从第一层FP16张量中检索浮点值,float

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

便利功能,可从第一层张量中检索INT32值,INT32数据

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

便捷功能,可从第一层检索U8数据,U8二进制数据

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

检索层张量信息

name:

图层名称

datatype:

输出该层的张量信息,如果存在图层则为true,否则为false

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

检索图层张量的数据类型

name:

图层名称,U8二进制数据

datatype:

层张量的数据类型,如果存在图层则为true,否则为false

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

便利功能,可从FP16张量张量中检索浮点值

name:

图层名称,U8二进制数据

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

便利功能,可从层张量中检索INT32值

name:

图层名称,U8二进制数据

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

便捷功能,可从图层中检索U8数据

name:

图层名称,U8二进制数据

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

检查给定的图层是否存在

name:

图层名称,如果存在图层则为true,否则为false

setLayer(*args, **kwargs)

重载功能。

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

设置数据类型为U8的图层。

参数name:

图层名称

参数data:

要存储的数据

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

设置数据类型为U8的图层。整数被强制转换为字节。

参数name:

图层名称

参数data:

要存储的数据

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

设置数据类型为FP16的图层。浮点值将转换为FP16。

参数name:

图层名称

参数data:

要存储的数据

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

设置数据类型为FP16的图层。将双精度值转换为FP16。

参数name:

图层名称

参数data:

要存储的数据

class NeuralNetwork
Canonical

depthai.NeuralNetwork

NeuralNetwork节点。对输入数据进行神经推理。

input

输入消息,其中包含要推论为默认队列的数据,大小为5

out

输出带有推断结果的NNData消息

passthrough

执行推断的直通消息。

适用于将输入队列设置为非阻塞行为的情况。

方法

setBlobPath(path: str)

将网络Blob加载到资产中,并在管道启动后使用。

如果文件不存在或不是有效的网络Blob,则抛出该异常。

参数path:

神经网络模型文件(.blob)的路径

setNumPoolFrames(numFrames: int)

指定池中可使用多少帧

参数numFrames:

池中将有多少帧

setNumInferenceThreads(self: depthai.NeuralNetwork, numThreads: int)

节点应使用多少个线程来运行网络。

参数numThreads:

专用于该节点的线程数

setNumNCEPerInferenceThread(self: depthai.NeuralNetwork, numNCEPerThread: int)

一个线程应使用多少个神经计算引擎进行推理

参数numNCEPerThread:

每个线程的NCE数量

class Node
Canonical

depthai.Node

抽象节点

属性

id

节点编号

classes

Connection:

输入和输出之间的连接

Id()

节点标识符。对于单个管道中的每个节点都是唯一的

方法

getAssets(self: depthai.Node) List[depthai.Asset]

检索所有节点资产

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

检索所有节点输入

getName(self: depthai.Node) str

检索节点名称

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

检索所有节点输出

class OpenVINO
Canonical

depthai.OpenVINO

支持与OpenVINO相关的基本操作,例如神经网络Blob的版本识别,…

classes*

Version()

OpenVINO版本支持的版本信息

成员

VERSION_2020_1

VERSION_2020_2

VERSION_2020_3

VERSION_2020_4

VERSION_2021_1

VERSION_2021_2

属性

name

方法

static areVersionsBlobCompatible(v1: dai::OpenVINO::Version, v2: dai::OpenVINO::Version) -> bool

检查两个Blob版本是否兼容

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

返回给定的blob版本最新受支持的版本。

参数majorVersion:

OpenVINO blob的主要版本

参数minorVersion:

OpenVINO blob的次要版本

static getVersionName(version: dai::OpenVINO::Version) -> str

返回给定版本的字符串表示形式

参数version:

OpenVINO版本

static getVersions() -> List[dai::OpenVINO::Version]

支持的版本

static parseVersionName(versionString: str) -> dai::OpenVINO::Version

从字符串表示形式创建Version。如果不可能,则抛出。

参数versionString:

版本为字符串

class SPIOut
Canonical

depthai.SPIOut

SPIOut节点。通过SPI发送消息。

属性

input

通过SPI流传输的任何类型消息的输入

默认队列被阻止,大小为8

setBusId(self: depthai.SPIOut, id: int)

指定要使用的SPI总线号

参数id:

SPI总线ID

setStreamName(self: depthai.SPIOut, name: str)

指定节点将通过其发送数据的流名称

name:

流名称

class Size2f

方法

__init__ (*args, **kwargs)

重载功能。

属性

height

width

__init__(*args, **kwargs)

重载功能。

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

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

height
width
class SpatialDetectionNetwork

Bases: DetectionNetwork

SpatialDetectionNetwork节点。对输入图像进行神经推理并计算空间位置数据。

Properties

别名 SpatialDetectionNetworkProperties

方法

__init__ (* args,** kwargs)

初始化self。

setBoundingBoxScaleFactor (self,scaleFactor)

指定检测到的边界框的比例因子。

setDepthLowerThreshold (self,lowerThreshold)

为深度值指定以毫米为单位的下限阈值,该阈值将用于计算空间数据

setDepthUpperThreshold (slef,upperThreshold)

指定用于计算空间数据的深度值(以毫米为单位)的上限

属性

boundingBoxMapping

输出检测到的边界框相对于深度图的映射

input

输入消息,其中包含要推论为默认队列的数据,大小为5

inputDepth

具有深度数据的输入消息,用于检索有关检测到的对象的空间信息默认队列为大小为4的非阻塞对象

out

输出ImgDetections消息,其中包含已解析的检测结果。

passthrough

执行推断的直通消息。

passthroughDepth

深度消息的直通消息,在该消息上执行了空间位置计算。

Properties

别名 SpatialDetectionNetworkProperties

__init__ (* args,** kwargs)

初始化self。

属性

depthThresholds

detectedBBScaleFactor

__init__(*args, **kwargs)

初始化self。有关详细参数,请参见help(type(self))。

boundingBoxMapping

输出检测到的边界框相对于深度图的映射

适用于在深度框架上显示重新映射的边界框时

input

输入消息,其中包含要推论为默认队列的数据,大小为5

inputDepth

具有深度数据的输入消息,用于检索有关检测到的对象的空间信息默认队列为大小为4的非阻塞对象

out

输出ImgDetections消息,其中包含已解析的检测结果。

passthrough

执行推断的直通消息。

适用于将输入队列设置为非阻塞行为的情况。

passthroughDepth

深度消息的直通消息,在该消息上执行了空间位置计算。

适用于将输入队列设置为非阻塞行为的情况。

setBoundingBoxScaleFactor(self: depthai.SpatialDetectionNetwork, scaleFactor: float) None

指定检测到的边界框的比例因子。

scaleFactor

比例因子必须在(0,1]范围内。

setDepthLowerThreshold(self: depthai.SpatialDetectionNetwork, lowerThreshold: int) None

为深度值指定以毫米为单位的下限阈值,该阈值将用于计算空间数据

lowerThreshold

LowerThreshold必须在[0,upperThreshold]范围内,并且小于upperThreshold。

setDepthUpperThreshold(self: depthai.SpatialDetectionNetwork, upperThreshold: int) None

指定用于计算空间数据的深度值(以毫米为单位)的上限

upperThreshold

UpperThreshold必须在时间间隔内(lowerThreshold,65535]。

class SpatialImgDetection

空间图像检测结构

包含图像检测结果以及空间位置数据。

方法

__init__ (self)

初始化self。

属性

spatialCoordinates

__init__(self: depthai.SpatialImgDetection) None
spatialCoordinates
class SpatialImgDetections

SpatialImgDetections消息。携带检测结果和空间位置数据

方法

__init__ (self)

初始化self。

属性

detections

__init__(self: depthai.SpatialImgDetections) None
detections
class SpatialLocationCalculator

SpatialLocationCalculator节点。在深度图上的一组ROI上计算空间位置数据。

Properties

别名 SpatialLocationCalculatorProperties

方法

__init__ (* args,** kwargs)

初始化self。

setWaitForConfigInput (self, wait)

指定是否等到配置消息到达inputConfig Input为止。

属性

initialConfig

计算空间位置数据时要使用的初始配置。

inputConfig

输入SpatialLocationCalculatorConfig消息,可以在运行时修改参数。

inputDepth

具有深度数据的输入消息,用于检索有关检测到的对象的空间信息。

out

输出带有空间位置结果的SpatialLocationCalculatorData消息。

passthroughDepth

执行计算的直通消息。

Properties

别名 SpatialLocationCalculatorProperties

__init__ (* args,** kwargs)

初始化self。

inputConfigSync

roiConfig

__init__(*args, **kwargs)

初始化self。有关详细参数,请参见help(type(self))。

initialConfig

计算空间位置数据时要使用的初始配置。

inputConfig

入SpatialLocationCalculatorConfig消息,可以在运行时修改参数。默认队列是非阻塞的,大小为4。

inputDepth

具有深度数据的输入消息,用于检索有关检测到的对象的空间信息。默认队列是非阻塞的,大小为4。

out

输出带有空间位置结果的SpatialLocationCalculatorData消息。

passthroughDepth

执行计算的直通消息。适用于将输入队列设置为非阻塞行为的情况。

setWaitForConfigInput(self: depthai.SpatialLocationCalculator, wait: bool) None

指定是否等到配置消息到达inputConfig Input为止。

wait

等待配置消息为true,否则为false。

class SpatialLocationCalculatorConfig

SpatialLocationCalculatorConfig消息。进行ROI(感兴趣区域)和深度计算的阈值

__init__ (self)

addROI (self,ROI)

向配置数据添加新的ROI。

getConfigData (slef)

检索SpatialLocationCalculator的配置数据

setROIs (self, ROIs)

将ROI的向量设置为配置数据。

__init__(self: depthai.SpatialLocationCalculatorConfig) None
addROI(self: depthai.SpatialLocationCalculatorConfig, ROI: depthai.SpatialLocationCalculatorConfigData) None

向配置数据添加新的ROI。

roi

ROI(感兴趣区域)的配置参数

getConfigData(self: depthai.SpatialLocationCalculatorConfig) List[depthai.SpatialLocationCalculatorConfigData]

检索SpatialLocationCalculator的配置数据

Returns: OI(感兴趣区域)的配置参数向量

setROIs(self: depthai.SpatialLocationCalculatorConfig, ROIs: List[depthai.SpatialLocationCalculatorConfigData]) None

将ROI的向量设置为配置数据。

ROIs

ROI(感兴趣区域)的配置参数向量

class SpatialLocationCalculatorConfigData

方法

__init__ (self)

属性

depthThresholds

roi

__init__(self: depthai.SpatialLocationCalculatorConfigData) None
depthThresholds
roi
class SpatialLocationCalculatorConfigThresholds

空间位置配置阈值结构

包含用于ROI的上下阈值(以毫米为单位)的配置数据。根据深度图计算空间坐标时,超出阈值范围的值将被忽略。

方法

__init__ (self)

属性

lowerThreshold

upperThreshold

__init__(self: depthai.SpatialLocationCalculatorConfigThresholds) None
lowerThreshold
upperThreshold
class SpatialLocationCalculatorData

SpatialLocationCalculatorData消息。携带空间信息(X,Y,Z)及其配置参数

方法

__init__ (self)

getSpatualLocations (self)

检索SpatialLocationCalculatorData的配置数据。

__init__(self: depthai.SpatialLocationCalculatorData) None
getSpatialLocations(self: depthai.SpatialLocationCalculatorData) List[depthai.SpatialLocations]

检索SpatialLocationCalculatorData的配置数据。

Returns: 空间位置数据的矢量,带有空间信息(X,Y,Z)

class SpatialLocationCalculatorProperties

指定SpatialLocationCalculator选项

__init__ (* args,** kwargs)

初始化self。

inputConfigSync

roiConfig

__init__(*args, **kwargs)

初始化self。有关详细参数,请参见help(type(self))。

inputConfigSync
roiConfig
class SpatialLocations

空间位置信息结构

包含配置数据,深度图上计算出的ROI的平均深度。连同空间坐标:相对于深度图中心的x,y,z。单位为毫米。

__init__ (self)

config

depthAverage

depthAveragePixelCount

spatialCoordinates

__init__(self: depthai.SpatialLocations) None
config
depthAverage
depthAveragePixelCount
spatialCoordinates
class ImageManip
Canonical

depthai.ImageManip

ImageManip节点。裁剪,调整大小,变形,…传入图像帧的能力

Inputs

initialConfig

操纵框架时要使用的初始配置

inputConfig

输入ImageManipConfig消息,能够在运行时修改参数默认队列被阻止,大小为8

inputImage

要修改的输入图像默认队列大小为8

Outputs

out

输出带有修改图像的ImgFrame消息。

方法

setCropRect(xmin: float, ymin: float, xmax: float, ymax: float)

仅允许裁剪图像的所需部分

setCenterCrop(ratio: float, whRatio: float)

允许为图像指定任意裁剪。

whRatio 确定裁切部分的宽高比(下图中的白框 whRatio 设置为 1),

ratio 正在确定裁切部分的实际大小(下图中的绿色框 ratio 设置为 0.7)

setResize(w: int, h: int)

将框架调整为指定的宽度和高度

setResizeThumbnail(w: int, h: int, bgRed: int, bgGreen: int, bgBlue: int)

调整框架大小,保留原始长宽比,用指定的颜色填充缺少的空间

setFrameType(type: RawImgFrame.Type)

将输入帧修改为指定的图像帧类型(之一 RawImgFrame.Type)

setHorizontalFlip(flip: bool)

如果设置为 True, 则水平翻转接收的帧

setKeepAspectRatio(keep: bool)

如果设置为 True, 则将裁剪输出并调整其大小以保留输入分辨率的h / w比例。否则,图像将沿任一方向挤压以实现指定的精确输出

setWaitForConfigInput(wait: bool)

如果设置为 True, 则仅在配置信息到达时才处理帧

setNumFramesPool()

指定如果使用者未收到该节点,则该节点将保留多少结果。达到限制后,节点将停止并等待结果被消耗,然后再生成新结果

setMaxOutputFrameSize(maxFrameSize: int)

限制允许作为节点输出发送的最大帧大小

class ImageManipConfig
Canonical

depthai.ImageManipConfig

ImageManipConfig消息。指定图像处理选项,例如:

  • 庄稼

  • 调整大小

方法

getCropXMax(self: depthai.ImageManipConfig) float

作物区域的右下角X坐标

getCropXMin(self: depthai.ImageManipConfig) float

作物区域的左上X坐标

getCropYMax(self: depthai.ImageManipConfig) float

作物区域的右下角Y坐标

getCropYMin(self: depthai.ImageManipConfig) float

作物区域的左上Y坐标

getResizeHeight(self: depthai.ImageManipConfig) int

输出图像高度

getResizeWidth(self: depthai.ImageManipConfig) int

输出图像宽度

isResizeThumbnail(self: depthai.ImageManipConfig) bool

如果设置了调整大小缩略图模式,则为True,否则为False

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

指定居中裁切。

参数ratio:

输入图像与裁切区域之间的比率(0..1)

参数whRatio:

作物区域长宽比-1等于正方形,1.7等于16:9,…

setCropRect(self: depthai.ImageManipConfig, xmin: float, ymin: float, xmax: float, xmax: float)

用具有标准化值(0..1)的矩形指定裁剪

参数xmin:

矩形的左上X坐标

参数ymin:

矩形的左上Y坐标

参数xmax:

矩形的右下X坐标

参数ymax:

矩形的右下角Y坐标

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

指定带有旋转矩形的裁切。可选地作为非规范化坐标

参数rr:

指定作物的旋转矩形

参数normalizedCoords:

如果真实坐标在归一化范围内(0..1),则为绝对坐标

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

指定输出帧的类型。

参数name:

图像类型

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

指定水平翻转

参数flip:

设置为true以启用翻转,否则为false

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

指定是否保持宽高比

setResize(self: depthai.ImageManipConfig, w: int, h: int)

指定输出图像的大小。裁剪阶段后,将拉伸图像以使其适合。

参数w:

宽度(以像素为单位)

参数h:

高度(以像素为单位)

setResizeThumbnail(self: depthai.ImageManipConfig, w: int, h: int, bgRed: int, bgGreen: int, bgBlue: int)

指定输出图像的大小。裁剪阶段后,将通过保留宽高比来调整图像大小。可以选择指定背景。

参数w:

宽度(以像素为单位)

参数h:

高度(以像素为单位)

参数bgRed:

红色成分

参数bgGreem:

绿色成分

参数bgBlue:

蓝色成分

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

指示ImageManip不要从其队列中删除当前图像,并将其用于下一条消息。

参数reuse:

设置为true以启用重用,否则为false

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

指定以度为单位的顺时针旋转

参数deg:

旋转角度

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

指定以弧度为单位的顺时针旋转

参数rad:

弧度旋转

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

指示ImageManip跳过当前图像并等待队列中的下一个图像。

参数skip:

设置为true以跳过当前图像,否则设置为false

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

指定边框像素的填充颜色。例子:

  • setWarpBorderFillColor(255,255,255)->白色

  • setWarpBorderFillColor(0,0,255)->蓝色

参数red:

红色成分

参数greem:

绿色成分

参数blue:

蓝色成分

setWarpBorderReplicatePixels(self: depthai.ImageManipConfig)

指定扭曲复制边框像素

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

通过在绝对坐标或规范坐标中提供4个点来指定变形

参数pt:

4点指定翘曲

参数normalizedCoords:

如果将true pt解释为归一化,则为绝对

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

用3x3矩阵指定变形

参数mat:

3*3矩阵

class ImgDetections
Canonical

depthai.ImgDetections

ImgDetections消息。携带标准化的检测结果

属性

detections

检测量

class LogLevel
Canonical

depthai.LogLevel

成员

TRACE

DEBUG

INFO

WARN

ERR

CRITICAL

OFF

属性

property name
class MobileNetDetectionNetwork
Canonical

depthai.MobileNetDetectionNetwork

MobileNetDetectionNetwork节点。解析MobileNet结果

class YoloDetectionNetwork
Canonical

depthai.YoloDetectionNetwork

YoloDetectionNetwork节点。解析Yolo结果

方法

setAnchorMasks(self: depthai.YoloDetectionNetwork, anchorMasks: Dict[str, List[int]])

设置锚mask

setCoordinateSize(self: depthai.YoloDetectionNetwork, coordinates: int)

设置coordinates大小

setIouThreshold(self: depthai.YoloDetectionNetwork, thresh: float)

设置阈值

setNumClasses(self: depthai.YoloDetectionNetwork, numClasses: int)

设置num类

class StereoDepth
Canonical

depthai.StereoDepth

StereoDepth节点。从左右图像对计算立体视差和深度。

Inputs

left

输入来自左侧灰度相机的帧

right

输入来自右侧灰度相机的帧

Outputs

depth

输出原始的深度框架,使通过调用 setOutputDepth()True. 不能与 disparity: output 一起使用

disparity

输出视差矩阵。不能与 depth

syncedLeft

输出用于深度计算的左框架

syncedRight

输出用于深度计算的右框架

rectifiedLeft

输出左校正帧, 请参见 有关校正的更多信息

rectifiedRight

输出右校正帧, 请参见 有关校正的更多信息

方法

loadCalibrationFile(path: str)

指定要加载用于深度计算的校准文件路径。

参数path:

校准数据。如果为空,则使用EEPROM

loadCalibrationData(data: List[int])

将校准数据指定为字节向量。

参数path:

校准数据。如果为空,则使用EEPROM

setEmptyCalibration()

指定当输入帧已得到纠正(例如,来自主机上的记录的源)时,应使用通过/虚拟校准

setInputResolution(width: int, height: int)

指定 left / right 输入的输入大小。在大多数情况下,不需要调用此功能,当输入帧不是来自单反相机而是直接来自主机时,此功能很有用

setMedianFilter(median: StereoDepthProperties.MedianFilter)

指定在深度计算期间应使用哪个中值滤波器。 StereoDepthProperties.MedianFilter 可能是其中之一

setConfidenceThreshold(confThr: int)

视差计算的置信度阈值

参数confThr:

置信度阈值0..255

setLeftRightCheck(enable: bool)

在深度计算过程中启用左/右检查

setSubpixel(enable: bool)

通过子像素插值(5个小数位)计算视差。

适用于远距离

setExtendedDisparity(enable: bool)

视差范围从96扩大到192,结合了全分辨率和缩小后的图像。

适用于短距离物体

setRectifyEdgeFillColor(color: int)

为边框边缘的缺失数据填充颜色

参数color:

灰度0..255或-1以复制像素

setRectifyMirrorFrame(enable: bool)

启用启动校正帧的镜像

参数enable:

对于正常的视差/深度为真,否则为镜像

setOutputRectified(enable: bool)

启用输出校正的帧。禁用时优化设备端的计算

setOutputDepth(enable: bool)

启用输出“深度”流(从视差转换)。在某些配置中,这将禁用“视差”流

class SystemInformation
Canonical

depthai.SystemInformation

SystemInformation消息。携带内存使用量,CPU使用量和芯片温度。

class SystemLogger
Canonical

depthai.SystemLogger

SystemLogger节点。定期发送系统信息。

属性

out()

输出SystemInformation消息,其中包含各种系统信息,例如内存和CPU使用率,温度等。

方法

setRate(self: depthai.SystemLogger, hz: float)

指定日志记录速率,以该速率将消息发送到输出

参数hz:

发送速率,以赫兹为单位(每秒的消息数)

class VideoEncoder
Canonical

depthai.VideoEncoder

VideoEncoder节点。将帧编码为MJPEG,H264或H265。

Inputs

input

NV12 ImgFrame的输入要编码默认队列被阻塞,其大小由“ setNumFramesPool”(4)设置。

Outputs

bitstream

输出ImgFrame消息,该消息携带BITSTREAM编码的(MJPEG,H264或H265)帧数据。

Methods

setDefaultProfilePreset(*args, **kwargs)

重载功能。

  1. setDefaultProfilePreset(self: depthai.VideoEncoder,width: int,height: int,fps: float,profile: depthai.VideoEncoderProperties.Profile)

根据指定的输入大小,帧频和配置文件设置默认预设

参数width:

输入框宽度

参数height:

输入框高度

参数fps:

帧速率(每秒帧数)

参数profile:

编码配置文件

  1. setDefaultProfilePreset(self: depthai.VideoEncoder,size: Tuple[int,int],fps: float,profile: depthai.VideoEncoderProperties.Profile)

根据指定的输入大小,帧频和配置文件设置默认预设

参数size:

输入框尺寸

参数fps:

帧速率(每秒帧数)

参数profile:

编码配置文件

setNumFramesPool(self: depthai.VideoEncoder, numBFrames: int)

设置要插入的B帧数

getNumFramesPool(self: depthai.VideoEncoder) int

获取池中的帧数

setRateControlMode(self: depthai.VideoEncoder, mode: depthai.VideoEncoderProperties.RateControlMode)

设定速率控制模式

getRateControlMode(self: depthai.VideoEncoder) VideoEncoderProperties.Profile

获取速率控制模式

setProfile(self: depthai.VideoEncoder, width: int, height: int, profile: dai.VideoEncoderProperties.Profile)

设置编码配置文件

getProfile(self: depthai.VideoEncoder) VideoEncoderProperties.Profile

获取资料

setBitrate(self: depthai.VideoEncoder, bitrateKbps: int)

将输出比特率设置为kbps。最终比特率取决于速率控制模式

getBitrate(self: depthai.VideoEncoder) int

获得比特率

setKeyframeFrequency(self: depthai.VideoEncoder, freq: int)

设置关键帧频率。每第N个帧插入一个关键帧。

仅适用于H264和H265配置文件

例子:

  • 30 FPS视频,关键帧频率:30。每1s将插入一个关键帧

  • 60 FPS视频,关键帧频率:180。每3秒钟将插入一个关键帧

getKeyframeFrequency(self: depthai.VideoEncoder) int

获取关键帧频率

setNumBFrames(self: depthai.VideoEncoder, numBFrames: int)

设置要插入的B帧数

getNumBFrames(self: depthai.VideoEncoder) int

获取B帧数

setQuality(self: depthai.VideoEncoder, quality: int)

设置质量,图像质量越大,经过压缩后显示越清晰。

getQuality(self: depthai.VideoEncoder) int

获得质量,图像质量越大,经过压缩后显示越清晰。

getWidth(self: depthai.VideoEncoder) int

获取输入宽度

getHeight(self: depthai.VideoEncoder) int

获取输入高度

getSize(self: depthai.VideoEncoder) Tuple[int, int]

获取输入大小

setFrameRate(self: depthai.VideoEncoder, frameRate: int)

设置预期的帧率

frameRate:

帧速率(每秒帧数)

getFrameRate(self: depthai.VideoEncoder) int

获取帧率

class CameraControl
Canonical

depthai.CameraControl

CameraControl消息指定各种摄像机控制命令,例如:

  • 仍然捕捉

  • 自动对焦

  • 反捆扎

  • 自动白平衡

  • 场景

  • 影响

class

AntiBandingMode

成员:

AutoFocusMode

成员:

AutoWhiteBalanceMode

成员:

EffectMode

成员:

SceneMode

成员:

方法

getCaptureStill(self)

检查是否设置了捕获静止图像的命令

setAntiBandingMode(self, mode)

设置命令以指定自动组合模式

setAutoExposureCompensation(self, compensation)

设置命令以指定自动曝光补偿

setAutoExposureEnable(self)

设置命令以启用自动曝光

setAutoExposureLock(self, lock)

设置命令以指定锁定自动曝光

setAutoExposureRegion(self, startX, startY, …)

设置命令以像素为单位指定自动曝光区域

setAutoFocusMode(self, mode)

设置命令以指定自动对焦模式

setAutoFocusRegion(self, startX, startY, …)

设置命令以像素为单位指定焦点区域

setAutoFocusTrigger(self)

设置命令以触发自动对焦

setAutoWhiteBalanceLock(self, lock)

设置命令以指定自动白平衡锁定

setAutoWhiteBalanceMode(self, mode)

设置命令以指定自动白平衡模式

setBrightness(self, value)

设置命令以指定自动白平衡锁定

setCaptureStill(self, capture)

设置命令以捕获静止图像

setChromaDenoise(self, value)

设置命令以指定色度降噪值

setContrast(self, value)

设置命令以指定自动白平衡锁定

setEffectMode(self, mode)

设置命令以指定效果模式

setLumaDenoise(self, value)

设置命令以指定亮度降噪值

setManualExposure(self, exposureTimeUs, …)

设置命令以手动指定曝光

setManualFocus(self, lensPosition)

设置命令以指定手动对焦位置

setNoiseReductionStrength(self, value)

设置命令以指定降噪强度

setSaturation(self, value)

设置命令以指定饱和度值

setSceneMode(self, mode)

设置命令以指定场景模式

setSharpness(self, value)

设置命令以指定清晰度值

setStartStreaming(self)

设置命令以开始流式传输

setStopStreaming(self)

设置命令以停止流式传输

AntiBandingMode()

成员

OFF

MAINS_50_HZ

MAINS_60_HZ

AUTO

属性

property name
AutoFocusMode()

成员

OFF

AUTO

MACRO

CONTINUOUS_VIDEO

CONTINUOUS_PICTURE

EDOF

属性

property name
AutoWhiteBalanceMode()

成员

OFF

AUTO

INCANDESCENT

FLUORESCENT

WARM_FLUORESCENT

DAYLIGHT

CLOUDY_DAYLIGHT

TWILIGHT

SHADE

属性

property name
EffectMode()

成员

OFF

MONO

NEGATIVE

SOLARIZE

SEPIA

POSTERIZE

WHITEBOARD

BLACKBOARD

AQUA

属性

property name
SceneMode()

成员

UNSUPPORTED

FACE_PRIORITY

ACTION

PORTRAIT

LANDSCAPE

NIGHT

NIGHT_PORTRAIT

THEATRE

BEACH

SNOW

SUNSET

STEADYPHOTO

FIREWORKS

SPORTS

PARTY

CANDLELIGHT

BARCODE

属性

property name
getCaptureStill(self: depthai.CameraControl) bool

检查是否设置了捕获静止图像的命令,如果设置了捕获静止命令,则为True。

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

设置命令以指定自动组合模式

参数mode:

使用自动分组模式

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

设置命令以指定自动曝光补偿

参数compensation:

补偿值在-128..127之间

setAutoExposureEnable(self: depthai.CameraControl, lock: bool)

设置命令以指定锁定自动曝光

参数lock:

启用或禁用自动曝光锁定模式

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

设置命令以像素为单位指定自动曝光区域

参数startX:

区域左上角的X坐标

参数startY:

区域左上角的Y坐标

参数width:

区域宽度

height:

区域高度

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

设置命令以指定自动对焦模式

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

设置命令以像素为单位指定焦点区域

参数startX:

区域左上角的X坐标

参数startY:

区域左上角的Y坐标

参数width:

区域宽度

height:

区域高度

setAutoFocusTrigger(self: depthai.CameraControl)

设置命令以触发自动对焦

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

设置命令以指定自动白平衡锁定

参数lock:

自动白平衡锁定模式启用或禁用

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

设置命令以指定自动白平衡模式

参数mode:

自动白平衡模式使用

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

设置命令以指定自动白平衡锁定

参数lock:

自动白平衡锁定模式启用或禁用

setCaptureStill(self: depthai.CameraControl, 捕获: bool)

设置命令以捕获静止图像

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

设置命令以指定色度降噪值

参数value:

色度降噪

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

设置命令以指定自动白平衡锁定

参数lock:

自动白平衡锁定模式启用或禁用

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

设置命令以指定效果模式

参数mode:

效果模式

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

设置命令以指定亮度降噪值

参数value:

亮度降噪

setManualExposure(: depthai.CameraControl, exposureTimeUs: INT, sensitivityIso: INT)

设置命令以手动指定曝光

参数exposureTimeUs:

曝光时间(以微秒为单位)

参数sensitivityIso:

感光度作为ISO值

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

设置命令以指定手动对焦位置

参数lensPosition:

指定镜头位置0..255

setNoiseReductionStrength(self: depthai.CameraControl, value: int)

设置命令以指定降噪强度

参数value:

降噪强度

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

设置命令以指定饱和度值

参数value:

饱和

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

设置命令以指定场景模式

参数mode:

场景模式

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

设置命令以指定清晰度值

参数value:

清晰度

setStartStreaming(self: depthai.CameraControl)

设置命令以开始流式传输

setStopStreaming(self: depthai.CameraControl)

设置命令以停止流式传输

class CameraBoardSocket
Canonical

depthai.CameraBoardSocket

使用哪个相机插槽。

AUTO表示将由设备做出决定

成员

AUTO

RGB

LEFT

RIGHT

属性

property name
property value
class CameraImageOrientation
Canonical

depthai.CameraImageOrientation

相机传感器图像方向/像素读数。这将显示直接的传感器设置。无法旋转90或270度。

AUTO表示将由设备做出决定(例如,在OAK-1 / megaAI上:ROTATE_180_DEG)。

成员

AUTO

NORMAL

HORIZONTAL_MIRROR

VERTICAL_FLIP

ROTATE_180_DEG

属性

AUTO

HORIZONTAL_MIRROR

NORMAL

ROTATE_180_DEG

VERTICAL_FLIP

name

value

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

depthai.DataInputQueue

通过XLink流访问发送消息

方法

getBlocking(self)

满时获取当前队列行为(最大大小)

getMaxSize(self, arg0)

获取队列的最大大小

getName(self)

获取队列名称

send(*args, **kwargs)

重载功能。

setBlocking(self, blocking)

设置满时的队列行为(maxSize)

setMaxSize(self, maxSize)

设置队列的最大大小

getBlocking(self: depthai.DataInputQueue)

满时获取当前队列行为(最大大小),如果阻塞则为true,否则为false

getMaxSize(self: depthai.DataInputQueue, arg0: int)

获取队列的最大大小,最大队列大小

getName(self: depthai.DataInputQueue)

获取队列名称

send(*args, **kwargs)

重载功能。

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

将消息添加到队列,该消息将被提取并发送到设备。如果“阻止”行为为真,则可以阻止,也可以覆盖最旧的

参数msg:

要添加到队列中的消息

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

将原始消息添加到队列,该消息将被提取并发送到设备。如果“阻止”行为为真,则可以阻止,也可以覆盖最旧的

参数msg:

要添加到队列中的消息

setBlocking(self: depthai.DataInputQueue, 阻塞: bool)

指定是阻止还是覆盖队列中最旧的消息

参数blocking:

指定是阻止还是覆盖队列中最旧的消息

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

设置队列的最大大小

参数maxSize:

指定队列中的最大消息数

class DataOutputQueue
Canonical

depthai.DataOutputQueue

访问接收来自XLink流的消息

方法

addCallback(*args,**kwargs)

重载功能。

get(self)

阻止直到有消息可用。

getAll(self)

阻塞直到队列中至少有一条消息。

getBlocking(self)

满时获取当前队列行为(最大大小)

getMaxSize(self,arg0)

获取队列的最大大小

getName(self)

获取队列名称

has(self)

检查队列前面是否有消息(不为空)

removeCallback(self,callbackId)

删除回调

setBlocking(self,blocking)

设置满时的队列行为(maxSize)

setMaxSize(self,maxSize)

设置队列的最大大小

tryGet(self)

尝试从队列中检索消息。

tryGetAll(self)

尝试检索队列中的所有消息。

addCallback(*args, **kwargs)

重载功能。

  1. addCallback(self: depthai.DataOutputQueue, callback: std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::shared_ptr<dai::ADatatype>)>) -> int

在收到的消息上添加回调

参数callback:

带有队列名称和消息指针的回调函数

  1. addCallback(self: depthai.DataOutputQueue, callback: std::function<void (std::shared_ptr<dai::ADatatype>)>) -> int

在收到的消息上添加回调

参数callback:

带消息指针的回调功能

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

在收到的消息上添加回调

参数callback:

没有任何参数的回调函数

get(self: depthai.DataOutputQueue) depthai.ADatatype

阻止直到有消息可用。

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

阻塞直到队列中至少有一条消息。然后返回队列中的所有消息。

getBlocking(self: depthai.DataOutputQueue) bool

满时获取当前队列行为(最大大小),如果阻塞则为true,否则为false

getMaxSize(self: depthai.DataOutputQueue, arg0: int) int

获取队列的最大大小

getName(self: depthai.DataOutputQueue) str

获取队列名称

has(self: depthai.DataOutputQueue) bool

检查队列前面是否有消息(不为空),如果队列不为空,则为true,否则为false

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

删除回调,如果删除了回调,则为true,否则为false

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

设置满时的队列行为(maxSize),指定是阻止还是覆盖队列中最旧的消息

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

设置队列的最大大小,指定队列中的最大消息数

tryGet(self: depthai.DataOutputQueue) depthai.ADatatype

尝试从队列中检索消息。如果没有可用的消息,则立即返回

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

尝试检索队列中的所有消息。

class DetectionNetwork
Canonical

depthai.DetectionNetwork

检测网络。不同网络专业的基础

属性

input

输入消息,其中包含要推论为默认队列的数据,大小为5

out

输出ImgDetections消息,其中包含已解析的检测结果。

passthrough

执行推断的直通消息。

input

输入消息,其中包含要推论为默认队列的数据,大小为5

out

输出ImgDetections消息,其中包含已解析的检测结果。

passthrough

执行推断的直通消息。

适用于将输入队列设置为非阻塞行为的情况。

方法

setConfidenceThreshold(self: depthai.DetectionNetwork,thresh: float)

指定用于过滤其余检测的置信度阈值。

参数thresh:

检测置信度必须大于指定的阈值才能添加到列表中

class ChipTemperature
Canonical

depthai.ChipTemperature

芯片温度信息,多个温度测量点取平均值

方法

__init__ (self)

属性

average

css

dss

mss

upa

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

depthai.ColorCameraProperties

指定ColorCamera选项,例如相机ID,…

ColorOrder

对于24位颜色,这些颜色可以是RGB或BGR

SensorResolution

选择相机传感器的分辨率

方法

__init__ (*args, **kwargs)

初始化函数

boardSocket

colorOrder

fps

initialControl

interleaved

previewHeight

previewWidth

resolution

sensorCropX

sensorCropY

stillHeight

stillWidth

videoHeight

videoWidth

class ColorOrder

对于24位颜色,这些颜色可以是RGB或BGR

成员

BGR

RGB

属性

BGR

RGB

name

value

方法

__init__ (*args, **kwargs)

初始化函数

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

选择相机传感器的分辨率

成员

THE_1080_P

THE_4_K

THE_12_MP

属性

THE_1080_P

THE_12_MP

THE_4_K

name

value

方法

__init__ (*args, **kwargs)

初始化函数

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

初始化函数,有关详细说明,请参考help(type(self)).

boardSocket
colorOrder
fps
initialControl
interleaved
previewHeight
previewWidth
resolution
stillHeight
stillWidth
sensorCropX
sensorCropY
videoHeight
videoWidth
class MonoCameraProperties
Canonical

depthai.MonoCameraProperties

指定MonoCamera选项,例如摄像机ID,…

SensorResolution

选择相机传感器分辨率:1280×720、1280×800、640×400

方法

__init__ (*args, **kwargs)

初始化函数

属性

boardSocket

fps

initialControl

resolution

class SensorResolution

选择相机传感器分辨率:1280×720、1280×800、640×400

成员

THE_720_P

THE_800_P

THE_400_P

属性

THE_400_P

THE_720_P

THE_800_P

方法

__init__ (*args, **kwargs)

初始化函数

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

初始化函数,有关详细说明,请参考help(type(self)).

Outputs

boardSocket
resolution
fps
initialControl
class StereoDepthProperties
Canonical

depthai.StereoDepthProperties

指定StereoDepth选项

DepthAlign

成员

MedianFilter

中值过滤器配置用于视差后处理

方法

__init__ (*args, **kwargs)

初始化函数

属性

calibration

confidenceThreshold

depthAlign

depthAlignCamera

enableExtendedDisparity

enableLeftRightCheck

enableSubpixel

height

width

median

rectifyEdgeFillColor

rectifyMirrorFrame

class DepthAlign

成员

RECTIFIED_RIGHT

RECTIFIED_LEFT

CENTER

属性

CENTER

RECTIFIED_LEFT

RECTIFIED_RIGHT

name

value

方法

__init__ (*args, **kwargs)

初始化函数

CENTER =<DepthAlign.CENTER:2>

..function:: RECTIFIED_LEFT = <DepthAlign.RECTIFIED_LEFT: 1>

..function:: RECTIFIED_RIGHT = <DepthAlign.RECTIFIED_RIGHT: 0>

__init__(self: depthai.StereoDepthProperties.DepthAlign, value: int) None
name
value
class MedianFilter

中值过滤器配置用于视差后处理

成员

MEDIAN_OFF

KERNEL_3x3

KERNEL_5x5

KERNEL_7x7

属性

KERNEL_3x3

KERNEL_5x5

KERNEL_7x7

MEDIAN_OFF

name

value

方法

__init__ (*args, **kwargs)

初始化函数

KERNEL_3x3 = <MedianFilter.KERNEL_3x3: 3>
KERNEL_5x5 = <MedianFilter.KERNEL_5x5: 5>
KERNEL_7x7 = <MedianFilter.KERNEL_7x7: 7>
MEDIAN_OFF = <MedianFilter.MEDIAN_OFF: 0>
__init__(self: depthai.StereoDepthProperties.MedianFilter, value: int) None
name
value
__init__(*args, **kwargs)

初始化函数,有关详细说明,请参考help(type(self)).

calibration
median
confidenceThreshold
depthAlign
depthAlignCamera
enableLeftRightCheck
enableSubpixel
enableExtendedDisparity
rectifyMirrorFrame
rectifyEdgeFillColor
width
height
class VideoEncoderProperties
Canonical

depthai.VideoEncoderProperties

指定VideoEncoder选项,例如配置文件,比特率,…

Profile

编码配置文件,H264,H265或MJPEG

RateControlMode

速率控制模式指定应使用恒定比特率还是可变比特率(H264 / H265)

方法

__init__ (*args, **kwargs)

初始化函数

属性

bitrate

height

keyframeFrequency

maxBitrate

:class:numFrames`

numFramesPool

profile

quality

rateCtrlMode

width

class Profile

编码配置文件,H264,H265或MJPEG

成员

H264_BASELINE

H264_HIGH

H264_MAIN

H265_MAIN

MJPEG

属性

H264_BASELINE

H264_HIGH

H264_MAIN

H265_MAIN

MJPEG

name

value

方法

__init__ (self,value)

H264_BASELINE = <Profile.H264_BASELINE: 0>
H264_HIGH = <Profile.H264_HIGH: 1>
H264_MAIN = <Profile.H264_MAIN: 2>
H265_MAIN = <Profile.H265_MAIN: 3>
MJPEG = <Profile.MJPEG: 4>
__init__(self: depthai.VideoEncoderProperties.Profile, value: int) None
name
value
class RateControlMode

速率控制模式指定应使用恒定比特率还是可变比特率(H264 / H265)

成员

CBR

VBR

属性

CBR

VBR

name

value

方法

__init__ (self,value)

CBR = <RateControlMode.CBR: 0>
VBR = <RateControlMode.VBR: 1>
__init__(self: depthai.VideoEncoderProperties.RateControlMode, value: int) None
name
value
__init__(*args, **kwargs)

初始化函数,有关详细说明,请参考help(type(self)).

bitrate
keyframeFrequency
maxBitrate
numBFrames
numFramesPool
profile
quality
rateCtrlMode
width
height