FUNCTION REFERENCE
rgb2lab
Convert sRGB colors to CIE 1976 L*a*b*.
Convert sRGB colors to CIE 1976 L*a*b*.
Syntax
L = rgb2lab(RGB, 'WhitePoint', white, 'ColorSpace', space)Accepts P-by-3 colormaps or M-by-N-by-3 images of class double, single, uint8 or uint16; returns double with the same shape. WhitePoint is d65 (default), d50, a, c, e, icc, or a positive 1-by-3 vector. ColorSpace is srgb (default), adobe-rgb-1998 or linear-rgb. Uses published RGB/XYZ matrices, Bradford adaptation and the CIE Lab formula.
Example
rgb2lab([1 0 0; 0 1 0; 0 0 1])Differences from MATLAB: Single input returns double as specified by this app-engine contract. Four-dimensional image stacks and other RGB spaces are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.