Products & Services Solutions Academia Support User Community Company

Learn more about Image Processing Toolbox   

xyz2double - Convert XYZ color values to double

Syntax

xyxd = xyz2double(XYZ)

Description

xyxd = xyz2double(XYZ) converts an M-by-3 or M-by-N-by-3 array of XYZ color values to double. xyzd has the same size as 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)

uint16 Value

0.0

0

1.0

32768

1.0 + (32767/32768)

65535

Class Support

xyz is a uint16 or double array that must be real and nonsparse. xyzd is of class double.

Examples

Convert uint16-encoded XYZ values to double.

xyz2double(uint16([100 32768 65535]))
ans =

  3.0518e-003  1.0000e+000  2.0000e+000

See Also

applycform, lab2double, lab2uint16, lab2uint8, makecform, whitepoint, xyz2uint16

For a full list of the toolbox color space conversion functions, see Color Space Conversions.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS