The function supports multi-channel images; each channel is processed independently.
The function supports multi-channel images. Each channel is processed independently.
The functions ``accumulate*`` can be used, for example, to collect statistic of background of a scene, viewed by a still camera, for the further foreground-background segmentation.
The functions ``accumulate*`` can be used, for example, to collect statistics of a scene background viewed by a still camera and for the further foreground-background segmentation.
:param src: The input image, 1- or 3-channel, 8-bit or 32-bit floating point
:param src: Input image as 1- or 3-channel, 8-bit or 32-bit floating point.
:param dst: The accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point
:param dst: Accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.
:param alpha: Weight of the input image
:param alpha: Weight of the input image.
:param mask: Optional operation mask
:param mask: Optional operation mask.
The function calculates the weighted sum of the input image ``src`` and the accumulator ``dst`` so that ``dst`` becomes a running average of frame sequence:
The function calculates the weighted sum of the input image ``src`` and the accumulator ``dst`` so that ``dst`` becomes a running average of a frame sequence: