Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

Vec3Real64 Impala::Core::Array::Element::ColXYZ2RGB ( const Vec3Real64 &  v  )  [inline]

Conversion from XYZ (1931) to RGB(Rec709).

ColXYZ2RGB.gif

Definition at line 66 of file ColConvert.h.

References Impala::Core::Array::Element::Vec3Real64::X(), Impala::Core::Array::Element::Vec3Real64::Y(), and Impala::Core::Array::Element::Vec3Real64::Z().

Referenced by Impala::Core::Array::Element::Color::ToHSI(), and Impala::Core::Array::Element::Color::ToRGB().

00067 {
00068     // Using rec709
00069     // R = 255 * (3.240479 X/100 - 1.537150 * Y/100 - 0.498535 * Z/100)
00070     // G = 255 * (-0.969256 * X/100 + 1.875992 * Y/100 + 0.041556 * Z/100)
00071     // B = 255 * (0.055648 * Z/100 - 0.204043 * Y/100 + 1.057311 * Z/100)
00072 
00073     double R = v.X() * 8.25322145 + v.Y() * -3.9197325 + v.Z() * -1.27126425;
00074     double G = v.X() * -2.4716028 + v.Y() * 4.7837796 + v.Z() * 0.1059678;
00075     double B = v.X() * 0.1419024 + v.Y() * -0.52030965 + v.Z() * 2.69614305;
00076 
00077     return Vec3Real64(R, G, B);
00078 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:17:23 2011 for ImpalaSrc by  doxygen 1.5.1