Operator SampleUp

Library: Base

The operator SampleUp increases the image size by upsampling the input image. The image size upsampling factor can be individually defined for the width and height in steps 1, 2, 4, 8 and 16. The upsampling factor is defined using parameters Expand_X and Expand_Y. The output pixels are computed by duplicating pixels (nearest neighbor method).

See the following figure for explanation of the operator's output. In this example, an upsampling by 4 in x-direction and 2 in y-direction is performed.

Note that the parallelism at the output is not increase even though more pixels have to be transported on the link. Thus this operator cannot process the input image data at its parallelism.

Operator Restrictions

  • The lines of each input image must have the same length. Thus images with varying line lengths are not allowed.

  • Empty images or images with empty lines are not allowed.

I/O Properties

Property Value
Operator Type M
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 {1, 2, 4, 8, 16, 32, 64, 128} as I
Kernel Columns 1 as I
Kernel Rows 1 as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D} as I
Color Format any as I
Color Flavor any as I
Max. Img Width any auto2
Max. Img Height any auto3

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 [3, 63] and for signed color inputs [6, 63].

2

The output image width must not exceed 2^31 - 1.

3

The output image height must not exceed 2^31 - 1.

Parameters

Expand_X
Type static parameter
Default UpSampleXBy1
Range {UpSampleXBy1, UpSampleXBy2, UpSampleXBy4, UpSampleXBy8, UpSampleXBy16}

This parameter defines the upsampling factor for the image width.

Expand_Y
Type static parameter
Default UpSampleYBy1
Range {UpSampleYBy1, UpSampleYBy2, UpSampleYBy4, UpSampleYBy8, UpSampleYBy16}

This parameter defines the upsampling factor for the image height.

Examples of Use

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