%
% AWB Tool v3.14 (04-Jun-2018) 
% date of creation : 2020-01-15 17:06:59 
%
%

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

% Sensor Sensitivity:
sensorFilename = 'OV2775_sensitivity.txt'

% Multispectral database: 55 images

%

tau1 = {0.9  1  1  1  1  }
tau2 = {0.98  1  1  1  1  }

%


means = [0.3162113724095002  0.4502781600456095  0.2335104675448902]

PCAmatrix = [-0.7894080847189167  0.2140769213745175  0.5753311633443999
             0.2085702338472055  -0.7879325722430036  0.5793623383957972]
n0 = [-0.8487090890597350  -0.5288599834997869]
d0 = [-2.5164845997007825]



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

mu{1} = [-0.1619671646570216  0.0532304359461872]

invCovMatrix{1} = [738.4646272511688500  995.7376312137975000
                   995.7376312137975000  4612.7690022084817000]

expScale{1} = [247.3245955607912900]


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

mu{2} = [0.1042575583880048  -0.0103029350447190]

invCovMatrix{2} = [359.4638828896322600  -194.2038185164632000
                   -194.2038185164632000  1600.2402934070628000]

expScale{2} = [116.6849397191284800]


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

mu{3} = [0.0426461452691869  0.0529903304604875]

invCovMatrix{3} = [426.9290497985457500  -339.7839185947362400
                   -339.7839185947362400  1241.0541527029809000]

expScale{3} = [102.4528913655072600]


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

mu{4} = [-0.0444350946864661  -0.0071216463551291]

invCovMatrix{4} = [644.0206469026782100  -396.1818808024326600
                   -396.1818808024326600  1044.7761068008820000]

expScale{4} = [114.3146154536698200]


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

mu{5} = [-0.0767996994111415  0.0235900898643203]

invCovMatrix{5} = [434.2551124161807400  -183.3665076208905300
                   -183.3665076208905300  1136.9174458022192000]

expScale{5} = [107.9545687888060400]


%
%for C drivers only: 

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

%PCA Matrix: 
%    -0.78941f,  0.21408f,  0.57533f, 
%    0.20857f,  -0.78793f,  0.57936f 

%

%// Center line of polygons {f_N0_Rg, f_N0_Bg, f_d}
%const tsIsiLine OV5630_tCenterLine = { -0.8487090890597350f,	-0.5288599834997869f,	-2.5164845997007825f};

%// 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]      = { 1.24861f,	1.30164f,	1.35467f,	1.40770f,	1.46073f,	1.51376f,	1.56679f,	1.61982f,	1.67285f,	1.72588f,	1.77891f,	1.83194f,	1.88497f,	1.93800f,	1.99103f,	2.04406f};
%FLOAT  afMaxDist1[AWB_CLIP_PARM_ARRAY_SIZE_1] = { -0.03745f,	-0.01439f,	 0.00714f,	 0.02714f,	 0.04524f,	 0.06153f,	 0.07529f,	 0.08583f,	 0.09269f,	 0.09453f,	 0.08959f,	 0.07486f,	 0.04615f,	-0.00284f,	-0.07060f,	-0.15241f};

%FLOAT  afRg2[AWB_CLIP_PARM_ARRAY_SIZE_2]      = { 1.24861f,	1.30164f,	1.35467f,	1.40770f,	1.46073f,	1.51376f,	1.56679f,	1.61982f,	1.67285f,	1.72588f,	1.77891f,	1.83194f,	1.88497f,	1.93800f,	1.99103f,	2.04406f};
%FLOAT  afMaxDist2[AWB_CLIP_PARM_ARRAY_SIZE_2] = { 0.04745f,	 0.02439f,	 0.00286f,	-0.01714f,	-0.03524f,	-0.05153f,	-0.06529f,	-0.07583f,	-0.08269f,	-0.08453f,	-0.07959f,	-0.06486f,	-0.03615f,	 0.01284f,	 0.08060f,	 0.16241f};

%// 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.80000f,	0.88560f,	0.97121f,	1.05681f,	1.14242f,	1.22802f,	1.31362f,	1.39923f,	1.48483f,	1.57044f,	1.65604f,	1.74164f,	1.82725f,	1.91285f,	1.99846f,	2.08406f};
%FLOAT afGlobalGainDistance1[AWB_GLOBAL_FADE1_ARRAY_SIZE] = { -0.17373f,	-0.12529f,	-0.07917f,	-0.03420f,	 0.00799f,	 0.04834f,	 0.08556f,	 0.11892f,	 0.14809f,	 0.17093f,	 0.18599f,	 0.18884f,	 0.17187f,	 0.11788f,	 0.01391f,	-0.12359f};

%FLOAT afGlobalFade2[AWB_GLOBAL_FADE2_ARRAY_SIZE]         = { 0.80000f,	0.88560f,	0.97121f,	1.05681f,	1.14242f,	1.22802f,	1.31362f,	1.39923f,	1.48483f,	1.57044f,	1.64290f,	1.78101f,	1.84397f,	1.91285f,	1.99846f,	2.08406f};
%FLOAT afGlobalGainDistance2[AWB_GLOBAL_FADE2_ARRAY_SIZE] = { 0.37373f,	0.32529f,	0.27917f,	0.23420f,	0.19201f,	0.15166f,	0.11444f,	0.08108f,	0.05191f,	0.02907f,	0.09346f,	0.11678f,	0.09897f,	0.08212f,	0.18609f,	0.32359f};

%// values for the configuration file:
fRgProjIndoorMin = 1.2486
fRgProjMax = 2.0441
fRgProjMaxSky = 2.0841
fRgProjOutdoorMin = 1.7259
clipOutdoor = 'D50' 

%

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

%Inverse Covariance Matrix (1): 
%    738.46463f,  995.73763f, 
%    995.73763f,  4612.76900f 

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

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

%

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

%Inverse Covariance Matrix (2): 
%    359.46388f,  -194.20382f, 
%    -194.20382f,  1600.24029f 

%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.04265f,  0.05299f 

%Inverse Covariance Matrix (3): 
%    426.92905f,  -339.78392f, 
%    -339.78392f,  1241.05415f 

%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.04444f,  -0.00712f 

%Inverse Covariance Matrix (4): 
%    644.02065f,  -396.18188f, 
%    -396.18188f,  1044.77611f 

%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.07680f,  0.02359f 

%Inverse Covariance Matrix (5): 
%    434.25511f,  -183.36651f, 
%    -183.36651f,  1136.91745f 

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

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