Im=imread('barbara_vyrez.png');


for extrap=6:15
    for patch=3:16


[extra,obj1,obj2]=extrapolation(Im,extrap,1,[8,patch]);
[normal,ob1,ob2]=extrapolate_ksvd(Im,extrap,1,[8,patch]);

psnr_extrap8(extrap-5,patch-2)=obj1;
psnr_kvsd8(extrap-5,patch-2)=ob1;
ssim_extrap8(extrap-5,patch-2)=obj2;
ssim_kvsd8(extrap-5,patch-2)=ob2;

    end
end


% for extrap=5:15
%     for direction=1:2
% 
% 
% [extra,obj1,obj2]=extrapolation(Im,extrap,direction,[8,8]);
% [normal,ob1,ob2]=extrapolate_ksvd(Im,extrap,direction,8);
% 
% psnr_extrap8(extrap-4,direction)=obj1;
% psnr_kvsd8(extrap-4,direction)=ob1;
% ssim_extrap8(extrap-4,direction)=obj2;
% ssim_kvsd8(extrap-4,direction)=ob2;
% 
%     end
% end


% for extrap=5:25
%     for direction=1:2
% 
% 
% [extra,obj1,obj2]=extrapolation(Im,extrap,direction,16);
% [normal,ob1,ob2]=extrapolate_ksvd(Im,extrap,direction,16);
% 
% psnr_extrap16(extrap-4,direction)=obj1;
% psnr_kvsd16(extrap-4,direction)=ob1;
% ssim_extrap16(extrap-4,direction)=obj2;
% ssim_kvsd16(extrap-4,direction)=ob2;
% 
%     end
% end