idct2r

PURPOSE ^

SYNOPSIS ^

function s=idct2r(s,Ncuan)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 
0002 function s=idct2r(s,Ncuan)
0003 
0004    tam=size(s);
0005    tam=tam(1);
0006    pto=[tam tam]/2;
0007    lados=[tam tam];
0008    lcuan=tam/(2^Ncuan);
0009    posai=pto-round(lados/2);
0010    posbd=pto+round(lados/2);
0011    coorcuanai=floor([(posai(1)-1)/lcuan+1 (posai(2)-1)/lcuan+1]);
0012    coorcuanbd=floor([(posbd(1)-1)/lcuan+1 (posbd(2)-1)/lcuan+1]);
0013    if coorcuanai(1)<1
0014         coorcuanai(1)=1;
0015    end
0016    if coorcuanai(2)<1
0017         coorcuanai(2)=1;
0018    end
0019    if coorcuanbd(1)>(2^Ncuan)
0020         coorcuanbd(1)=2^Ncuan;
0021    end
0022    if coorcuanai(2)>(2^Ncuan)
0023         coorcuanbd(2)=2^Ncuan;
0024    end
0025 
0026    for ii=coorcuanai(1):coorcuanbd(1)
0027        for jj=coorcuanai(2):coorcuanbd(2)
0028            iii=(ii-1)*lcuan+ceil(lcuan/2);
0029            jjj=(jj-1)*lcuan+ceil(lcuan/2);
0030            cub=sacasub(s,[iii jjj],[lcuan lcuan],0);
0031            dctcub=idct2(cub);
0032            s=metesub(s,[iii jjj],dctcub);
0033        end
0034    end

Generated on Fri 07-Mar-2014 13:29:20 by m2html © 2005