4
$\begingroup$

What is the 2D kernel, k, that when convoluted with a 2D signal, f, that is convoluted again with a gaussian 2D kernel, g, produces a result that is closest to the original signal, f'. Something like this, I think:

For

f' = f $\star$ k $\star$ g (where $\star$ denotes convolution)

Find k, such that |f - f'| is minimal.

1 Answers 1

2

For concreteness, let us define the Gaussian kernel $g$ as $g(x,y) = \frac{1}{2\pi \sigma_x \sigma_y} \exp\left[-\frac{x^2}{2 \sigma_x^2}- \frac{y^2}{2\sigma_y^2}\right].$ Its Fourier transform is again a Gaussian $\hat g(k_x,k_y) = \int\!dx\, dy\, e^{i kx x + i ky y}\, k(x,y)= \exp\left[-\frac{\sigma_x^2 k_x^2}{2}- \frac{\sigma_y^2 k_y^2}{2}\right]$ is again a Gaussian.

Under Fourier transform the convolution becomes a product, i.e., $\widehat{k\star g} = \hat{k} \times \hat{g}$. The difference is given by \begin{align}\int\!dx\,dy\,|f(x,y)-f'(x,y)|^2 &=\int\frac{dk_x}{2\pi}\frac{dk_y}{2\pi}\,|\hat{f}(k_x,k_y)-\hat{f'}(k_x,k_y)|^2\\ &=\int\frac{dk_x}{2\pi}\frac{dk_y}{2\pi}\,|\hat{f}|^2|1-\hat{k} \hat{g}|^2 \end{align}. In order to minimize the difference, $\hat{k} \hat{g}$ should be as close as possible to 1 (and of course $k$ still normalized).

Therefore, we have to minimize $\int\frac{dk_x}{2\pi}\frac{dk_y}{2\pi}\,[|1-\hat{k} \hat{g}|^2+\lambda|\hat{k}|^2],$ where $\lambda$ is a Lagrange multiplier to keep the norm of $\hat k$ at 1. We can variate this equation, and obtain $\int\frac{dk_x}{2\pi}\frac{dk_y}{2\pi}\,[2 \hat{g}(1- \hat{k} \hat{g})+2 \lambda\hat{k}] \delta \hat k,$ with the solution $\hat{k} = \frac{\hat{g}}{\hat{g}^2+\lambda}= \frac{\exp\left[-\frac{\sigma_x^2 k_x^2}{2}- \frac{\sigma_y^2 k_y^2}{2}\right]}{\exp\left[-\sigma_x^2 k_x^2- \sigma_y^2 k_y^2\right]+\lambda}.$ $\lambda$ is determined from the normalization condition.

  • 0
    Woosh! I am way out of my league here. With my mostly forgotten math education I think I followed the neat derivation till before $\int\frac{dk_x}{2\pi}\frac{dk_y}{2\pi}\,[|1-\hat{k} \hat{g}|^2+\lambda|\hat{k}|^2]$ Then I got lost. The basic thought I originally had was if I can pre-process an image I know is going to be blurred and help the end result be a little bit closer to the original. I think my question reflects that idea correctly but I could be wrong. In any case, wow and thank you! I don't think I can provide much more meaningful insight...2011-03-11