videolib.cvt_color.rgb2yuv

rgb2yuv(rgb, standard, range=None)[source]

Converts RGB to YUV.

Parameters:
  • rgb (ndarray) – RGB array of shape (R, C, 3)

  • standard (Standard) – Color standard to which the data conforms.

  • range (Union[int, float, None]) – Range of pixel values (Default: None - inferred from standard).

Return type:

ndarray

Returns:

RGB array of shape (R, C, 3)