hsv2rgb

hsv2rgb

skimage.color.hsv2rgb(hsv) [source]

HSV to RGB color space conversion.

Parameters:

hsv : array_like

The image in HSV format, in a 3-D array of shape (.., .., 3).

Returns:

out : ndarray

The image in RGB format, in a 3-D array of shape (.., .., 3).

Raises:

ValueError

If hsv is not a 3-D array of shape (.., .., 3).

Notes

The conversion assumes an input data range of [0, 1] for all color components.

Conversion between RGB and HSV color spaces results in some loss of precision, due to integer arithmetic and rounding [R43].

References

[R43] (1, 2) http://en.wikipedia.org/wiki/HSL_and_HSV

Examples

>>> from skimage import data
>>> img = data.astronaut()
>>> img_hsv = rgb2hsv(img)
>>> img_rgb = hsv2rgb(img_hsv)
doc_scikit_image
2017-01-12 17:21:19
Comments
Leave a Comment

Please login to continue.