全文预览

基于matlab数字图像处理

上传者:hnxzy51 |  格式:doc  |  页数:16 |  大小:0KB

文档介绍
ise(I1,'salt&pepper');subplot(2,2,2);imshow(I2);title('噪声图像');f=double(I2);g=fft2(f);g=fftshift(g);....[N1,N2]=size(g);n=2;d0=50;n1=fix(N1/2);n2=fix(N2/2);fori=1:N1forj=2:N2d=sqrt((i-n1)^2+(j-n2)^2);h=1/(1+0.414*(d/d0)^(2*n));result1(i,j)=h*g(i,j);if(g(i,j)>50)result2(i,j)=0;elseresult2(i,j)=g(i,j);endendendresult1=ifftshift(result1);result2=ifftshift(result2);X2=ifft2(result1);X3=uint8(real(X2));subplot(2,2,3);imshow(X3);title('Btterworth滤波图像');X4=ifft2(result2);X5=uint8(real(X4));subplot(2,2,4);imshow(X5);title('理想低通滤波图像');其显示结果如图所示。....3.2.2高通滤波例题:对图像eight.tif实现Butterworth高通滤波。clearI1=imread('eight.tif');subplot(2,2,1);imshow(I1);title('原始图像');I2=imnoise(I1,'salt&pepper');subplot(2,2,2);imshow(I2);title('噪声图像');f=double(I2);g=fft2(f);g=fftshift(g);[N1,N2]=size(g);n=2;d0=50;n1=fix(N1/2);

收藏

分享

举报
下载此文档