accumulateSquare
import { accumulateSquare } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
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;srcInput image as 1- or 3-channel, 8-bit or 32-bit floating point.
dstInput/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.
maskOptional 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.