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

src/F2/Platform.cpp

00001 #include <FCam/processing/Color.h>
00002 #include "Platform.h"
00003 
00004 
00005 namespace FCam { namespace F2 {
00006     
00007     // \todo Do full calibration for F2.
00008     // Copied from N900 for now
00009     void Platform::rawToRGBColorMatrix(int kelvin, float *matrix) {      
00010         float alpha = (1./kelvin-1./3200)/(1./7000-1./3200);
00011         colorMatrixInterpolate(RawToRGBColorMatrix3200K,
00012                                RawToRGBColorMatrix7000K,
00013                                alpha, matrix);
00014     }
00015     
00016     // These are quick and dirty numbers computed using a random
00017     // outdoor overcast day, and interior office lighting.  The 3x3
00018     // linear portion of the matrices are scaled so that the minimum
00019     // row sum is one (i.e. saturated in all channels maps to white).
00020     float Platform::RawToRGBColorMatrix3200K[] = {                
00021         1.6697,   -0.2693,   -0.4004,  -42.4346,
00022         -0.3576,    1.0615,    1.5949,  -37.1158,
00023         -0.2175,  -1.8751,    6.9640,  -26.6970
00024     };
00025         
00026     float Platform::RawToRGBColorMatrix7000K[] = {
00027         2.2997,   -0.4478,    0.1706,  -39.0923,
00028         -0.3826,    1.5906,   -0.2080,  -25.4311,
00029         -0.0888,   -0.7344,    2.2832,  -20.0826
00030     };
00031     
00032     std::string Platform::manufacturer = "Stanford University";
00033     std::string Platform::model = "F2 Frankencamera";
00034     unsigned short Platform::minRawValue = 0;
00035     unsigned short Platform::maxRawValue = 1024;
00036     BayerPattern Platform::bayerPattern = GRBG;
00037 }}

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