Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
1  
You're assuming $k$ is Gaussian, which was not specified in the question. –  Rahul Mar 11 '11 at 5:21
    
Ok, my bad. I managed to read the question wrong. –  Fabian Mar 11 '11 at 6:40
    
I will fix this. –  Fabian Mar 11 '11 at 6:57
    
I understand neither the answer by @Fabian, nor the comment by @Rahul Narain :-) About the comment: There's no assumption here that $k$ is Gaussian; in fact it isn't, it has one Gaussian in the numerator and one in the denominator. And about the answer: It's interesting, but I also think it's wrong. How does normalization get into it? The original transform wasn't normalized, nor is it clear to me why it would make sense to normalize either of the transforms. I would have thought that both transforms should take the value $1$ at $k=0$ so as not to change the overall signal level. –  joriki Mar 11 '11 at 7:18
    
I agree that the answer depends on what conditions you impose on $k$ (if you impose no conditions then $1/\hat{g}$ is a solution but it cannot be even Fourier transformed ;-)). I imposed the condition that $k$ is normalized simply because typically these devices which convolute keep the energy constant (the $L^2$ norm) and not the overall signal. But maybe the OP can help? –  Fabian Mar 11 '11 at 8:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.