% Eric Dubois 2014-06-05 % Nonlinear function in the XYZ to CIELAB conversion % Input x values should be between 0 and 1 function forw = f_xyz2lab(x) %constants c1 = (29/6)^2/3; c2 = (6/29)^3; c3 = 4/29; forw = x.^(1/3); forw(x < c2) = c1*x(x < c2) + c3;