% Script to automate the process of gathering all relevant data.
% Performs gamma correction and data extraction.

filenames =strvcat('grayControl', 'grayYellow', 'grayBlue', ...
    'specControl', 'specYellow', 'specBlue');
numFiles = size(filenames,1);

gamma = evalGamma;

% Invert gamma for correction value
gamma = 1./gamma;

% 24 patches, 3 channels, numFiles test images
graySpecData = zeros(24,3,numFiles);

for (i=1:numFiles)
  curFile = deblank(filenames(i,:));
  disp(['Examining ' curFile '....'])
  
  correctGamma(curFile, curFile, gamma);
  [r g b] = processLabData(curFile);
  
  graySpecData(:,1,i) = r;
  graySpecData(:,2,i) = g;
  graySpecData(:,3,i) = b;
end

save graySpecData graySpecData
disp('All done!')

  
  

	
