skimage2.color.hsv2rgb#
- skimage2.color.hsv2rgb(hsv, *, channel_axis=-1)[source]#
HSV to RGB color space conversion.
- Parameters:
- hsv(…, C=3, …) array_like
The image in HSV 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:
- out(…, C=3, …) ndarray
The image in RGB format. Same dimensions as input.
- Raises:
- ValueError
If
hsvis not at least 2-D with shape (…, C=3, …).
Notes
Conversion between RGB and HSV color spaces results in some loss of precision, due to integer arithmetic and rounding [1].
References
Examples
>>> from _skimage2 import data >>> from _skimage2.color import rgb2hsv >>> img = data.astronaut() >>> img_hsv = rgb2hsv(img) >>> img_rgb = hsv2rgb(img_hsv)