% script for the hybrid method training
% stores the table cell -> optimal method in bestmethod

clear images;

images(:,:,1) = double(imread('man.tif'));
images(:,:,2) = double(imread('elaine.tif'));
images(:,:,3) = double(imread('boats512x512.tif'));
images(:,:,4) = double(imread('peppers512x512.tif'));
images(:,:,5) = double(imread('bridge512x512.tif'));
images(:,:,6) = double(imread('airfield512x512.tif'));

if(1)
   [bestmse, bestmethod] = compare(images);
   save 'bestmethod' bestmethod
end

lena = double(imread('lena.tif'));
slena = reduceFunc(lena, 'multi');
rlena = expandFunc(slena, 'multi', bestmethod);

var = variance(rlena - lena)

