Skip to content

gapi_RGB2YUV

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

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

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

Converts an image from RGB color space to YUV color space.

The function converts an input image from RGB color space to YUV. The conventional ranges for R, G, and B channel values are 0 to 255.

In case of linear transformations, the range does not matter. But in case of a non-linear transformation, an input RGB image should be normalized to the proper value range to get the correct results, like here, at RGB \rightarrow Y*u*v* transformation. Output image must be 8-bit unsigned 3-channel image CV_8UC3.

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

See: YUV2RGB, RGB2Lab

gapi_RGB2YUV(src: GMat): GMat;
src

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

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.