[Radiance-general] RGB to CIE-XYZ
Raphael Compagnon
raphael.compagnon at eif.ch
Wed Jun 29 09:38:13 CEST 2005
Hi Nina,
These are the formulas you need to convert from Yxy to radiance-rgb:
X=x*Y/y;
Z=(1-x-y)*Y/y;
r= 2.565*X -1.167*Y -0.398*Z;
g= -1.022*X +1.978*Y +0.044*Z;
b= 0.075*X -0.252*Y +1.177*Z;
Raphael
At 28.06.2005 17:25, you wrote:
>Hi all!
>
>I have a question about converting RGB to CIE-XYZ with xyz_rgb.cal.
>
>For transforming XYZ into RGB I can use this lines:
>
>rcalc -f xyz_rgb.cal -e 'ix=$1;iy=$2;iY=$3' -f xyz_rgb.cal \
>-e 'iX=ix/iy*iY;iZ=(1-ix-iy)/iy*iY' \
>-e '$1=R(iX,iY,iZ) ; $2=G(iX,iY,iZ) ; $3=B(iX,iY,iZ)'
>
>
>But there is also a part for calculating CIE-XYZ from RGB values, isn´t it?
>
>Unfortenatly, I don´t know what lines I have to write.
>
>Thanks,
>
>Nina
>
>
>_______________________________________________
>Radiance-general mailing list
>Radiance-general at radiance-online.org
>http://www.radiance-online.org/mailman/listinfo/radiance-general
More information about the Radiance-general
mailing list