# How to recover image from IFFT after removing high frequency descriptors?

11 views (last 30 days)
Lim Kai Wei on 1 Nov 2019
I am trying to perform FFT on the boundary coordinates of a binary image, trimming off x% of the fourier descriptors and then performing IFFT to recover the image. However my image is very much distorted and does not resemble the original image at all (I was told that it is possible to recreate the image quite accurately even after trimming). I have included my code below, much help would be appreciated.
boundary_complex = boundary(:,1) + i*boundary(:,2);
boundary_freq = fft(boundary_complex);
usedPercent=0.9;
n = round(usedPercent*length(boundary_freq));
trim_boundary_freq = boundary_freq(1:n);
IFF = ifft(trim_boundary_freq);
figure,plot(real(IFF),imag(IFF));

Subhadeep Koley on 4 Nov 2019
Hi, it is difficult to provide an exact solution without your image but below is an example of removing high frequency descriptors from a binary image.
% Binarization
I = imbinarize(I,0.5);
% Fourier transfrom
f = fftshift(fft2(I));
% Absolute values of the fourier magnitude
fabs=abs(f);
% Log transfrom for display
fLog = log(1 + abs(f));
% Trimming off some fourier descriptors
filter = (fLog > .5*max(fLog(:)) );
% Applying filter
B = abs(ifft2(f.*filter));
% Plotting
figure;
subplot(2,2,1),imshow(I,[]); title('Original Image');
subplot(2,2,2),imshow(fLog,[]); title('Fourier Magnitude Plot'); 