# Mathematical relationship between highpass and lowpass filtering

Let $g, h_{HP}, h_{LP}: \mathbb{R} \rightarrow \mathbb{R}$ and $G, H_{HP}, H_{LP}$ denote their continuous Fourier transforms under the Fourier operator $\mathcal{F}$. Let $*$ denote the continuous convolution of two functions and $\cdot$ the pointwise multiplication.

Define the shorthand $1: \mathbb{R} \rightarrow \mathbb{R}, x \mapsto 1$ and let $H_{HP} = 1 - H_{LP}$ in the frequency domain, then I would like to show $$g * h_{HP} = g - (g * h_{LP}).$$

In words:

Filtering an image with a highpass is the same as subtracting the lowpass-filtered image, where the lowpass is the inverted highpass.

There is a proof (from some closed-source course notes) which goes as follows:

\begin{align*} & g * h_{HP}\\ & = \mathcal{F}^{-1}(G \cdot H_{HP})\\ & = \mathcal{F}^{-1}(G \cdot (1 - H_{LP}))\\ & = g * \mathcal{F}^{-1}(1 - H_{LP}) \quad \text{(The next step is unclear to me)}\\ & = g * (1 - h_{LP})\\ & = g - (g * h_{LP}) \end{align*}

In fact, $\mathcal{F}^{-1}(1 - H_{LP}) = 1 - h_{LP}$ is equivalent to $1 = \mathcal{F}(1)$ by applying $\mathcal{F}$ on both sides, which is a contradiction with the first identity mentioned below.

## Questions

• Is it true that the proof above lacks details?
• Is my proof below correct/more rigorous?

It is known that

I found another approach to possibly prove the proposition above:

First note: If $u, v: \mathbb{R} \rightarrow \mathbb{R}$ are continuous functions and $\int_a^b u(x) dx = \int_a^b v(x) dx$ for every $a, b \in \mathbb{R}$, then $u(x) = v(x)$ for every $x$, i.e. $u=v$.

\begin{align} &\int_{a}^{b} (g * h_{HP})(x) dx\\ & = \int_{a}^{b} (g * \mathcal{F}^{-1}(1 - H_{LP}))(x) dx \quad \text{(as stated above)}\\ &= \int_{a}^{b} (g * (\delta - h_{LP}))(x) dx \quad \text{(linearity + identity above)}\\ & = \int_{a}^{b} \int_{-\infty}^{\infty} g(\tau) ((\delta - h_{LP})(x - \tau)) d\tau dx\\ & = \int_{a}^{b} \int_{-\infty}^{\infty} g(\tau) (\delta(x - \tau) - h_{LP}(x - \tau)) d\tau dx\\ & = \int_{a}^{b} \int_{-\infty}^{\infty} g(\tau)\delta(x - \tau) - g(\tau)h_{LP}(x - \tau) d\tau dx\\ & = \int_{a}^{b} g(x) - \int_{-\infty}^{\infty} g(\tau)h_{LP}(x - \tau) d\tau dx\\ & = \int_{a}^{b} g(x) - (g * h_{LP})(x) dx\\ & = \int_{a}^{b} (g - (g * h_{LP}))(x) dx \end{align}

Especially, I am unsure whether the usage of the $\delta$ distribution is rigorous here.

• This forum here deals more with the practical aspects of DSP and your questions has to do more with math theory Nov 28, 2017 at 12:51
• @dsp_user Indeed, I was unsure whether I should post it to DSP or Math.SE. I judged by looking at the [math] and [proof] tags that it is at least not uncommon to post such things here as well. Nov 28, 2017 at 12:57
• I think the question is fine for this forum. In theory your approach is fine. In practical terms you may need to address a couple of things. 1 - How do you compensate for group delay associated with the LP filter. This will lead in adjustments to time domain delta function. 2 - Specification of the HP from the LP filter. If you want 40 dB attenuation for HP filter, this corresponds to xx dB ripple in the passband of the LP filter. Nov 28, 2017 at 13:07

Yes you are right. The following line (excerpted from your post) is wrong, below which I place the corrected version: \begin{align*} & g * h_{HP}\\ & = \mathcal{F}^{-1}(G \cdot H_{HP})\\ & = \mathcal{F}^{-1}(G \cdot (1 - H_{LP}))\\ & = g * \mathcal{F}^{-1}(1 - H_{LP}) &\quad \text{(The next step is unclear to me)}\\ & = g * (1 - h_{LP}) &\quad \text{(This line is wrong)}\\ & = g * (\delta(t) - h_{LP}) &\quad \text{(This is the corrected version)}\\ & = g - (g * h_{LP}) \end{align*}

I don't think so if you really need to go deeper than the above corrected proof to show that the inital claim was right. But it's up to you of course.

In a mundane way:

still - slow = fast

If you do care for defining functions on $\mathbb{R}\to\mathbb{R}$, then the proofs (and equalities) generally lack details on the existence of integrals of functions and their convolutions, on Fourier transforms and their inverses. With your notations, $g$ is more a 1D-signal, a continuous image would dwell in $\mathbb{R}^2$. A lot of operations, like splitting the integral of a difference into the difference of integral can loose validity in many ways. Adding the use of generalized functions (or distributions), the handling of operators and functions in such a symbolic way open the door to numerous traps. For instance, the existence of

$$\int (a(t) - b(t))dt$$

does not mean that

$$\int a(t)dt - \int b(t)dt$$

makes sense (at least, in mathematical analysis).

One of the cause is that you don't provide conditions on "being an image", "being low-pass", "being high-pass", all "DSP concepts". Your idea of using a bounded interval is a nice approach, yet it requires to go to the limit $a,b\to \infty$, which requires caution. For instance, you use a continuity prior, which is far from natural :

• the ideal low-pass filter is discontinuous in the frequency domain,
• the (inverse) Fourier can thus can continuity into discontinuity,
• using the Dirac $\delta$ among continuous functions is a wolf amidst sheeps.

Yet, the intuition is solid. If if you suppose that:

• $g$ (image or signal) has a bounded support, so zero outside some interval (true in applications), you'll save a great deal about limits
• if objects are piece-wise continuous, with a finite number of discontinuities (great for filters, ok for a useful class of images), you can almost avoid Diracs (not heavyside, but they can be managed)

most of your approach will work, and esp. it could be transferred to the discrete space domain. Don't forget that properties in continuous and discrete spaces behave differently: continuous $L_1$ and $L_2$ differ (most often $L_1 \cap L_2$ is used for standard Fourier contexts), yet for discrete sequences sets $\ell_1 \subset \ell_2$.