depth_merger
最后更新
depthai_nodes.node.depth_merger类
DepthMerger
示例
使用管道、神经网络、立体节点和设备校准:
Text
1depth_merger = pipeline.create(DepthMerger).build(
2 output2d=nn.out,
3 outputDepth=stereo.depth,
4 calibData=calibration,
5)方法
init
Python
1def __init__(shrinkingFactor: float = 0):shrinkingFactor(float): 在采样深度之前从每侧修剪的比例。构建调用会提供其自己的值。
build
Python
1def build(output2d: dai.Node.Output, outputDepth: dai.Node.Output, calibData: dai.CalibrationHandler, depthAlignmentSocket: dai.CameraBoardSocket = dai.CameraBoardSocket.CAM_A, shrinkingFactor: float = 0) -> DepthMerger:output2d(dai.Node.Output): 产生 2D 检测的上游输出。outputDepth(dai.Node.Output): 产生对齐深度帧的上游输出。calibData(dai.CalibrationHandler): 用于将图像坐标转换为空间坐标的设备校准。depthAlignmentSocket(dai.CameraBoardSocket): 深度帧对齐到的相机插槽。shrinkingFactor(float): 在深度平均之前修剪每个边界框边缘的百分比。
DepthMerger: 配置好的节点实例。
process
Python
1def process(message2d: dai.Buffer, depth: dai.ImgFrame):output 发送它们。参数message2d(dai.Buffer): 要投影到相机空间的dai.ImgDetection或dai.ImgDetections。depth(dai.ImgFrame): 与配置的校准相机对齐的深度帧。
ValueError: 如果检测输入类型不受支持。