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

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

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

ColRGB2XYZ.gif

Definition at line 47 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::ToLab(), Impala::Core::Array::Element::Color::ToLuv(), and Impala::Core::Array::Element::Color::ToXYZ().

00048 {
00049     // Using Rec709
00050     // X = 100 * (0.412452 R/255 + 0.357580 G/255 + 0.180423 B/255)
00051     // Y = 100 * (0.212671 R/255 + 0.715160 G/255 + 0.072169 B/255)
00052     // Z = 100 * (0.019334 R/255 + 0.119193 G/255 + 0.950227 B/255)
00053 
00054     double X = v.X() * 0.161746 + v.Y() * 0.140227 + v.Z() * 0.070754;
00055     double Y = v.X() * 0.083400 + v.Y() * 0.280455 + v.Z() * 0.028301;
00056     double Z = v.X() * 0.007582 + v.Y() * 0.046742 + v.Z() * 0.372638;
00057     
00058     return Vec3Real64(X, Y, Z);
00059 }

Here is the call graph for this function:


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