Operator ExpandPixel

The operator ExpandPixel copies the last pixel of a line or frame to all pixels in the next line or frame. The operator is used in two modes:

  • Line Sync mode:

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

    To use this mode, set the parameter AutoSync to EoL.

  • Frame Sync mode:

    In this mode for each frame the last pixel in the image is stored and kept constant during the next frame.

    To use this mode, set the parameter AutoSync to EoF .

Mind that the behavior of this operator will only affect the following line or frame and not the current line or frame. For this reason the output for the first line or frame has to be specified via the parameter Init.

When using the Line Sync mode with a 2D protocol, then the last pixel value of the last line of a frame is used for the output of pixels of the first line of the following frame. So the value of parameter Init is only used for the very first frame.

Operator Restrictions

  • Empty images are not supported.

    Images with varying line lengths are not supported.

I/O Properties

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

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

The range of the input bit width is [1, 64] for unsigned inputs. 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].

Parameters

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

The parameter specifies the initialization value of of the pixels of the first image lines if AutoSync is set to EoL or the parameter specifies the pixels of the first output frame if AutoSync is set to Eof. The parameter will only accept unsigned values. For signed initialization values enter its unsigned representation.

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

Specifies the synchronization mode of the operator. Use mode EoL to copy the last pixel of each line to all pixels of the following line. Use mode EoF to copy the last pixel of each frame to all pixels of the following frame. If the image protocol at the output is set to VALT_LINE1D, the parameter can only be set to EoL.

Examples of Use

The use of operator ExpandPixel is shown in the following examples: