FFT spectra is not what is needed; what I need is a histogram showing which frequencies are there in image in horizontal direction, and which one is dominant
Such spatial frequency is usually known for a sinusoidal grating; I need the same property for grayscale raster image (in cycles per pixel)


1 Answer 1


You can take a 1D Fourier transform of a row of pixels from the image; it will give you the horizontal frequencies present in that row.

You could sample one row out of the image, or else average all the rows together to get an overall picture of the horizontal frequencies.

  • $\begingroup$ how about vertical Gabor filters? do they yield same result? $\endgroup$
    – ivan866
    Commented Sep 28, 2020 at 20:28
  • 1
    $\begingroup$ @ivan866 Gabor filters make sense when you want spatial locality, like you want to examine the frequency content in the neighborhood of some particular point in the image. That doesn't sound like what you're doing? Moreover you said you wanted a histogram, so you would need a separate Gabor filter for each frequency bin in the histogram. It could get slow. FFT is much more efficient. $\endgroup$ Commented Sep 28, 2020 at 21:33
  • $\begingroup$ @ivan866 could you give an insight into Wavelets? And how they relate to FTs and Gabor filters? $\endgroup$ Commented Oct 28, 2020 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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