%
% date of creation: 2020-01-19 13:31:56 
%

% Image: D65_S_G3_T30_0.raw
% Backg.: D65_bg_S_G3_T30_5.raw
% LSC Profile: D65_lsc_para_100.txt

wb = [2.5221090801041632  1.0000000000000000  1.3713587670247755];

ctm = 	[ 1.7873495101139687  -0.6332190777265754  -0.1409969010173614
	 -0.3102218884050790   1.6904136819809312  -0.3397984764417790
	 -0.0007571492841148  -0.5055904614092850   1.5943144856043583];

% Black Level Subtraction coefficients (red, green1, green2, blue): [0  0  0  0]

successional_color_offset = [-53.7818109602809140  -19.3378356730210150  -43.4053823956069920];
% Note: The additive offset is determined for 12-bit images!

% Weights for fitting:
%
% 1  1  1  1  1  1
% 1  1  1  1  1  1
% 1  1  1  1  1  1
% 1  1  1  1  1  1

%This output is for internal data exchange between the MATLAB tools. Do not edit!
%These values are the average of the linear raw color checker patches (with BLS+LSC and shading compensation using the background image (but without the BLS values entered in the GUI)!

target_raw_red = [
     135.294,	 421.398,	 146.667,	 108.610,	 225.186,	 229.149, 
     501.984,	 110.499,	 377.985,	  93.386,	 307.767,	 518.224, 
      68.743,	 132.046,	 305.757,	 627.560,	 387.860,	 106.302, 
     864.648,	 573.256,	 357.348,	 186.430,	  98.864,	  41.840, 
];

target_raw_green = [
      227.178,	 722.229,	 469.614,	 295.930,	 553.176,	 962.123, 
      578.570,	 363.841,	 351.585,	 165.081,	 883.268,	 771.551, 
      227.022,	 552.611,	 238.243,	1146.046,	 427.841,	 586.896, 
     2125.393,	1418.740,	 880.879,	 452.265,	 237.557,	  93.542, 
];

target_raw_blue = [
      131.945,	 417.177,	 470.149,	 147.847,	 575.144,	 657.701, 
      168.199,	 539.621,	 216.189,	 201.263,	 269.514,	 203.380, 
      375.044,	 237.222,	 116.519,	 272.851,	 442.683,	 573.723, 
     1464.132,	1003.604,	 626.853,	 323.701,	 173.277,	  71.562, 
];

avgRGB = [368.525,	 929.460,	 677.766,]; % average over background image!

%-------------------------------------------------- 
