skimage2.color.rgb2yuv#
- skimage2.color.rgb2yuv(rgb, *, channel_axis=-1)[source]#
RGB to YUV color space conversion.
- Parameters:
- rgbarray_like of shape (…, C=3, …)
The image in RGB format. By default, the final dimension denotes channels.
- channel_axisint, optional
This parameter indicates which axis of the array corresponds to channels.
Added in version 0.19:
channel_axiswas added in 0.19.
- Returns:
- outndarray of shape (…, C=3, …)
The image in YUV format. Same dimensions as input.
- Raises:
- ValueError
If
rgbis not at least 2-D with shape (…, C=3, …).
Notes
Y is between 0 and 1. Use YCbCr instead of YUV for the color space commonly used by video codecs, where Y ranges from 16 to 235.
References