Lowpass, Highpass, Bandreject and Bandpass filters in image processing

Minhaz
Computational Photography
4 min readSep 12, 2021

--

Spatial domain and frequency domain filters are commonly classified into four types of filters — low-pass, high-pass, band-reject and band-pass filters. In this article I have notes, code examples and image output for each one of them.

Types of filters

  • Lowpass filters: Allow passing only low frequency details, attenuates the high frequency details. Example: Smoothening filters.
  • Highpass filters: Allows passing only high frequency details, attenuates the low frequency details. Example: Sharpening mask filters.
  • Bandreject filters: Attenuate signal in range of a certain frequency. Allows frequency below a certain threshold and above another threshold to pass.
  • Bandpass filters: Only allows signals within a certain band to pass, attenuates the frequencies below a threshold and above another threshold to pass.

Spatial kernels in terms of low-pass kernel — lp(x, y)

Different types of spatial kernels

δ(x, y) is a unit impulse kernel

Processing images with these…

--

--

Minhaz
Computational Photography

Staff Software Engineer @Google. Leading teams democratising On device AI for for masses. Writes about programming generics & specifics.