%EUSIPCO 2012
%Imperial College London 
%Andriy Gelman, Jon Onativia and Pier Luigi Dragotti

%code loads multiview data and compresses at a target bit rate

%select bit rate in bits per pixel
bpp = 0.1; 

%select dataname in folder data 
addpath('Data');
data_name = 'tsukuba.mat'; %4 images
%data_name = 'teddy.mat'; %4 images
%data_name = 'animal_farm.mat'; %16 images

cd('Code');
[psnr, output_rate, output] = run_method(data_name, 0.1);
cd('..');

load(data_name);
figure, subplot(1,2,1);
imagesc(in(:,:,1)), colormap
('gray');
title('Original')

subplot(1,2,2);
imagesc(output(:,:,1)), colormap('gray');
title_str = ['Compressed at ', num2str(output_rate, 3),'bpp, ', 'PSNR = ', num2str(psnr, 4), 'dB', ];
title(title_str);


