videolib.cvt_color.xyz2yuv

xyz2yuv(xyz, standard, range=None)[source]

Converts tristimulus XYZ to YUV. Performed using an intermediate conversion to BGR.

Parameters:
  • xyz (ndarray) – XYZ 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:

YUV array of shape (R, C, 3)