ImageAlign
最后更新
如何放置
Python
Python
1pipeline = dai.Pipeline()
2align = pipeline.create(dai.node.ImageAlign)输入和输出
工作原理
ImageAlign 节点有两个输入:inputAlignTo 和 input。inputAlignTo 是 input 帧将对齐到的帧。input 帧将对齐到 inputAlignTo 帧,对齐后的帧将发送到 outputAligned 输出。inputAlignTo 只读取一次以提取帧元数据,然后根据两个传感器之间的外参校准,input 帧被重新投影并对齐到它。用法
Python
Python
1pipeline = dai.Pipeline()
2
3rgb_cam = pipeline.create(dai.node.ColorCamera)
4# 假设 RGB 传感器位于 CAM_A 端口
5rgb_cam.setBoardSocket(dai.CameraBoardSocket.CAM_A)
6
7tof = pipeline.create(dai.node.ToF)
8# 假设 ToF 传感器位于 CAM_B 端口
9tof_cam.setBoardSocket(dai.CameraBoardSocket.CAM_B)
10
11image_align = pipeline.create(dai.node.ImageAlign)
12# 将 ToF 的深度与 RGB 对齐
13tof.depth.link(image_align.input)
14rgb_cam.video.link(image_align.inputAlignTo)
15
16# 将对齐后的输出发送到主机
17image_align.outputAligned.link(xout.input)功能示例
参考
class
depthai.node.ImageAlign(depthai.Node)
method
setInterpolation(self, arg0: depthai.Interpolation) -> ImageAlign: ImageAlignSpecify interpolation method to use when resizing
method
setNumFramesPool(self, arg0: typing.SupportsInt) -> ImageAlign: ImageAlignSpecify number of frames in the pool
method
setNumShaves(self, arg0: typing.SupportsInt) -> ImageAlign: ImageAlignSpecify number of shaves to use for this node
method
setOutKeepAspectRatio(self, arg0: bool) -> ImageAlign: ImageAlignSpecify whether to keep aspect ratio when resizing
method
setOutputSize(self, arg0: typing.SupportsInt, arg1: typing.SupportsInt) -> ImageAlign: ImageAlignSpecify the output size of the aligned image
property
initialConfig
Initial config to use when calculating spatial location data.
property
input
Input message. Default queue is non-blocking with size 4.
property
inputAlignTo
Input align to message. Default queue is non-blocking with size 1.
property
inputConfig
Input message with ability to modify parameters in runtime. Default queue is non-blocking with size 4.
property
outputAligned
Outputs ImgFrame message that is aligned to inputAlignTo.
property
passthroughInput
Passthrough message on which the calculation was performed. Suitable for when input queue is set to non-blocking behavior.
需要帮助?
请访问讨论论坛以获取技术支持或您可能有的任何其他问题。