Skip to content

sumElems

Core and matricesfunctionOpenCV 5.0.0
import { sumElems } from '@banou/opencv-wasm'

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

ARGUMENTSsrc
FUNCTIONsumElems
RETURN TYPEScalar
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Calculates the sum of array elements.

The function cv::sum calculates and returns the sum of array elements, independently for each channel.

See: countNonZero, mean, meanStdDev, norm, minMaxLoc, reduce

sumElems(src: Mat): Scalar;
src

input array that must have from 1 to 4 channels.

Returns

The Scalar result.

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.