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?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.Sign up to join this community
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; I = im2double(imread('Cameraman.tif'); S = size(I); F = fft2(I); F2 = repmat( K*K*F , K , K); Mask = zeros(K*S); Mask(1:S(1)/2+1 , 1:S(2)/2+1) = 1; 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; F2 = Mask.*F2; I2 = real( ifft2( F2 )); figure,imshow(I);title('Original'); figure,ishow(I2);title('2x Zoomed');
You should adjust the mask carefully for even and odd length dimensions...