numpycomputer-visiondftphasemagnitude

How do you set the magnitude and the phase of the DFT of an image to a specific value?


I have the DFT of a picture and I need to set its magnitude and its phase to zero, separately.

Also if the magnitude of an image is 0 it will appear entirely as black, right?


Solution

  • You're mistakenly assuming that there is such a thing as the phase and the magnitude. Each spatial frequency has a phase and magnitude, that's why you get one complex number per frequency.

    And an image is black when all magnitudes are zero.