Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

spatial frequency corresponding to the image plane

Hi everybody

I am doing image filtering in frequency domain, and I need to find the frequency of each image pixel . the only think I know about the image is size of image for example: (225, 225)

There is a function in python "np.fft.fftfreq" to calculate frequencies, but two question arises here:

  1. Using this function, I have to find the frequency in x and y direction , so two numbers, but i need one number for each pixel (I need a matrix the same size as image fill with frequencies correspond to the image pixels)?

  2. it starts with zero!!! but as I know after shifting fft, DC component is in the middle so why zero at the beginning?

if anybody knows another way to calculate the frequencies, more than welcome :)

spatial frequency corresponding to the image plane

Hi everybody

I am doing image filtering in frequency domain, and I need to find the frequency of each image pixel . the only think thing I know about the image is size of image for example: (225, 225)

There is a function in python "np.fft.fftfreq" to calculate frequencies, but two question arises here:

  1. Using this function, I have to find the frequency in x and y direction , so two numbers, but i need one number for each pixel (I need a matrix the same size as image fill with frequencies correspond to the image pixels)?

  2. it starts with zero!!! but as I know after shifting fft, DC component is in the middle so why zero at the beginning?

if anybody knows another way to calculate the frequencies, more than welcome :)