ImageAlign
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.
需要帮助?
请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。