Operator XOR

Operator Library: Logic

XOR 運算子執行位元級的邏輯 XOR(異或)運算。 若對應的輸入位元值之和為奇數,則每個輸出位元將設為邏輯「1」;否則,輸出為 「0」。 輸入連接埠的數量必須在模組實例化時選定。

因此,n 個輸入的輸出位元 i 為

I/O Properties

Property Value
Operator Type O
Input Links I0, data input
I1..In-1, data input
Output Link O,資料輸出

Supported Link Format

Link Parameter 輸入連結 I0 Input Link 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]。

Parameters

無

Examples of Use

以下範例示範了 XOR 運算子的用法:

  • 'Morphological Edge'

    範例 - 將二值化侵蝕後的影像與原始影像進行比較。 如果兩者不同,則會偵測到邊緣。