%%%%%%%YCxCz to XYZ
function img = ycxcz2rgb2(ycxcz)

%Indigo press white point
Xn=0.8594;
Yn=0.8872;
Zn=0.7945;

y0=ycxcz(:,:,1)/116;
x0=ycxcz(:,:,2)/500+y0;
z0=y0-ycxcz(:,:,3)/200;
% xyz_update=[x0*Xn y0*Yn z0*Zn];
xyz = zeros(size(ycxcz));
xyz(:,:,1) = x0*Xn;
xyz(:,:,2) = y0*Yn;
xyz(:,:,3) = z0*Zn;

%%%%%%%%%XYZ to sRGB%%%%%%%%%
img_sRGB=XYZ2sRGB(xyz,50);
%%%gamma correction
img=real(uint8(255*(img_sRGB.^(1/2.2))));