Skip to content

accumulateSquare

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

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

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

Adds the square of a source image to the accumulator image.

The function adds the input image src or its selected region, raised to a power of 2, to the accumulator dst :

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

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

See: accumulateSquare, accumulateProduct, accumulateWeighted

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

Input image as 1- or 3-channel, 8-bit or 32-bit floating point.

dst

Input/output value, modified by the native operation. %Accumulator image with the same number of channels as input image, 32-bit or 64-bit floating-point.

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.