1

我在这样的图像上应用了傅里叶变换:

I = imread('img.jpg');
img = fftshift(I);
F = fft2(img);
magnitude = mat2gray(100*log(1+abs(fftshift(F))));    % Magnitude spectrum
phase = mat2gray( (angle(F)) );                       % Phase spectrum

使用离散傅里叶变换的能量压缩属性如何提取傅里叶变换低频值系数的 21x21 矩阵?

提前致谢!

4

1 回答 1

3

You might try something like this:

I = imread('peppers.jpg');
img = fftshift(I);
F = fftshift(fft2(img));

% magnitude = mat2gray(100*log(1+abs(F)));    % Magnitude spectrum
% phase = mat2gray( (angle(F)) );             % Phase spectrum

[M N K] = size(F);

L = 10;

fsub(M,N,K)=0;
fsub(M/2-L:M/2+L,N/2-L:N/2+L,1:K) = F(M/2-L:M/2+L,N/2-L:N/2+L,1:K);


I2 = uint8(real(ifftshift(ifft2(ifftshift(fsub))));

figure
subplot(121)
imshow(I)

subplot(122)
imshow(I2)

The panel on the left is the original, the one on the right after selecting only the core frequency components.

enter image description here

于 2013-10-10T19:46:22.590 回答