The operator InsertImage multiplexes a number of n input links I .. 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 is processed, next link I. After link I[n-1] the operator starts with the next image at I 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.
|Input Links||I, data input
I[k], data input
Ins[k], control input
|Output Link||O, data output|
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 I[k] input image widths.
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.
The use of operator InsertImage is shown in the following examples:
Tutorial - Use of the operator for multiplexing the images of two cameras.
Sequential output of the color planes using three image buffers and one DMA operator.
Examples - Shows how to split an merge image streams. Appends a trailer to the image.
Examples - Rolling Average - Loop
Examples - Depth From Focus using Loops