Operator ImageBuffer

Operator Library: Memory

This operator buffers the image stream in the Frame Grabber RAM (DRAM). One VisualApplets resource of type RAM is required. Check 'Allocation of Device Resources' for more information. The operator additionally features region-of-interest (ROI) support. The total number of bits (bit width times parallelism) must not exceed the memory limitations of the respective frame grabber.

For information on the latency of the operator, see Table 42, 'Individual Latencies of the Operators in Library Memory'.

The operator works like a FIFO. Any input data is immediately forwarded to the output. However, if the output is blocked, for example, because the following operators cannot process the input bandwidth, the operator will store the data. Thus, the memory will only be filled if the operator cannot output the data. Often, the operator is used to compensate peak input bandwidths.

Internally, the image buffer operates on image lines. This internal line buffer feature results in a very short memory latency. Of course, latency increases if the buffer is filled with more lines. For example, images which are transfered into the memory will be immediately forwarded to the output. In an application, partial camera images can be forwarded to the PC while the camera still transfers the remaining image lines.

Using the parameters XOffset, XLength, YOffset and YLength you can define the ROI size. If the input image width is less than the sum of the XOffset and XLength, the operator will still read the parameterized XLength. In this case, the operator will output undefined memory content for the additional pixels. If the input image height is less than the requested output image height, the operator will only output the available lines.

In Line1D application mode, the YOffset and YLength settings do not affect the buffer.

To measure the fill level of the buffer, the operator provides 2 parameters: FillLevel and Overflow. FillLevel shows the fill level of the RAM in 25% steps. The Overflow parameter is set to 1 when FillLevel is close to or equal to 100% and the next image to be stored in the buffer will exceed the RAM capacity. In case of an overflow, input data is discarded and the input image height is reduced. Thus, incomplete images are stored in the memory. Users have to poll for the overflow parameter. As the duration of the overflow state can be very short, it is possible that it occurs within the polling cycle of the operator.

The parameter InfiniteSource is used to specify if the operator is directly connected to a camera or is sequenced with other memory operators. Check 'Infinite Sources / Connecting Cameras' for more information.

Operator Restrictions

  • Empty frames are not supported.

[Note] Available Memory Space

The operator needs additional memory space for internal data. Thus, not the full amount of the used RAM resource can be used for buffering image data. The space actually available for buffered image data depends on the hardware platform (Platform RAM Size and Platform RAM Interface Width) and on the link configuration. For information on Platform RAM Size and Platform RAM Interface Width, see Appendix. Device Resources.)

You can calculate the available capacity of the RAM resource using the following formulas:

  • Utilized RAM Size [in Bytes] = ((PRS * 2^20 / (PRIW / 8 bit)) / RLS) * MIW * BW / 8

  • Utilized RAM Size [in Lines] = ((PRS * 2^20 / (PRIW / 8 bit)) / RLS)

  • Utilized RAM Size [in Frames] = ((PRS * 2^20 / (PRIW / 8 bit)) / RLS) / MIH

Abbrevations used in the formulas and units of measure:

  • PRS: Platform RAM Size [in MB, 1MB = 2^20 Byte]

  • PRIW: Platform RAM Interface Width [in bit]

  • MIW: MaxImageWidth [in pixel]

  • MIH: MaxIMageHeight [in lines]

  • P: Parallelism

  • BW: BitWidth [in bit]

  • RLS: Raw Line Size: 2 ^ ceil(log2n(MIW / P + 4))

Bandwidth Optimization

The theoretical bandwidth [bits/second] going through an operator that uses the Frame Grabber RAM (DRAM) is calculated in accord with the following formula:

However, the actual bandwidth is always less than the theoretical bandwidth due to the DRAM efficiency.

The maximum bandwidth going through the operator is reached if the product of Bit Width and Parallelism is equal to the internal RAM Port Width.

[Note] Platform-specific values

RAM Port Width and System Clock are platform-specific. See Appendix. Device Resources for detailed information on your individual platform.

I/O Properties

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

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 64]12 as I
Arithmetic {unsigned, signed} as I
Parallelism any3 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 65535 as I
Max. Img Height 65535 as I


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 3

The product of the bit width and the parallelism must not exceed the native ram data width. Check Appendix. Device Resources for more information.


Type dynamic/static read/write parameter
Default 0
Range [0, Max.Img Width - XLength]

This parameter defines the x-coordinate of the upper left corner of the ROI.

The step size is the parallelism.

Type dynamic/static read/write parameter
Default 1024
Range [2*parallelism, Max.Img Width - XOffset]

This parameter defines the width of the ROI.

The step size is the parallelism.

Type dynamic/static read/write parameter
Default 0
Range [0, Max.Img Height - YLength]

This parameter defines the y-coordinate of the upper left corner of the ROI.

Type dynamic/static read/write parameter
Default 1024
Range [1, Max.Img Height - YOffset]

This parameter defines the height of the ROI.

Type dynamic read parameter
Default 0
Range [0%, 100%]

This parameter provides the fill level of DRAM in 25% steps.

Type dynamic read parameter
Default 0
Range [0, 1]

This parameter indicates a buffer overflow.

Type static parameter

This parameter activates support for infinite source operators like Camera operators. See 'Infinite Sources / Connecting Cameras' for more information.

Examples of Use

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