How to calculate spatial frequency of an image just in one direction?
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.