Skip to content

accumulate

Image processingfunctionOpenCV 5.0.0
import { accumulate } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSsrc, dst, mask
FUNCTIONaccumulate
RETURN TYPEvoid
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

imgproc_misc

Adds an image to the accumulator image.

The function adds src or some of its elements to dst :

\texttt{dst} (x,y)  \leftarrow \texttt{dst} (x,y) +  \texttt{src} (x,y)  \quad \text{if} \quad \texttt{mask} (x,y)  \ne 0

The function supports multi-channel images. Each channel is processed independently.

The function cv::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.

See: accumulateSquare, accumulateProduct, accumulateWeighted

accumulate(src: Mat, dst: Mat, mask: Mat): void;
2 available overloads
accumulate(src: Mat, dst: Mat): void;
accumulate(src: Mat, dst: Mat, mask: Mat): void;
src

Input image of type CV_8UC(n), CV_16UC(n), CV_32FC(n) or CV_64FC(n), where n is a positive integer.

dst

Input/output value, modified by the native operation. %Accumulator image with the same number of channels as input image, and a depth of CV_32F or CV_64F.

mask

Optional operation mask.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.