運算子 SelectSubKernel

Operator Library: Base

運算子 SelectSubKernel 會在輸入鏈路上從核矩陣中擷取一個矩形子集。 與 ROI 類似,可透過參數FirstROW和FirstCOL 來定義新核的第一個元素的偏移量。 可在輸出鏈路上透過設定該鏈路的核大小,來選擇新核的尺寸(寬度/高度)。

通常,此運算子用於擷取核函數的中央元素,該元素大多就是原始像素值。

I/O Properties

Property Value
Operator Type O
Input Link I,資料輸入
Output Link O,資料輸出

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 64]1 as I
Arithmetic {unsigned, signed} as I
Parallelism any as I
Kernel Columns any any2
Kernel Rows any any3
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I
Color Format any as I
Color Flavor any as I
Max. Img Width any as I
Max. Img Height any as I

1

輸入 Bit Width 的範圍為 [1, 64]。 對於有號輸入,範圍為 [2, 64]。 對於無號彩色輸入,範圍為 [3, 63],而對於有號彩色,範圍則為 [6, 63]。

2 3

範圍的定義如下:

Parameters

FirstROW
Type 靜態參數
Default 0
Range [0, 輸入核心列數 - 輸出核心列數]

此參數用以定義新核心的第一行。

FirstCOL
Type 靜態參數
Default 0
Range [0, 輸入核心欄數 - 輸出核心欄數]

此參數用於定義新核心的第一欄。

Examples of Use

以下範例示範了 SelectSubKernel 運算子的使用方式: