gapi_select
import { gapi_select } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Select values from either first or second of input matrices by given mask. The function set to the output matrix either the value from the first input matrix if corresponding value of mask matrix is 255, or value from the second input matrix (if value of mask matrix set to 0).
Input mask matrix must be of CV_8UC1 type, two other inout matrices and output matrix should be of the same type. The size should
be the same for all input and output matrices.
Supported input matrix data types are CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1, CV_32FC1.
Note: Function textual ID is "org.opencv.core.pixelwise.select"
gapi_select(src1: GMat, src2: GMat, mask: GMat): GMat;src1first input matrix.
src2second input matrix.
maskmask input matrix.
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.