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