rgb2xyz

rgb2xyz

skimage.color.rgb2xyz(rgb) [source]

RGB to XYZ color space conversion.

Parameters:

rgb : array_like

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

Returns:

out : ndarray

The image in XYZ format, in a 3- or 4-D array of shape (.., ..,[ ..,] 3).

Raises:

ValueError

If rgb is not a 3- or 4-D array of shape (.., ..,[ ..,] 3).

Notes

The CIE XYZ color space is derived from the CIE RGB color space. Note however that this function converts from sRGB.

References

[R53] http://en.wikipedia.org/wiki/CIE_1931_color_space

Examples

>>> from skimage import data
>>> img = data.astronaut()
>>> img_xyz = rgb2xyz(img)
doc_scikit_image
2017-01-12 17:23:18
Comments
Leave a Comment

Please login to continue.