Operator MergePixel

Operator Library: Base

MergePixel 运算符将具有相同 Parallelism 的多个输入链路的像素合并为具有更大 Bit Width 的单个像素。 输入的位将被拼接。输入 I0 的位将被映射到输出的低位。 所有输入的 Bit Width 可以不同。 输出始终为无符号类型。如果合并的是有符号像素,则对这些位进行重新解释并直接拼接。

每个颜色分量都单独进行合并。

下图展示了将三个输入链路合并为一个链路的过程。

I/O Property

Property 值
Operator Type O
输入链路 I0,数据输入
I[n],n > 0,数据输入
Output Link O,数据输出

Supported Link Format

Link Parameter 输入链接 I0 输入链路 I[n],n > 0 Output Link O
Bit Width [1, 63]1 [1, 63]2 auto3
Arithmetic {unsigned, signed} {unsigned, signed} unsigned
Parallelism any 作为 I0 作为 I0
Kernel Columns 1 作为 I0 作为 I0
Kernel Rows 1 作为 I0 作为 I0
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} 作为 I0 作为 I0
Color Format any 作为 I0 作为 I0
Color Flavor any 作为 I0 作为 I0
Max. Img Width any 作为 I0 作为 I0
Max. Img Height any 作为 I0 作为 I0

1 2

The range of the input bit width is [1, 63] for unsigned values. For signed inputs, the range is [2, 63]. The sum of the input bits of all inputs must be <= 64.

3

The output bit width is the sum of the bit widths of all inputs. The output bit width must be <= 64.

参数

无

使用示例

以下示例展示了 MergePixel 运算符的使用:

  • “Simple Threshold Binarization”

    用于二值化的简单阈值处理。

  • “Blob_Analysis_1D (Legacy)”

    示例 - 展示了运算符 Blob_Analysis_1D 在线扫描应用中的用法。

  • “Blob_Analysis_2D (Legacy)”

    示例 - 展示了运算符 Blob_Analysis_2D 的用法。 该小程序对输入数据进行二值化并确定斑点分析结果。 结果和原始图像均通过两个 DMA 通道输出。

  • ‘Motion Detection’

    Examples - 计算连续两幅图像之间的差值。 对这些差值进行阈值处理,并经由 DMA 通道输出。

  • 'Morphological Edge'

    示例 - 将二值腐蚀图像与原图进行比较。 如果两者不同,则检测到边缘。

  • 'Laser Triangulation'

    示例 - 一个 High Speed 且稳健的激光线检测算法。 该算法可确定重心坐标,从而获得亚像素分辨率的结果。