Chapter 8: Band-Pass

This demo shows the row-wise filtering of an input image \(x[m,n]\) with a one-dimensional discrete band-pass filter of the form: $$h_\mathrm{BP}[k] = \begin{cases} \frac{2\Omega_\mathrm g}{\pi}\cdot\mathrm{si}[(k-k_0)\Omega_\mathrm g]\cdot \cos[\Omega_0 k] & 0\leq k\leq L-1\\ 0 & \mathrm{otherwise} \end{cases},$$ with the center frequency \(\Omega_0\in[0,\pi]\), cut-off frequency \(\Omega_\mathrm g\in[0,\frac \pi 2]\), filter length \(L\), and shift \(k_0=\left\lfloor\frac{L}{2}\right\rfloor\).

For smoothing the overshoot, a Hann-window (raised cosine) of length \(L\) can be used, which is defined as: $$\begin{align} w_\mathrm{Hann}[k] &= \frac{1}{2}\left[1-\cos\left(\frac{2\pi}{L-1}k\right)\right] \\ &= \sin^2\left(\frac{\pi}{L-1}k\right), \end{align}$$ for \(k=\{0,\dots,L-1\}\). The resulting band-pass filtered image is denoted as \(x_\mathrm{BP}[m,n]=x[m,n]\ast (h_\mathrm{BP}[n]\cdot w[n])\) for each image row \(m\in\{0,\dots,M-1\}\).

plot