Operator InsertImage

The operator InsertImage multiplexes a number of n input links I[0] .. I[n-1] into the output link O. Thus the operator outputs the input images of all inputs in sequential order at O.

The operator forwards the input images to the output one after the other. First, input link I[0] is processed, next link I[1]. After link I[n-1] the operator starts with the next image at I[0] again etc. The operator waits until an image at a currently selected input is present. Therefore it is not possible to skip inputs. There is no "first come first processed" strategy.

As explained, the operator only forwards a specific input at a certain time. While one input is processed all other inputs are blocked. If an image is present at a blocked input, ensure that it can be buffered until it's processed. Moreover, users have to ensure that multiple inputs are not sourced by the same image source as this will cause a deadlock. Check tutorial 'Multiplex the Images of Two Cameras' for more information on correct inserting.

For every input I[k], the operator provides a controlling input Ins[k]. These inputs are used to control whether the data of an image has to be used and forwarded to the output or should be discarded. The Ins[k] inputs accept binary data. If a one is provided for the very first pixel of a respective image, the image will be forwarded to the output. Whereas if value zero is provided for the very first pixel of a respective image, the image will be processed but discarded.

The I[k] and Ins[k] pairs are synchronous i.e. they have to be sources by the same M-type source though an arbitrary network of O-type operators. See 'M-type Operators with Multiple Inputs' for more information. Therefore, no SYNC operator is required for these pairs (different in VA versions < VA2).

The output frame rate of the operator is n times higher than the input frame rate. However, the output parallelism is not increased. Therefore, the output bandwidth is equal to the input bandwidth while more data might be required to be transferred. It might be necessary to increase the parallelism of the inputs before the operator is processing the data.

All images at I[k] can be of different height and width. Control inputs Ins[k] are ignored for empty input images. These images will not be forwarded to the output i.e. will be discarded.

I/O Properties

Property Value
Operator Type M
Input Links I[0], data input
I[k], data input
Ins[k], control input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I[0] Input Link I[k] Input Link Ins[k] Output Link O
Bit Width [1, 64]1 as I[0] 1 as I[0]
Arithmetic {unsigned, signed} as I[0] unsigned as I[0]
Parallelism any as I[0] as I[0] as I[0]
Kernel Columns any as I[0] 1 as I[0]
Kernel Rows any as I[0] 1 as I[0]
Img Protocol VALT_IMAGE2D as I[0] as I[0] as I[0]
Color Format any as I[0] VAF_GRAY as I[0]
Color Flavor any as I[0] FL_NONE as I[0]
Max. Img Width any any as I[k] auto2
Max. Img Height any any as I[k] auto3

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

2

The maximum output image width is the maximum of all I[k] input image widths.

3

The maximum output image height is the maximum of all I[k] input image heights.

Synchronous and Asynchronous Inputs

  • Synchronous Groups: I[k] and Ins[k]
  • All groups are asynchronous to each other.

Parameters

None

Examples of Use

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