|

楼主 |
发表于 2024-3-19 21:01:39
|
显示全部楼层
I = imread('lena.jpg');
I = rgb2gray(I);subplot(2,3,1);imshow(I);title('original image');
F = fft2(I);subplot(2,3,2);imshow(log(1+abs(F)),[]);title('frequency image');
F_c = fftshift(F);
subplot(2,3,3);imshow(log(1+abs(F_c)),[]);title('centered frequency image');
F_c(255-30:255-20,254-30:254-20) = 1000000;
subplot(2,3,4);imshow(log(1+abs(F_c)),[]);title('centered frequency image');
F1 = ifftshift(F_c);
subplot(2,3,5);imshow(log(1+abs(F1)),[]);title('new frequency image');
I1 = uint8(ifft2(F1));
subplot(2,3,6);imshow(I1);title('new image');
|
|