Operator LineNeighboursNx1

Operator Library: Filter

Operator LineNeighboursNx1 會建立包含 N 行和 1 列的核心視窗。 這 N 個像素位於每個輸入影像像素的上方。

此 operator 類似於 FIRkernelNxM,但包含其他功能。 此 operator 的主要特點在於它是 O-type,這大幅簡化了設計過程中的同步作業。 然而,享有 O-type 功能所付出的代價是某些限制。

與 FIRkernelNxM 的第一個不同之處在於,此 operator 不會將當前像素置於核心中央。 假設定義了一個大小為 3x1 的核心。 在輸出影像 O(x, y) 的核心索引 0 處,會提供位於位置 I(x, y) 的當前像素。 在輸出影像的核心索引 1 處,會提供輸入位置 I(x, y-1) 處的輸入影像像素。 因此,在核心行索引 n 處的輸出影像為

換句話說,此 operator 無法輸出「未來」行的像素,也就是尚未處理的像素。 這就是為什麼此 operator 屬於 O-type 且不會造成行或像素延遲的原因。

由於此 operator 無法提供當前行之前的資訊,因此沒有像 FIRkernelNxM 那樣的鏡射邊緣處理方式。 取而代之的是,輸出 link 中所有來源超出影像邊界像素的值都會被設定為參數 Constant 的值。

若要產生二維核心,請在影像處理管線中將此 operator 與後續的 PixelNeighbours1xM operator 搭配使用。

I/O Properties

Property Value
Operator Type O
Input Link I, data input
Output Link O, kernel output

支援的 Link 格式

Link Parameter Input Link I Output Link O
Bit Width any1 as I
Arithmetic {unsigned, signed} as I
Parallelism any as I
Kernel Columns any as I
Kernel Rows 1 any
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

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].

參數

Constant
Type static parameter
Default 0
Range 輸入 link I 的範圍

此參數定義影像邊界外像素的預設值。

此值一律為無號數。 如果您想將參數設定為有號數,則需要將該值重新解釋為無號數。 對於 Color Format,該值是所有元件的組合值。

使用範例

以下範例顯示了 operator LineNeighboursNx1 的使用方式: