images_dir = 'C:\Manuele\SistemaCBD\ModelSelection\FaceRec\Orl_faces';
% M altezza
% N larghezza
M = 112;
N = 92;
num_classes = 40;

testing_set = [1,3,5,7,8];
training_set = [2,4,6,9,10];

num_instances_training = size(training_set ,2);
num_instances_testing = size(testing_set ,2);

%% Scanning
n_coeff = 3;
ws = 16;
overlap =0.5;

% Training
for(i = 1:num_classes)
   class = ['s',num2str(i)];
   X_training = [];
   
   for(k=1:num_instances_training)
      xi = imread([images_dir,'\',class,'\',num2str(training_set(k)),'.jpg'],'jpg');
      X = DCT_scanning(xi,n_coeff,ws,overlap);
      
   end
   % In X_training ci sono tutti i vettori di training e ora chiamo le procedure 
   % di addestramento  
   % ...
end


% Testing
for(i = 1:num_classes)
   class = ['s',num2str(i)];
   
   for(k=1:num_instances_testing)
      xi = imread([images_dir,'\',class,'\',num2str(testing_set(k)),'.jpg'],'jpg');
      % Chiama la procedura di classificazione
      % ...
   end 
end

