frudawski

ciespec2xyz

The ciespec2xyz function calculates the normalized CIE 1931 colour coordinates x,y,z, also known as normalized Tristimulus values, for a given spectral power distribution (SPD). Any errors in the data set or in results generated from the reference data or the Lighting Toolbox are not in the liability of the CIE nor me, see license.

Usage:

[xyz,x,y,z,XYZ] = ciespec2xyz(lam,spec,observer)

Where:

ParameterDescription
xyzIs a vector containing the normalized Tristimulus values.
xIs a scalar containing only the normalized x component of the Tristimulus values.
yIs a scalar containing only the normalized y component of the Tristimulus values.
zIs a scalar containing only the normalized z component of the Tristimulus values.
XYZIs a vector containing the non-normalized Tristimulus values.
lamIs a vector specifying the spectral wavelengths steps.
specIs a vector or row-wise matrix containing the spectral power distribution(s).
observer
(optional)
Defines the CIE standard observer: 'xyz' for 2° standard observer (default) or 'xyz10' for 10° standard observer.

Note: For several input spectra use a row-wise matrix.

Note: For the determination of Tristimulus values XYZ one can also use the ciespec2unit function with reference ’xyz’.

Examples

Determine the normalized Tristimulus values for standard illuminant ‘D65’:

lam = 360:830;
spec = ciespec(lam,'D65');
xyz = ciespec2xyz(lam,spec)

See also: ciespec

Result:

xyz =

    0.3127    0.3290    0.3582

Determine the normalized x and y component of the Tristimulus values for standard illuminant ‘D65’:

lam = 360:830;
spec = ciespec(lam,'D65');
[~,x,y] = ciespec2xyz(lam,spec)
plotciexy(x,y)

See also: ciespec, plotciexy

Result:

x = 0.3127
y = 0.3290

Determine the normalized x and y component of the Tristimulus values for standard illuminants ‘A’ and ‘D65’:

lam = 360:830;
spec = ciespec(lam,{'A','D65'});
[~,x,y] = ciespec2xyz(lam,spec)

See also: ciespec

Result:

x =
    0.4475
    0.3127

y =
    0.4074
    0.3290

Determine the Tristimulus values for standard illuminants ‘A’ and ‘D65’:

lam = 360:830;
spec = ciespec(lam,{'A','D65'});
[~,~,~,~,XYZ] = ciespec2xyz(lam,spec)

See also: ciespec

Result:

XYZ =

   8.0942e+06   7.3689e+06   2.6226e+06
   6.8599e+06   7.2173e+06   7.8584e+06

Note: The same results can be achieved with the ciespec2unit function:

lam = 360:830;
spec = ciespec(lam,{'A','D65'});
XYZ = ciespec2unit(lam,spec,'xyz')

Result:

XYZ =

   8.0942e+06   7.3689e+06   2.6226e+06
   6.8599e+06   7.2173e+06   7.8584e+06

Reference

ISO/CIE 11664-1:2019(E): Colorimetry - Part 1: CIE standard colorimetric observers. Commission International de l’Éclairage (CIE), Vienna Austria, 2019.

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know and accept that comments may be saved and published after review.