This filter allows only high frequencies from the frequency domain representation of the image (obtained with DFT) and blocks all low frequencies beyond a cut-off value. The image is reconstructed with inverse DFT, and since the high-frequency components correspond to edges, details, noise, and so on, HPFs tend to extract or enhance them. The next few sections demonstrate how to use different functions from the numpy, scipy, and scikit-image libraries to implement an HPF and the impact of an HPF on an image.
We can implement a HPF on an image with the following steps:
- Perform a 2D FFT with scipy.fftpack fft2 and obtain the frequency domain representation of the image
- Keep only the high frequency components (get rid ...