<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2020-09-28T20:28:19.070Z
how about vertical Gabor filters? do they yield same result?
ivan866
CC BY-SA 4.0
2020-09-28T21:33:04.630Z
@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.
Nathan Reed
CC BY-SA 4.0
2020-10-28T23:01:18.693Z
@ivan866 could you give an insight into Wavelets? And how they relate to FTs and Gabor filters?
Felipe Gutierrez
CC BY-SA 4.0
2020-09-28T17:28:59.443Z
2020-09-28T17:28:59.443Z
Nathan Reed
<p>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<br />
Such spatial frequency is usually known for a <strong>sinusoidal grating</strong>; I need the same property for grayscale raster image (in cycles per pixel)</p>

<image-processing><raster-image><spectral><fourier-transform>
How to calculate spatial frequency of an image just in one direction?
ivan866
# How to calculate spatial frequency of an image just in one direction?

(Asked by: username_0 on 2020-09-28)

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)

**Tags:** image-processing, raster-image, spectral, fourier-transform


---

## 1 answers

### Answer by username_1 on 2020-09-28. Score: 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.

> **Comments:**
> **username_0**: how about vertical Gabor filters? do they yield same result?  
> **username_1**: @username_0 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.  
> **username_2**: @username_0 could you give an insight into Wavelets? And how they relate to FTs and Gabor filters?  

---

