Skip to content

text_computeNMChannels

textfunctionOpenCV 5.0.0
import { text_computeNMChannels } from '@banou/opencv-wasm'

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

Compute the different channels to be processed independently in the N&M algorithm [Neumann12].

text_computeNMChannels(_src: Mat, _channels: MatVector, _mode: number): void;
2 available overloads
text_computeNMChannels(_src: Mat, _channels: MatVector): void;
text_computeNMChannels(_src: Mat, _channels: MatVector, _mode: number): void;
_src

Source image. Must be RGB CV_8UC3.

_channels

Output destination, filled by the native operation. Output vector<Mat> where computed channels are stored.

_mode

Mode of operation. Currently the only available options are: ERFILTER_NM_RGBLGrad** (used by default) and ERFILTER_NM_IHSGrad.

In N&M algorithm, the combination of intensity (I), hue (H), saturation (S), and gradient magnitude channels (Grad) are used in order to obtain high localization recall. This implementation also provides an alternative combination of red (R), green (G), blue (B), lightness (L), and gradient magnitude (Grad).

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.