%
% AWB Tool v3.14 (04-Jun-2018) 
% date of creation : 2020-01-17 16:19:01 
%
%

% Illuminations:
%  A (Indoor)
%  D50 (Outdoor)
%  D65 (Outdoor)
%  F2 (CWF) (Indoor)
%  F11 (TL84) (Indoor)

% Sensor Sensitivity:
sensorFilename = 'OV2775_sensitivity.txt'

% Multispectral database: 55 images

%

tau1 = {1  1  1  1  1  }
tau2 = {1  1  1  1  1  }

%


means = [0.3162113724095002  0.4502781600456095  0.2335104675448902]

PCAmatrix = [-0.6765390913154972  -0.0576106678431297  0.7341497591586272
             0.4571230956631570  -0.8144615875640398  0.3573384919008818]
n0 = [-0.7663756646701517  -0.6423926685457918]
d0 = [-2.9217796521785275]



% Illumination A:
% ----------------

mu{1} = [-0.0807737880619143  -0.0361782349465160]

invCovMatrix{1} = [1779.1756397474439000  1985.0554771755924000
                   1985.0554771755924000  3572.0579897122079000]

expScale{1} = [247.3245955607912900]


% Illumination D50:
% ----------------

mu{2} = [0.1086981855485236  -0.0577811883040072]

invCovMatrix{2} = [373.4044923859002000  234.1323598831493500
                   234.1323598831493500  1586.2996839107950000]

expScale{2} = [116.6849397191284800]


% Illumination D65:
% ----------------

mu{3} = [0.1674940964646210  -0.0361782349465160]

invCovMatrix{3} = [303.9023810284627400  -12.5877215768721890
                   -12.5877215768721890  1364.0808214730639000]

expScale{3} = [102.4528913655072700]


% Illumination F2 (CWF):
% ----------------

mu{4} = [0.0311264915732221  -0.0945362984038197]

invCovMatrix{4} = [440.9774439011052900  -185.3722422395416300
                   -185.3722422395416300  1247.8193098024547000]

expScale{4} = [114.3146154536698000]


% Illumination F11 (TL84):
% ----------------

mu{5} = [0.0065591165403761  -0.0517407439989669]

invCovMatrix{5} = [396.4730322503351700  75.1514865183146550
                   75.1514865183146550  1174.6995259680641000]

expScale{5} = [107.9545687888060000]


%
%for C drivers only: 

%Mean Values from SVD: 
%    0.31621f,  0.45028f,  0.23351f 

%PCA Matrix: 
%    -0.67654f,  -0.05761f,  0.73415f, 
%    0.45712f,  -0.81446f,  0.35734f 

%

%// Center line of polygons {f_N0_Rg, f_N0_Bg, f_d}
%const tsIsiLine OV5630_tCenterLine = { -0.7663756646701517f,	-0.6423926685457918f,	-2.9217796521785275f};

%// parameter arrays for Rg/Bg color space clipping
%#define AWB_CLIP_PARM_ARRAY_SIZE_1 16
%#define AWB_CLIP_PARM_ARRAY_SIZE_2 16

%FLOAT  afRg1[AWB_CLIP_PARM_ARRAY_SIZE_1]      = { 0.79165f,	1.29529f,	1.46443f,	1.69840f,	1.86278f,	1.96723f,	2.14463f,	2.32692f,	2.41891f,	2.50977f,	2.55415f,	2.62999f,	2.68790f,	2.78095f,	2.89589f,	3.01083f};
%FLOAT  afMaxDist1[AWB_CLIP_PARM_ARRAY_SIZE_1] = { -0.17823f,	 0.16286f,	 0.41145f,	 0.51222f,	 0.55007f,	 0.63058f,	 0.68543f,	 0.63510f,	 0.58780f,	 0.47395f,	 0.33663f,	 0.23533f,	 0.11150f,	-0.03020f,	-0.15212f,	-0.29218f};

%FLOAT  afRg2[AWB_CLIP_PARM_ARRAY_SIZE_2]      = { 0.79738f,	1.27564f,	1.48203f,	1.60186f,	1.79260f,	1.86989f,	1.95978f,	2.07698f,	2.28119f,	2.33243f,	2.43100f,	2.57425f,	2.65440f,	2.76562f,	2.83952f,	3.01083f};
%FLOAT  afMaxDist2[AWB_CLIP_PARM_ARRAY_SIZE_2] = { 0.44965f,	 0.28926f,	 0.09341f,	 0.14274f,	 0.26662f,	 0.28663f,	 0.20652f,	 0.05360f,	-0.13405f,	-0.14474f,	-0.12452f,	-0.14859f,	-0.04948f,	 0.07354f,	 0.22706f,	 0.31218f};

