%**********************************************************
%**          2D Transformace s Haarovou bazi             **
%**               Diskrétní transformace                 **
%**       Leos Marsalek  Leos.Marsalek@tiscali.cz        **
%**       Jan Skapa Jeniczek.s@seznam.cz (c) 2003        **
%**********************************************************

Gen_obr;
prepocet256x256;

% spektrum pic1
pic=rgb2ycbcr(pic1);
PIC1=haar_tr2(pic(:,:,1));

% spektrum pic2
pic=rgb2ycbcr(pic2);
PIC2=haar_tr2(pic(:,:,1));

% spektrum pic3
pic=rgb2ycbcr(pic3);
PIC3=haar_tr2(pic(:,:,1));

% spektrum pic4
pic=rgb2ycbcr(pic4);
PIC4=haar_tr2(pic(:,:,1));

% spektrum pic5
pic=rgb2ycbcr(pic5);
PIC5=haar_tr2(pic(:,:,1));

imwrite(PIC1./10,
'pic1_haar.tif','tif');
imwrite(PIC2./10,
'pic2_haar.tif','tif');
imwrite(PIC3./10,
'pic3_haar.tif','tif');
imwrite(PIC4./10,
'pic4_haar.tif','tif');
imwrite(PIC5./10,
'pic5_haar.tif','tif');