bundles / skimage 0.26.1rc0.dev0 / skimage / color / colorconv / lab2lch
function
skimage.color.colorconv:lab2lch
source: /_skimage2/color/colorconv.py:1810
Signature
def lab2lch(lab, *, channel_axis = -1)Summary
Convert image in CIE-LAB to CIE-LCh color space.
Extended Summary
CIE-LCh is the cylindrical representation of the CIE-LAB (Cartesian) color space.
Parameters
lab: array_like of shape (..., C=3, ...)The input image in CIE-LAB color space. Unless
channel_axisis set, the final dimension denotes the CIE-LAB channels. The L* values range from 0 to 100; the a* and b* values range from -128 to 127.channel_axis: int, optionalThis parameter indicates which axis of the array corresponds to channels.
Returns
out: ndarray of shape (..., C=3, ...)The image in CIE-LCh color space, of same shape as input.
Raises
: ValueErrorIf
labdoes not have at least 3 channels (i.e., L*, a*, and b*).
Notes
The h channel (i.e., hue) is expressed as an angle in range (0, 2*pi).
Examples
from skimage import data from skimage.color import rgb2lab, lab2lch img = data.astronaut() img_lab = rgb2lab(img) img_lch = lab2lch(img_lab)✓
See also
Aliases
skimage.color.lab2lch