chinu1310: Thank you for reply! I tested on that code before. Only enlarge is not enough for this question. I need more explanation theoretically.
Main Topics
Browse All TopicsHello everyone:
I have another question about FFT resize image.
I have an image and calculate its FFT, question is if I enlarge or reduce images size, how can I get its new FFT base on previous FFT? I do not want to re-calculate FFT again.
Matlab code would be good for testing! Thanks in advance!
Chao
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
An intensity in the frequency domain is basically a histogram bin.
Consider what it means to resize an image:
Doubling its size will effectively halve all frequencies.
Halving its size will effectively double all frequencies.
Also, the "histogram bins" must be rescaled according to the new total "energy" in the image (the next to last code line above).
Ugumba: if you double the size, i think what you double, for a same image, the sample frequency, so low frequencies are the same but higher frequencies are absent, because we cant reconstruct details that weren't present at original image.
For doubling from FFT, what i would do create a double size all Zeros FFT table and fill the low frequency coefficients by copying from the original FFT, and keep zero the high frequency coefficients.
For halving, just filter with a cut frequency of pi/2 the first half coefficients with a FIR filter to remove aliasing, then truncate the FFT to half the size (in the case of 2D FFT, a quarter the size).
Business Accounts
Answer for Membership
by: chinu1310Posted on 2007-06-29 at 15:08:25ID: 19393926
here is example code of how to enlarge an image using an FFT:
% Copyright: Joseph O'Ruanaidh 2003, All Rights Reserved
% Disclaimer: not to be used for air traffic control
function y=fftResize(x, l)
ff=fft2(x);
[m,n]=size(ff);
ml = floor((l-1)*m/2)*2
mm = m + 2*ml
nl = floor((l-1)*n/2)*2
nn = n + 2*nl
% what will soon be the new transform
qq = zeros(mm, nn);
% The following indices copy from the original FFT to the new FFT if mod(m, 2)==0
xr = [1:m/2 ml+m/2+1 2*ml+((m/2+2):m)]
else
xr = [1:((m+1)/2) 2*ml+(((m+3)/2):m)]
end
if mod(n, 2)==0
yr = [1:n/2 nl+n/2+1 2*nl+((n/2+2):n)]
else
yr = [1:((n+1)/2) 2*nl+(((n+3)/2):n)]
end
% Do the copying and rescale the indices
qq(xr, yr) = ff*(mm*nn)/(m*n);
% And don't forget the most important part
y=ifft2(qq);