Skip to content

accumulateProduct

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

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

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

Adds the per-element product of two input images to the accumulator image.

The function adds the product of two images or their selected regions to the accumulator dst :

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

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

See: accumulate, accumulateSquare, accumulateWeighted

accumulateProduct(src1: Mat, src2: Mat, dst: Mat, mask: Mat): void;
2 available overloads
accumulateProduct(src1: Mat, src2: Mat, dst: Mat): void;
accumulateProduct(src1: Mat, src2: Mat, dst: Mat, mask: Mat): void;
src1

First input image, 1- or 3-channel, 8-bit or 32-bit floating point.

src2

Second input image of the same type and the same size as src1 .

dst

Input/output value, modified by the native operation. %Accumulator image with the same number of channels as input images, 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.