Convert RGB to CIE 1976 L*a*b*
If you specify the input RGB color space as 'linear-rgb'
,
then rgb2lab
assumes the input values are linearized sRGB
values. If instead you want the input color space to be linearized Adobe RGB
(1998), then you can use the lin2rgb
function.
For example, to convert linearized Adobe RGB (1998) image
RGBlinadobe
to the CIE 1976 L*a*b* color space, perform
the conversion in two steps:
RGBadobe = lin2rgb(RGBlinadobe,'ColorSpace','adobe-rgb-1998'); LAB = rgb2lab(RGBadobe,'ColorSpace','adobe-rgb-1998');