FrameSum 算子

Operator Library: Accumulator

This operator computes the sum of all pixel values for each input frame. The output frame has the same size as the input frame, where each pixel is replaced by the current frame sum. Thus, each pixel is replaced by the pixel sum determined so far.

[注意] 资源消耗

The operator's FGPA resource consumption strongly increases with the Parallelism. We recommend to use low Parallelism at this operator.

In many use cases of this operator, the Parallelism can be reduced by adding up the parallel components prior this operator using SplitParallel and ADD.

With every new input frame the summation starts from zero. Additionally, it is possible to clear the current sum manually when the ClrI link is set to 1. When a manual clearing is not necessary, you must ensure a constant 0 at ClrI, to enable normal operation.

The following example shows the relation of input values to output values.

Often, this operator is used in conjunction with operators RemoveLine and RemovePixel to use only the last image pixel containing the results of all frame pixels.

Image Restrictions

  • Image size

    Varying line lengths and empty images are allowed in non-empty images.

  • 空图像

    Empty images, i.e., images with no pixels, are allowed. The operator will output an empty image.

I/O Property

Property 值
Operator Type O
输入链路 I,图像输入
ClrI,清除输入
Output Link O,数据输出

支持的 Link Format

Link Parameter Input Link I 输入链路 ClrI Output Link O
Bit Width [1, 64] unsigned, [2, 64] signed 1 auto1
Arithmetic {unsigned, signed} unsigned as I
Parallelism any as I as I
Kernel Columns 1 as I as I
Kernel Rows 1 as I as I
Img Protocol VALT_IMAGE2D as I as I
Color Format VAF_GRAY as I as I
Color Flavor FL_NONE as I as I
Max. Img Width any as I as I
Max. Img Height any as I as I

1

The output Bit Width is automatically determined from the input Bit Width and maximum image dimension. The output Bit Width is determined by

输出 Bit Width 不得超过 64 Bit。

参数

无

使用示例

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