title: How to apply a LPF and HPF to a FFT (Fourier transform)
body: <p>I need to apply HPF and LPF to the Fourier Image and perform the inverse transformation, and compare them. I do the following algorithm, but nothing comes out:</p>
  <pre><code>img = cv2.imread('pic.png')
  
  f = np.fft.fft2(img)
  fshift = np.fft.fftshift(f)
  magnitude_spectrum = 20 * np.log(np.abs(fshift))
  
  # need to add HPF and LPF 
  hpf = ...
  lpf = ... # maybe 1 - hpf ?
  
  # inverse 
  result = (lpf + (1 + alpha) * hpf)
  </code></pre>
  <p>Can you tell me how to do this?</p>