www.gusucode.com > GUI界面设计的学习材料源码程序 > code/matlab代码/yanshi/sufahexin_4.m
figure(... 'menu','none',... 'color',[0.4,0.8,0.95],... 'position',[103.8 50.923 800.2 700.538],... 'Name',' 广西工学院信息与计算科学系', ... 'NumberTitle','off', 'HandleVisibility', 'on', ... 'Visible','on', 'Resize', 'off',... 'IntegerHandle', 'off', ... 'Doublebuffer', 'on', ... 'Colormap', gray(256));%设置名字是否需要符号 ImagenUmbral =imread('cameraman.tif'); I2=double(ImagenUmbral)/256; subplot(222) imshow(I2) title('原图像') I3=double(ImagenUmbral)/0.2; J=dct2(I3); subplot(221) imshow(log(abs(J)),[]);,colormap(jet(64)),colorbar; title('fft') ImagenUmbral =im2double(ImagenUmbral ); T=dctmtx(8); B=blkproc(ImagenUmbral ,[8 8], 'P1*x*P2',T,T'); Mask=[1 1 1 1 0 0 0 0 %量化系数表 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; B2=blkproc(B,[8 8],'P1.*x',Mask); I2=blkproc(B2,[8 8], 'P1*x*P2',T',T); subplot(223) imshow(I2); title('变换后图像')