MessageDemux
如何放置
Python
Python
1pipeline = dai.Pipeline()
2demux = pipeline.create(dai.node.MessageDemux)输入和输出
用法
Python
Python
1# 创建同步节点并设置同步阈值
2sync = pipeline.create(dai.node.Sync)
3sync.setSyncThresholdMs(timedelta(milliseconds=100))
4
5# 创建解复用节点
6demux = pipeline.create(dai.node.MessageDemux)
7
8# 同步多个节点的输出
9rgb.preview.link(sync.inputs["rgb"])
10stereo.depth.link(sync.inputs["depth"])
11script.outputs["out"].link(sync.inputs["script"])
12
13sync.out.link(demux.input) # Sync 输出是一个 MessageGroup,包含所有同步节点的消息
14
15# 将 MessageGroup 解复用为独立消息
16demux.outputs["rgb"].link(xout1.input)
17demux.outputs["depth"].link(xout2.input)
18demux.outputs["script"].link(xout3.input)功能示例
参考
class
depthai.node.MessageDemux(depthai.Node)
method
getProcessor(self) -> depthai.ProcessorType: depthai.ProcessorTypeGet on which processor the node should run Returns: Processor type - Leon CSS or Leon MSS
method
setProcessor(self, arg0: depthai.ProcessorType)Set on which processor the node should run Parameter ``type``: Processor type - Leon CSS or Leon MSS
property
input
Input message of type MessageGroup
property
outputs
A map of outputs, where keys are same as in the input MessageGroup
需要帮助?
请前往 OAKChina 官网 获取技术支持或解答您的任何疑问。