Convert RGB to CIE 1931 XYZ
If you specify the input RGB color space as 'linear-rgb'
,
then rgb2xyz
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 CIE 1931 XYZ color space, perform the
conversion in two steps:
RGBadobe = lin2rgb(RGBlinadobe,'ColorSpace','adobe-rgb-1998'); XYZ = rgb2xyz(RGBadobe,'ColorSpace','adobe-rgb-1998');