bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / color / colorconv / rgb2xyz
function
skimage.color.colorconv:rgb2xyz
source: /dev/scikit-image/src/skimage/color/colorconv.py:810
Signature
def rgb2xyz(rgb, *, channel_axis = -1)Summary
RGB to XYZ color space conversion.
Parameters
rgb: (..., C=3, ...) array_likeThe image in RGB 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 XYZ format. Same dimensions as input.
Raises
: ValueErrorIf
rgbis 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 from sRGB.
Examples
from skimage import data img = data.astronaut() img_xyz = rgb2xyz(img)✓
Aliases
skimage.color.rgb2xyz