# Scale Image by using FFT

Can we change the scale of image by using FFT? I mean, how should i do process on frequency domain of image to upscale or downscale the orginal image?

The other question of mine is that how can changing scale of image affect on fft of this image?

• What do you mean by 'scale'? Resolution?
– lxop
Dec 13 '18 at 12:58
• @Ixop yes, I mean upscaling or downscaling the resolution of image. Dec 13 '18 at 13:01

Yes image scaling can also be performed in frequency domain using DFT/FFT.

For example, given an $$N \times M$$ image, you can implement the interpolation by integer $$K$$ in the frequency domain by enlarging the $$N \times M$$ point DFT/FFT of the original image into $$K \cdot N \times K \cdot M$$ size where new DFT/FFT samples are all zero; except at the four corners; effectiveley you are zero padding the original DFT/FFT in frequency domain. The effect in time domain wil be interpolation.

The following is an example of 2x image zooming using FFT.

K = 2;
S = size(I);

F = fft2(I);
F2 = repmat( K*K*F , K , K);

Mask(end-S(1)/2 : end , 1:S(2)/2+1) = 1;
Mask(1:S(1)/2+1 , end-S(2)/2 :end ) = 1;
Mask(end-S(1)/2 : end , end-S(2)/2 :end ) = 1;