Operator ExpandPixel

Operator Library: Synchronization

Operator ExpandPixel 會將行或影格的最後一個像素複製到下一行或下一格中的所有像素。 此 Operator 在兩種模式下使用:

  • Line Sync 模式:

    In this mode, for each line the last pixel value in a line is stored and kept constant for the next line.

    若要使用此模式,請將參數 AutoSync 設定為 EoL。

  • Frame Sync 模式:

    在此模式下,會儲存影像中的每個影格最後一個像素,並在下一個影格期間保持常數。

    若要使用此模式,請將參數 AutoSync 設定為 EoF。

請注意,此 Operator 的行為只會影響接下來的一行或影格,而不會影響目前的一行或影格。 因此,第一行或第一影格的輸出必須透過參數 Init 來指定。

當在 2D 協定中使用 Line Sync 模式時,影格最後一行的最後一個像素值會用於輸出後續影格第一行的像素。 因此,參數 Init 的值僅用於第一個影格。

算子限制

  • 不支援空白影像。

    不支援具有不同行長度的影像。

I/O Properties

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

支援的 Link 格式

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 as I
Kernel Rows any as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D} 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]。

參數

Init
Type static parameter
Default 0
Range [0, 2^InputBitWidth - 1]

此參數指定第一個影像行像素的初始化值(如果 AutoSync 設定為 EoL),或者此參數指定第一個輸出影格的像素(如果 AutoSync 設定為 EoF)。 此參數僅接受無號(unsigned)值。 若要使用有號初始化值,請輸入其無號表示法。

AutoSync
Type static parameter
Default EoL
Range {EoL, EoF}

指定 Operator 的同步模式。 使用 EoL 模式將每行的最後一個像素複製到後續行的所有像素。 使用 EoF 模式將每個影格的最後一個像素複製到後續影格的所有像素。 如果輸出的影像協定設定為 VALT_LINE1D,則該參數只能設定為 EoL。

使用範例

Operator ExpandPixel 的使用方式如以下範例所示: