Operator OR

Operator Library: Logic

operator OR 會執行位元邏輯 OR 運算。 若對應的位元中任何一個為「1」,則對應的輸出位元會設為邏輯「1」,否則輸出為「0」。 輸入連結的數量必須在模組執行個體化時進行選擇。

Thus the output bit i of n inputs is

I/O Properties

Property Value
Operator Type O
輸入連結 I0, data input
I1..In-1, data input
Output Link O, data output

支援的 Link 格式

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

The range of the input Bit Width is [1, 64] for unsigned values. For signed inputs, the range is [2, 64]. For unsigned color inputs, the range is [3, 63] and for signed color, the range is [6, 63].

參數

無

使用範例

operator OR 的使用方式如以下範例所示:

  • 「Hit or Miss」

    範例 - 此實作可以在二元影像中偵測四種簡單的圖樣。 只要找到符合的圖樣,輸出就會設為 1。

  • 「Grid Overlay Fading」

    範例 - 將網格覆疊至輸入影像。網格像素值由輸入像素值決定。