title: Histogram of Image in Frequency Domain
body: <p>I have been trying to analyze the presence of low and high-frequency waves in images. My objective is to visually be able to discern if an image is composed majorly by low frequencies of high frequencies.</p>
  
  <p>My first instinct is to generate a histogram of the Fourier Transform or Wavelet Transform of a color image. I'm, however, not sure how to proceed with that.</p>
  
  <p>Given that the intensity of the Fourier transform gives no representation of the frequency, I thought I could generate a "histogram" using the coordinates as my 'bins' and the intensity as my frequency. But I'm not sure if this is mathematically sound.</p>
  
  <p>Has any default way of creating a frequency-domain histogram been set? For this purpose, would wavelets or Fourier transform work best?</p>
  
  <p>Thank you all for your help.</p>
  
  <h2>Edit 1</h2>
  
  <p>So I've been trying to visualize individual frequencies that make up the fourier transform of an Image. But to no success.</p>
  
  <p>I have tried to, for each point of the transformed image, reverse the transform with the remaining of the matrix set to zeroes, but I do not think the result is what I was expecting. Here are some examples:</p>
  
  <p><a href="https://i.stack.imgur.com/3dIY2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3dIY2.png" alt="Input Image and Fourier Transforms for each channel."></a></p>
  
  <p>That's my initial image and it's channels fourier transform, ignore the red sky. Below are the Inverse Transform of some of the points, I use the following method to extract the frequencies. <em><code>r_fft</code></em> is not shifted.</p>
  
  <pre><code>wave_fft_r = np.zeros(r_fft.shape, dtype=r_fft.dtype)
  wave_fft_r[i,j] = r_fft[i,j]
  wave_img = np.fft.ifft2(wave_fft_r)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/v30qF.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v30qF.jpg" alt="Inverse Transform of single points."></a></p>
  
  <p>I do not think that helps analysing if a image is composed more of high-frequencies or low-frequencies. @CrisLuengo mentioned 1D representation of the frequencies, but I'm not sure how to go about that.</p>
  
  <p>Given the image below, for example, it seems like it has more high-frequencies than the first one, but I'm looking for a way to show that numerically. And only by looking at the magnitude spectrum it's not easy to differentiate that.
  <a href="https://i.stack.imgur.com/rxWfb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rxWfb.jpg" alt="Input Image 2"></a></p>