thresholdWithMask
import { thresholdWithMask } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Same as #threshold, but with an optional mask
Note: If the mask is empty, #thresholdWithMask is equivalent to #threshold. If the mask is not empty, dst must be of the same size and type as src, so that outliers pixels are left as-is
See: threshold, adaptiveThreshold, findContours, compare, min, max
thresholdWithMask(src: Mat, dst: Mat, mask: Mat, thresh: number, maxval: number, type_: number): number;srcinput array (multiple-channel, 8-bit or 32-bit floating point).
dstInput/output value, modified by the native operation. output array of the same size and type and the same number of channels as src.
maskoptional mask (same size as src, 8-bit).
threshthreshold value.
maxvalmaximum value to use with the #THRESH_BINARY and #THRESH_BINARY_INV thresholding types.
type_thresholding type (see #ThresholdTypes).
the computed threshold value if Otsu's or Triangle methods used.
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.