• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

src/Dummy/Platform.cpp

00001 #include <FCam/processing/Color.h>
00002 #include <FCam/Dummy/Platform.h>
00003 
00004 
00005 namespace FCam { namespace Dummy {
00006     
00007     void Platform::rawToRGBColorMatrix(int kelvin, float *matrix) const {      
00008 
00009         // Utterly made up matrix - a bit of crosstalk and non-zero black level
00010         static float RawToRGBColorMatrix3200K[] = {                
00011             1.20, -0.1, -0.1, -10,
00012             -0.1, 1.20, -0.1, -10,
00013             -0.1, -0.1, 1.20, -10
00014         };
00015         
00016         // Utterly made up matrix - a bit of crosstalk and non-zero black level
00017         static float RawToRGBColorMatrix7000K[] = {
00018             1.40, -0.2, -0.2, -10,
00019             -0.15, 1.30, -0.15, -10,
00020             0.1, 0.1, 1.00, -10
00021         };
00022 
00023         // Linear interpolation with inverse color temperature
00024         float alpha = (1./kelvin-1./3200)/(1./7000-1./3200);
00025         colorMatrixInterpolate(RawToRGBColorMatrix3200K,
00026                                RawToRGBColorMatrix7000K,
00027                                alpha, matrix);
00028     }
00029 
00030     const Platform &Platform::instance() {
00031         static Platform plat;
00032         return plat;
00033     }
00034 
00035 }}

Generated on Fri Sep 24 2010 15:53:00 for FCam by  doxygen 1.7.1