()uFvu,00,vu()()()NvyuxjevuFyyxxf/20000,,-+-⇔-π4.334.334.33()yxf,amplitudeI=imread('1.bmp');figure(1)imshow(real(I));I=I(:,:,3);fftI=fft2(I);sfftI=fftshift(fftI);RRfdp1=real(sfftI);IIfdp1=imag(sfftI);a=sqrt(RRfdp1.^2+IIfdp1.^2);a=(a-min(min(a)))/(max(max(a))-min(min(a)))*225;figure(2)imshow(real(a));()yxf,XY2ϕϕθθsin,cos,sin,coswvwuryrx====()yxf,()vuF,()θrf,()φwF,()vuFyxf,),(⇔()φwφwFθrθrfsin,cos)sin,cos(⇔()()00,,θφwFθθrf+⇔+4.34),(yxf0θ()vuF,0θ()vuF,),(yxfI=zeros(256,256);I(88:168,124:132)=1;imshow(I)J=fft2(I);F=abs(J);J1=fftshift(F);figureimshow(J1,[550])J=imrotate(I,90,'bilinear','crop');figureimshow(J)J1=fft2(J);F=abs(J1);J2=fftshift(F);figureimshow(J2,[550])o90o45o90o90o903()()∑∑-=-==1010,10,0NxNyyxfNF()()()∑∑-=-=+⋅=1010212cos,2,0NxNyNπvyyxfNvF()()()∑∑-=-=+⋅=1010212cos,20,NxNyNπuxyxfNuF()()()()NπvyNπuxyxfNvuFNxNy212cos212cos,2,1010+⋅+⋅=∑∑-=-=4.354.36()yxf,1,...,2,1,0,-=Nyx()vuF,NN×()()()()()()()()()NvyNuxvuFNNuxuFNNvyvFNFNyxfNuNvNuNv212cos212cos,2212cos0,2212cos,020,01,11111111ππππ+⋅++++++=∑∑∑∑-=-=-=-=4.36%cameraman.tifDCTRGB=imread('cameraman.tif');figure(1)imshow(RGB)I=rgb2gray(RGB);%J=dct2(I);%DCTfigure(2)imshow(log(abs(J)),[])%figure(3);J(abs(J)10)=0;%100idct2K=idct2(J)/255;imshow(K)maskmask44.5.3()[][]()[][]′=AyxfAvuF,,()[][]()[][]AvuFAyxf,,′=(4.37)()[]yxf,()[]vuF,[]A[]′A[]ANN*NN*RGB=imread('camera.tif');I=rgb2gray(RGB);I=im2double(I);%T=dctmtx(8);%DCT%TTDCTP1*X*P2B=blkproc(I,[88],'P1*x*P2',T,T');mask1=[1111000011100000110000001000000000000000000000000000000000000000];%DCTB2=blkproc(B,[88],'P1.*x',mask1);%DCT10I2=blkproc(B2,[88],'P1*x*P2',T',T);%figure,imshow(I);figure,imshow(B2);figure,imshow(I2);RGB=imread('camera.tif');I=rgb2gray(RGB);I=im2double(I);%T=dctmtx(8);%DCT%TTDCTP1*X*P2B=blkproc(I,[88],'P1*x*P2',T,T');mask2=[1111000011100000100000000000000000000000000000000000000000000000];%DCTB2=blkproc(B,[88],'P1.*x',mask2);%DCT10I2=blkproc(B2,[88],'P1*x*P2',T',T);%figure,imshow(I);figure,imshow(B2);figure,imshow(I2);(a)(b)DCTmask1(c)DCTmask24.788*mask1mask2--DCTcblkprocDCT