function [a] = falki(I,rec) %% falkowe przetwarzanie wstepne haar=[1 1]/sqrt(2); %Daubechies 8 daub8 = [0.2303778133088964 0.7148465705529154 0.6308807679398587 -0.0279837694168599 -0.1870348117190931 0.0308413818355607 0.0328830116668852 -0.0105974017850690]; %Coif3 coif3=[-0.003793512864,0.007782596426,0.023452696142,-0.065771911281,-0.061123390003,.405176902410,0.793777222626,0.428483476378,-0.071799821619,-0.082301927106,0.034555027573,0.015880544864,-0.009007976137,-0.002574517688,0.001117518771,0.000466216960,-0.000070983303,-0.000034599773]; %tspline2 tspl2=[.353553,.707107,.353553]; spl2=[-0.176777,0.353553,1.060660,0.353553,-0.176777]; adelson= [0.028220367,-0.060394127,-0.07388188,0.41394752,0.7984298,0.41394752,-0.07388188, -0.060394127,0.028220367]; anton_a=[0,3.782845550699535e-02,-2.384946501937986e-02,-1.106244044184226e-01,3.774028556126536e-01,8.526986790094022e-01,3.774028556126537e-01,-1.106244044184226e-01,-2.384946501937986e-02,3.782845550699535e-02]; anton_s=[0,-6.453888262893856e-02,-4.068941760955867e-02,4.180922732222124e-01,7.884856164056651e-01,4.180922732222124e-01,-4.068941760955867e-02,-6.453888262893856e-02,0,0]; ha=anton_a;%/sum(anton_a); %filtr dolnoprzepustowy analizy ga=anton_s;%/sum(anton_s);%MirrorFilt(ha); %liczenie filtrów % ha=daub8; %filtr dolnoprzepustowy analizy % ga=ha; qmf = MakeONFilter('Daubechies',4); falka = 'bior4.4'; clev = 3; [LO_D,HI_D,LO_R,HI_R] =WFILTERS('bior4.4'); LO_D = LO_D/sum(LO_D); LO_R = sum(LO_R) * LO_R;%/sum(LO_R); HI_R = MirrorFilt(LO_D); HI_D = -MirrorFilt(LO_R); s = [263 263; 263 263; 518 518; 1028 1028; 2048 2048]; if rec ==0, [c,s] = wavedec2(I,clev,LO_D,HI_D);%ha,MirrorFilt(ga)); %falka); b = waverec2(c,s,LO_R,HI_R);%ga,MirrorFilt(ha)); %wc = FWT2_PBS(I,clev,ha,ga); a = appcoef2(c,s,LO_R,HI_R,3); else y = wextend('addcol','sym',I,4); y = y(:,2:264); y = wextend('addrow','sym',y,4); y = y(2:264,:); c = [y(:)' zeros(1,3*263*263) zeros(1,3*518*518) zeros(1,3*1028*1028)]; a = waverec2(c,s,LO_R,HI_R); end % return; % [Ea,Edetail] = wenergy2(c,s); % % Ea=Ea/sum(Edetail); features(number) = Ea; number = number+1; %16 ****** 0.1629 % %Ed=Edetail(1)/sum(Edetail); features(number) = Ed; number = number+1; %17 % % for i = 1:2 % detale=detcoef2('compact',c,s,i); %all % % wenergia(i)=sum(sum(detale.^2))/size(detale,2); % % wentropia(i) = entropy(detale); % % [chd,cvd,cdd] = detcoef2('all',c,s,i); % cmax1=max(abs(chd),abs(cvd)); % cmax2=max(abs(cmax1),abs(cdd)); % chdr = chd;%round(chd); % went(i)=joint_ent(cmax2./sum(sum(cmax2)),2); % a=max(max(cmax2));chdd=cmax2.*255/a; [y x] = size(chd); % glcm=graycomatrix(chdd,'GrayLimits',[],'Offset',[0 1]); % wentco(i)=joint_ent(glcm./sum(sum(glcm)),2); % wstats(i) = graycoprops(glcm,'all'); % end