Operator ImageBufferSC

Operator Library: Memory

This operator features tap sorting (=sensor correction), which is often required if line scan cameras are used. Moreover, a region-of-interest (ROI) support is included. The total number of bits (bit width times parallelism) must not exceed the memory limitations of the respective frame grabber.

This operator buffers the image stream the in Frame Grabber RAM (DRAM). One VisualApplets resource of type RAM is required (see 'Allocation of Device Resources').

The tap sorting feature enables transparent support for sensors, whose readout scheme does not follow a sequential raster-scan format. Supported are the most popular readout schemes for dual tap base cameras (when using a parallelism of 4) and quad tap medium cameras.

For other parallelism, the operator can be used in combination with other operators.

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

The operator works like a FIFO. Any input data is immediately forward 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 parameters XOffset, XLength, YOffset and YLength the ROI size can be defined. 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 contend to the exceeding pixel. 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 percentaged fill level of the RAM in 25% steps. The Overflow parameter is set to 1 when FillLevel is close to or is 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 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 is in between of a polling cycle of the operator.

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.

    Images with varying line lengths are not supported.

    The input line width has to be divisible by the number of taps multiplied with the parallelism.

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] unsigned, [2, 64] signed1 as I
Arithmetic {unsigned, signed} as I
Parallelism 42 as I
Kernel Columns 1 as I
Kernel Rows 1 as I
Img Protocol VALT_IMAGE2D as I
Color Format VAF_GRAY as I
Color Flavor FL_NONE as I
Max. Img Width 65535 as I
Max. Img Height any as I

1 2

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

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 [2*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.

SensorCorrection
Type dynamic read/write parameter
Default SMODE_UNCHANGED
Range

Available options are

The parameter specifies the sensor readout scheme of the connected camera. SMODE_UNCHANGED and SMODE_REVERSE support single, dual and quad tap cameras. SMODE_TAPS2_x support dual tap (base) cameras. SMODE_TAP4_x support quad tap (medium) cameras.

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

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

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.

Examples of Use

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