算子 XOR

Operator Library: Logic

运算符 XOR 执行按位逻辑 XOR(异或)操作。 如果相应输入位值的总和为奇数,则每个输出位都设为逻辑 "1",否则输出为 "0"。 输入连接的数量必须在模块实例化时进行选择。

因此,n 个输入的输出位 i 为

I/O Property

Property 值
Operator Type O
输入链路 I0,数据输入
I1..In-1,数据输入
Output Link O,数据输出

支持的 Link Format

Link Parameter 输入链路 I0 输入链路 I1..In-1 Output Link O
Bit Width [1, 64]1 as I as I
Arithmetic {unsigned, signed} as I as I
Parallelism any as I as I
Kernel Columns any as I as I
Kernel Rows any as I as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D, VALT_SIGNAL} as I as I
Color Format any as I as I
Color Flavor any as I as I
Max. Img Width any as I as I
Max. Img Height any as I as I

1

对于无符号值,输入 Bit Width 的范围是 [1, 64]。对于有符号输入,范围是 [2, 64]。对于无符号彩色输入,范围是 [3, 63],对于有符号彩色输入,范围是 [6, 63]。

参数

无

使用示例

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

  • 'Morphological Edge'

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