0001 0002 function [dcti] = icontrast_2(dctc,Lm,Ncuan,norm) 0003 par = norm(2); 0004 norm = norm(1); 0005 Lb = 2^Ncuan; 0006 Li = Lb^2; 0007 DC = 16 .* Lm; 0008 for i = 1:Lb:Li 0009 for j = 1:Lb:Li 0010 dc = zeros(Lb,Lb); 0011 0012 bloque = dctc(i:i+Lb-1,j:j+Lb-1); 0013 if(norm == 1) 0014 0015 dc(2:Lb,1) = bloque(2:Lb,1) * DC(round(i/Lb + 1),round(j/Lb + 1)) / 2; 0016 dc(1,2:Lb) = bloque(1,2:Lb) * DC(round(i/Lb + 1),round(j/Lb + 1)) / 2; 0017 dc(2:Lb,2:Lb) = bloque(2:Lb,2:Lb) * DC(round(i/Lb + 1),round(j/Lb + 1)) / 4; 0018 dc(1,1) = DC(round(i/Lb + 1),round(j/Lb + 1)); 0019 end 0020 dcti(i:i+Lb-1,j:j+Lb-1) = dc; 0021 end 0022 end