bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / color / colorconv / xyz2rgb
function
skimage.color.colorconv:xyz2rgb
source: /dev/scikit-image/src/skimage/color/colorconv.py:757
Signature
def xyz2rgb(xyz, *, channel_axis = -1)Summary
XYZ to RGB color space conversion.
Parameters
xyz: (..., C=3, ...) array_likeThe image in XYZ format. By default, the final dimension denotes channels.
channel_axis: int, optionalThis parameter indicates which axis of the array corresponds to channels.
Returns
out: (..., C=3, ...) ndarrayThe image in RGB format. Same dimensions as input.
Raises
: ValueErrorIf
xyzis not at least 2-D with shape (..., C=3, ...).
Notes
The CIE XYZ color space is derived from the CIE RGB color space. Note however that this function converts to sRGB.
Examples
from skimage import data from skimage.color import rgb2xyz, xyz2rgb img = data.astronaut() img_xyz = rgb2xyz(img) img_rgb = xyz2rgb(img_xyz)✓
Aliases
skimage.color.xyz2rgb