Operator LineBuffer

This operator buffers the image data stream in the Frame Grabber RAM (DRAM). This operator is a replacement for the operator ImageBuffer, which is used for mE5 hardware platforms and provides the same features. mE6 platforms don't support the operator ImageBuffer anymore, thus, when you convert a design from a mE5 hardware platform to a mE6 platform, any instance of ImageBuffer is automatically replaced by an instance of LineBuffer.

One VisualApplets resource of type RAM is required. Check 'Allocation of Device Resources' for more information. Multiple resources of type RAM use the same physical RAM with the shared memory concept. Documentation for how to use the shared memory is available in the Application Note: Shared Memory. Additionally, the operator 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.

The operator causes a latency of at least one line. Reading a line is started as soon as it is fully written into the buffer. If the output is blocked, the operator buffers the input data.

The operator works like a FIFO. The buffer operates on image lines resulting in a very short memory latency. Any completed line of input data is immediately forwarded to the output as long as it is within the selected region of interest and the following modules can consume the data fast enough. As a result, frame data from a camera can be forwarded to the PC while the current frame transfer is still ongoing. The latency between ingoing and outgoing data increases, if the buffer gets filled with more lines. This happens, when the output is blocked for some time, in particular because the following modules cannot process data at the same rate as the input bandwidth. Thus, the memory will only be filled, if the operator can't output the data at the same rate as the input. Often, the operator is used to compensate peak input bandwidths.

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

In Line1D application mode, the YOffset and YLength settings have no effect.

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 percent. 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 receives a data stream which cannot be stopped, i.e. an unbuffered stream from a camera. Check 'Infinite Sources / Connecting Cameras' for more information.

Operator Restrictions

  • Empty frames are not supported.

[Note] Available Memory Space

The operator provides the read-only parameter MemoryCapacity which reports the size of the RAM which can be used for buffering image data. This number may depend on the data layout and presence of other memory operators in the current design.

Available for Hardware Platforms
microEnable 6

Bandwidth Optimization

In contrast to the operator ImageBuffer, this operator performs an automatic aggregation of pixels for matching the memory data width as close as possible, in order to reach an optimal performance.

You may adjust the output parallelism to a different value than the input parallelism. This enables defining an asymmetric peak data throughput between input and output of the operator. You can use this feature to avoid an additional instance of a PARALLELdn operator when the following data processing pipeline needs to work with a reduced parallelism.

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 any as I
Max. Img Height any as I

1

The range of the input bit width is:

  • For unsigned inputs: [1, 64]

  • For signed inputs: [2, 64]

  • For unsigned color inputs: [3, 63]

  • For signed color inputs: [6, 63].

2 3

The product of the bit width and the parallelism must not exceed the native RAM data width.

Parameters

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

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

This parameter defines the width of the ROI.

The step size is the parallelism.

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

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

This parameter defines the height of the ROI.

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

This parameter provides the fill level of DRAM in percent.

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

This parameter indicates a buffer overflow.

InfiniteSource
Type static parameter
Default Enabled
Range {ENABLED, DISABLED}

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

MemoryCapacity
Type static read parameter
Default -
Range [0, 32000]

This parameter indicates the maximum usable memory size for image data in mebibyte (1024x1024 bytes).