Operator InsertLine

The operator InsertLine multiplexes the lines of N input links I[0] .. I[n-1] into the output link O. Thus the operator outputs the input image lines of all inputs in sequential order at O.

The operator forwards the input image lines to the output one after the other. With every new frame the operator starts with input I[0]. First, the first line of input I[0] is processed and forwarded to the output. Next, the first line of input I[1] is processed. After the first line of I[n-1] has been processed, the operator continuous with the second line of I[0] etc. The operator waits until the required line at the 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 blocks. If an image line 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. The example is similar for the InserLine operator.

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 line 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 line, the line will be forwarded to the output. Whereas if value zero is provided for the very first pixel of a respective image line, the line 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 image size of the operator is n times higher than the input image sizes. 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 width. However, the height of all images has to be equal. Control inputs Ins[k] are ignored for empty input lines. These lines 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, VALT_LINE1D} 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 as I[0] as I[k] N * I[0]3


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


The maximum output image width is the maximum of all input image widths.


As of VisualApplets version 3.3.0, and only if in the Simulation Build Setttings the option Simulate 1D Line By Line is selected: If the Image Protocol is set to VALT_LINE1D, the maximum output image height is forced to 1.

Synchronous and Asynchronous Inputs

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



Examples of Use

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