skimage2.color.lch2lab#
- skimage2.color.lch2lab(lch, *, channel_axis=-1)[source]#
Convert image in CIE-LCh to CIE-LAB color space.
CIE-LCh is the cylindrical representation of the CIE-LAB (Cartesian) color space.
- Parameters:
- lcharray_like of shape (…, C=3, …)
The input image in CIE-LCh color space. Unless
channel_axisis set, the final dimension denotes the CIE-LAB channels. The L* values range from 0 to 100; the C values range from 0 to 100; the h values range from 0 to2*pi.- 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:
- outndarray of shape (…, C=3, …)
The image in CIE-LAB format, of same shape as input.
- Raises:
- ValueError
If
lchdoes not have at least 3 channels (i.e., L*, C, and h).
See also
Notes
The h channel (i.e., hue) is expressed as an angle in range
(0, 2*pi).References
Examples
>>> from _skimage2 import data >>> from _skimage2.color import rgb2lab, lch2lab, lab2lch >>> img = data.astronaut() >>> img_lab = rgb2lab(img) >>> img_lch = lab2lch(img_lab) >>> img_lab2 = lch2lab(img_lch)