%// parameter arrays for AWB out of range handling
%#define AWB_GLOBAL_FADE1_ARRAY_SIZE 16
%#define AWB_GLOBAL_FADE2_ARRAY_SIZE 16

%FLOAT afGlobalFade1[AWB_GLOBAL_FADE1_ARRAY_SIZE]         = { 0.79608f,	0.97148f,	1.09638f,	1.33366f,	1.49594f,	1.62671f,	1.77359f,	1.95813f,	2.12083f,	2.25930f,	2.39637f,	2.56186f,	2.63270f,	2.79245f,	2.90077f,	3.05083f};
%FLOAT afGlobalGainDistance1[AWB_GLOBAL_FADE1_ARRAY_SIZE] = { -0.04818f,	 0.03744f,	 0.10859f,	 0.35237f,	 0.51764f,	 0.57672f,	 0.61963f,	 0.70238f,	 0.78453f,	 0.76069f,	 0.72572f,	 0.54191f,	 0.35545f,	 0.15486f,	-0.06751f,	-0.25335f};

%FLOAT afGlobalFade2[AWB_GLOBAL_FADE2_ARRAY_SIZE]         = { 0.79066f,	0.95350f,	1.08735f,	1.27777f,	1.42719f,	1.52153f,	1.59422f,	1.79190f,	1.96580f,	2.11352f,	2.26477f,	2.45061f,	2.60066f,	2.75072f,	2.81865f,	3.05083f};
%FLOAT afGlobalGainDistance2[AWB_GLOBAL_FADE2_ARRAY_SIZE] = { 0.56068f,	 0.50625f,	 0.48033f,	 0.40850f,	 0.25679f,	 0.26960f,	 0.31800f,	 0.41629f,	 0.24515f,	 0.08029f,	-0.04241f,	-0.07165f,	-0.00440f,	 0.11150f,	 0.22901f,	 0.45335f};

%// values for the configuration file:
fRgProjIndoorMin = 0.8
fRgProjMax = 3.0108
fRgProjMaxSky = 3.0508
fRgProjOutdoorMin = 2.5512
clipOutdoor = 'D50' 

%

%Illumination A: 
%Mean Value of Gaussian Mixture Model (1): 
%    -0.08077f,  -0.03618f 

%Inverse Covariance Matrix (1): 
%    1779.17564f,  1985.05548f, 
%    1985.05548f,  3572.05799f 

%Factor in Gaussian Mixture Model (1): 
%    247.32460f 

%Thresholds for Switching (tau1 and tau2) (1): 
%    1.00000f,  1.00000f  

%

%Illumination D50: 
%Mean Value of Gaussian Mixture Model (2): 
%    0.10870f,  -0.05778f 

%Inverse Covariance Matrix (2): 
%    373.40449f,  234.13236f, 
%    234.13236f,  1586.29968f 

%Factor in Gaussian Mixture Model (2): 
%    116.68494f 

%Thresholds for Switching (tau1 and tau2) (2): 
%    1.00000f,  1.00000f  

%

%Illumination D65: 
%Mean Value of Gaussian Mixture Model (3): 
%    0.16749f,  -0.03618f 

%Inverse Covariance Matrix (3): 
%    303.90238f,  -12.58772f, 
%    -12.58772f,  1364.08082f 

%Factor in Gaussian Mixture Model (3): 
%    102.45289f 

%Thresholds for Switching (tau1 and tau2) (3): 
%    1.00000f,  1.00000f  

%

%Illumination F2 (CWF): 
%Mean Value of Gaussian Mixture Model (4): 
%    0.03113f,  -0.09454f 

%Inverse Covariance Matrix (4): 
%    440.97744f,  -185.37224f, 
%    -185.37224f,  1247.81931f 

%Factor in Gaussian Mixture Model (4): 
%    114.31462f 

%Thresholds for Switching (tau1 and tau2) (4): 
%    1.00000f,  1.00000f  

%

%Illumination F11 (TL84): 
%Mean Value of Gaussian Mixture Model (5): 
%    0.00656f,  -0.05174f 

%Inverse Covariance Matrix (5): 
%    396.47303f,  75.15149f, 
%    75.15149f,  1174.69953f 

%Factor in Gaussian Mixture Model (5): 
%    107.95457f 

%Thresholds for Switching (tau1 and tau2) (5): 
%    1.00000f,  1.00000f  
%
