Skip to content

gapi_RGB2Gray1

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

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

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

Resulting gray color value computed as

\texttt{dst} (I)= \texttt{rY} * \texttt{src}(I).R + \texttt{gY} * \texttt{src}(I).G  + \texttt{bY} * \texttt{src}(I).B 

Note: Function textual ID is "org.opencv.imgproc.colorconvert.rgb2graycustom"

See: RGB2YUV

gapi_RGB2Gray1(src: GMat, rY: number, gY: number, bY: number): GMat;
src

input image: 8-bit unsigned 3-channel image CV_8UC1.

rY

float multiplier for R channel.

gY

float multiplier for G channel.

bY

float multiplier for B channel.

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.