1
$\begingroup$

I want to go from this image

enter image description here

into this one:

enter image description here

So basically I need to scale the white square. The authors of the paper claim that this can be done in four steps:

  1. zero-padding in real space (image is treated as 1D vector).
  2. discrete Fourier transform.
  3. cropping the central part of the spectrum in frequency domain.
  4. inverse Fourier transform.

I don't see how it is being done in practice and if this works. Can you help out?

$\endgroup$
  • $\begingroup$ Hey, welcome! So, what's your precise question! What do you find questionable or unclear about the method? $\endgroup$ – Marcus Müller Aug 30 '18 at 12:05
  • $\begingroup$ I do not know why this thing works. How many zeros should I add in the real space? How many frequencies should I crop? If I delete part of the spectrum and perform inverse Fourier I will end up with complex numbers. Should I take real part of it or maybe modulus? $\endgroup$ – WoofDoggy Sep 1 '18 at 11:49
0
$\begingroup$

What I believe is being done is interpolation in the frequency domain to increase the number of pixels while smoothing the transition from black to white.

Consider a single row for example, which is a rectangular function in time. The Fourier Transform would be a Sinc function, which would dominate the outer part of the spectrum in the frequency domain (go toward zero in the middle, which represents $F_s/2$ where $F_s$ is the sampling rate, and then rise back as a mirror of the first half up to $F_s$. Adding zeros in time simply interpolates more samples of this same function in frequency. Then truncating the center of the spectrum reduces the higher frequency range of the Fourier Transform, which effectively makes the pulse wider (lower frequency).

I discuss zero padding for FFT's in more detail here: What happens when N increases in N-point DFT

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.