gapi_countNonZero
import { gapi_countNonZero } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
ARGUMENTSsrc
FUNCTIONgapi_countNonZero
RETURN TYPEGOpaque_int
Counts non-zero array elements.
The function returns the number of non-zero elements in src :
\sum _{I: \; \texttt{src} (I) \ne0 } 1
Supported matrix data types are CV_8UC1, CV_16UC1, CV_16SC1, CV_32FC1.
Note: Function textual ID is "org.opencv.core.matrixop.countNonZero"
See: mean, min, max
gapi_countNonZero(src: GMat): GOpaque_int;srcinput single-channel matrix.
Returns
The GOpaque_int result. Release returned native handles with using or delete(), including handles nested in results.
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.