Function rgb2_i420

Source
pub fn rgb2_i420(src: &impl GMatTraitConst) -> Result<GMat>
Expand description

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

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

Output image must be 8-bit unsigned 1-channel image. [CV_8UC1]. Width of I420 output image must be the same as width of input image. Height of I420 output image must be equal 3/2 from height of input image.

Note: Function textual ID is “org.opencv.imgproc.colorconvert.rgb2i420”

§Parameters

  • src: input image: 8-bit unsigned 3-channel image [CV_8UC3].

§See also

I4202RGB