该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
clear
close all
L1=Round(8);
L2=Round(10);
L3=Round(20);
H=ones(256);
H1=H-Round(16);
figure,imshow(H1);
V=imread('D:\JPJ\V.jpg'); %读入图像
V=im2double(V);
figure,imshow(V)
V1=fftshift(fft2(V)); % fftshift 将字母V的频谱低频部分移到中央,高频部分移到四周
figure,imshow(abs(V1)*16/max(max(abs(V1))))
B1=V1.*L1; %滤波
figure,imshow(abs(B1)*16/max(max(abs(B1))))
C1=ifft2(B1);
figure,imshow(abs(C1)/max(max(abs(C1))))
B2=V1.*L2; %滤波
figure,imshow(abs(B2)*16/max(max(abs(B2))))
C2=ifft2(B2);
figure,imshow(abs(C2)/max(max(abs(C2))))
B3=V1.*L3; %滤波
figure,imshow(abs(B3)*16/max(max(abs(B3))))
C3=ifft2(B3);
figure,imshow(abs(C3)/max(max(abs(C3))))
B4=V1.*H1; %滤波
figure,imshow(abs(B4)*16/max(max(abs(B4))))
C4=ifft2(B4);
figure,imshow(abs(C4)/max(max(abs(C4))))
figure
subplot(2,4,1);imshow(L1);title('Lowpass1');
subplot(2,4,5);imshow(abs(C1)/max(max(abs(C1))));
subplot(2,4,2);imshow(L2);title('Lowpass2');
subplot(2,4,6);imshow(abs(C2)/max(max(abs(C2))));
subplot(2,4,3);imshow(L3);title('Lowpass3');
subplot(2,4,7);imshow(abs(C3)/max(max(abs(C3))));
subplot(2,4,4);imshow(H1);title('Highpass1');
subplot(2,4,8);imshow(abs(C4)/max(max(abs(C4))));