Convert XYZ color values to uint16
xyz16 = xyz2uint16(xyz)
The Image Processing Toolbox™ software follows the convention that double-precision XYZ arrays contain 1931 CIE XYZ values. XYZ arrays that are uint16 follow the convention in the ICC profile specification (ICC.1:2001-4, www.color.org) for representing XYZ values as unsigned 16-bit integers. There is no standard representation of XYZ values as unsigned 8-bit integers. The ICC encoding convention is illustrated by this table.
Value (X, Y, or Z)
1.0 + (32767/32768)