%
% AWB Tool v3.14 (04-Jun-2018) 
% date of creation : 2020-01-19 13:41:21 
%
%

% 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.6767292465234086  -0.0572717567324699  0.7340010032558789
             0.4568415409816908  -0.8144854894640200  0.3576439484823281]
n0 = [-0.7321238571709706  -0.6811715332873947]
d0 = [-2.8901685500378447]



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

mu{1} = [-0.0810756253830853  -0.0364896628958510]

invCovMatrix{1} = [1777.5239449602143000  1984.3087524217565000
                   1984.3087524217565000  3573.7096844994312000]

expScale{1} = [247.3245955607911500]


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

mu{2} = [0.1085864559957833  -0.0577594315806614]

invCovMatrix{2} = [373.2098524863769200  233.6275802672948600
                   233.6275802672948600  1586.4943238103176000]

expScale{2} = [116.6849397191284800]


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

mu{3} = [0.1670052961346245  -0.0364896628958509]

invCovMatrix{3} = [303.9130403648637200  -13.0288686967525780
                   -13.0288686967525780  1364.0701621366629000]

expScale{3} = [102.4528913655072700]


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

mu{4} = [0.0312358266742204  -0.0948060665044042]

invCovMatrix{4} = [441.1318543112905100  -185.7079134926914600
                   -185.7079134926914600  1247.6648993922699000]

expScale{4} = [114.3146154536698200]


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

mu{5} = [0.0153824556009275  -0.0386769654428791]

invCovMatrix{5} = [396.4106243395814300  74.8276322062836100
                   74.8276322062836100  1174.7619338788184000]

expScale{5} = [107.9545687888060400]


%
%for C drivers only: 

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

%PCA Matrix: 
%    -0.67673f,  -0.05727f,  0.73400f, 
%    0.45684f,  -0.81449f,  0.35764f 

%

%// Center line of polygons {f_N0_Rg, f_N0_Bg, f_d}
%const tsIsiLine OV5630_tCenterLine = { -0.7321238571709706f,	-0.6811715332873947f,	-2.8901685500378447f};

%// 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.10000f,	1.21795f,	1.34039f,	1.44872f,	1.60389f,	1.69755f,	1.83468f,	1.97407f,	2.09653f,	2.22070f,	2.38721f,	2.47075f,	2.61645f,	2.75878f,	2.88474f,	3.01083f};
%FLOAT  afMaxDist1[AWB_CLIP_PARM_ARRAY_SIZE_1] = { -0.17869f,	-0.08050f,	-0.02806f,	 0.02009f,	 0.08728f,	 0.12537f,	 0.16792f,	 0.19360f,	 0.22610f,	 0.23598f,	 0.23880f,	 0.23312f,	 0.14264f,	 0.03756f,	-0.07489f,	-0.25336f};

%FLOAT  afRg2[AWB_CLIP_PARM_ARRAY_SIZE_2]      = { 1.10000f,	1.18419f,	1.33825f,	1.46411f,	1.61260f,	1.78314f,	1.87111f,	1.94216f,	2.07753f,	2.21520f,	2.37208f,	2.49064f,	2.61992f,	2.74192f,	2.87579f,	3.01083f};
%FLOAT  afMaxDist2[AWB_CLIP_PARM_ARRAY_SIZE_2] = { 0.21869f,	 0.20647f,	 0.17074f,	 0.16353f,	 0.20530f,	 0.30178f,	 0.20159f,	 0.11453f,	 0.00948f,	-0.05877f,	-0.10334f,	-0.07561f,	-0.03757f,	 0.05534f,	 0.16698f,	 0.29336f};

%// 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.95006f,	1.10011f,	1.25017f,	1.42101f,	1.57221f,	1.68394f,	1.83291f,	1.99713f,	2.14216f,	2.30133f,	2.44469f,	2.60452f,	2.74401f,	2.92023f,	3.05083f};
%FLOAT afGlobalGainDistance1[AWB_GLOBAL_FADE1_ARRAY_SIZE] = { -0.25261f,	-0.17349f,	-0.09885f,	-0.02692f,	 0.07708f,	 0.16381f,	 0.20660f,	 0.25036f,	 0.28999f,	 0.33335f,	 0.34112f,	 0.34727f,	 0.24114f,	 0.14717f,	 0.00853f,	-0.22118f};

%FLOAT afGlobalFade2[AWB_GLOBAL_FADE2_ARRAY_SIZE]         = { 0.80000f,	0.95006f,	1.10011f,	1.25017f,	1.41223f,	1.53078f,	1.77758f,	1.90727f,	1.99750f,	2.12779f,	2.27451f,	2.42520f,	2.58894f,	2.75072f,	2.90077f,	3.05083f};
%FLOAT afGlobalGainDistance2[AWB_GLOBAL_FADE2_ARRAY_SIZE] = { 0.45261f,	 0.37349f,	 0.29885f,	 0.22692f,	 0.21444f,	 0.24217f,	 0.39922f,	 0.25202f,	 0.14874f,	 0.03567f,	-0.00502f,	-0.02616f,	 0.03968f,	 0.10385f,	 0.24783f,	 0.42118f};

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

%

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

%Inverse Covariance Matrix (1): 
%    1777.52394f,  1984.30875f, 
%    1984.30875f,  3573.70968f 

%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.10859f,  -0.05776f 

%Inverse Covariance Matrix (2): 
%    373.20985f,  233.62758f, 
%    233.62758f,  1586.49432f 

%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.16701f,  -0.03649f 

%Inverse Covariance Matrix (3): 
%    303.91304f,  -13.02887f, 
%    -13.02887f,  1364.07016f 

%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.03124f,  -0.09481f 

%Inverse Covariance Matrix (4): 
%    441.13185f,  -185.70791f, 
%    -185.70791f,  1247.66490f 

%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.01538f,  -0.03868f 

%Inverse Covariance Matrix (5): 
%    396.41062f,  74.82763f, 
%    74.82763f,  1174.76193f 

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

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