Skip to content

gapi_mask

gapifunctionOpenCV 5.0.0
import { gapi_mask } from '@banou/opencv-wasm'

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

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

Applies a mask to a matrix.

The function mask set value from given matrix if the corresponding pixel value in mask matrix set to true, and set the matrix value to 0 otherwise.

Supported src matrix data types are CV_8UC1, CV_16SC1, CV_16UC1. Supported mask data type is CV_8UC1.

Note: Function textual ID is "org.opencv.core.math.mask"

gapi_mask(src: GMat, mask: GMat): GMat;
src

input matrix.

mask

input mask matrix.

Returns

The GMat 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.