M-File Help: tristim2cc | View code for tristim2cc |
Tristimulus to chromaticity coordinates
cc = tristim2cc(tri) is the chromaticity coordinate (1x2) corresponding to the tristimulus tri (1x3). If tri is RGB then cc is rg, if tri is XYZ then cc is xy. Multiple tristimulus values can be given as rows of tri (Nx3) in which case the chromaticity coordinates are the corresponding rows of cc (Nx2).
[c1,C2] = tristim2cc(tri) as above but the chromaticity coordinates are returned in separate vectors, each Nx1.
out = tristim2cc(im) is the chromaticity coordinates corresponding to every pixel in the tristimulus image im (HxWx3). out (HxWx2) has planes corresponding to r and g, or x and y.
[o1,o2] = tristim2cc(im) as above but the chromaticity is returned as separate images (HxW).
© 1990-2012 Peter Corke.