Home > ISET > color > xyz2luv.m

xyz2luv

PURPOSE ^

Convert CIE XYZ values to CIELUV values

SYNOPSIS ^

function luv = xyz2luv(xyz, whitepoint)

DESCRIPTION ^

 Convert CIE XYZ values to CIELUV values

    luv = xyz2luv(xyz, whitepoint)

 The whitepoint is a 3-vector indicating the XYZ of a white object or
 patch in the scene. 

 xyz:  Can be in XW or RGB format.
 whitepoint: a 3-vector of the xyz values of the white point.
     If not given, use [95.05 100 108.88] as default (not recommended).

 LUV is returned in the same format (RGB or XW) as the input matrix xyz.

 Formulae are taken from Hunt's book,page 116. I liked the irony that 116
 is prominent in the formula and that is the page number in Hunt.  Also,
 see Wyszecki and Stiles book.

 Examples:
    [val,vci] = vcGetSelectedObject('VCIMAGE');
    whitepoint = imageGet(vci,'whitepoint')
    xyz = imageGet(vci,'XYZ')
    xyz = [xyz; whitepoint]
    xyz2luv(xyz,whitepoint)

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 20-Nov-2008 22:09:04 by m2html © 2003