0
$\begingroup$

Studying for my finals in Image Processing course. Trying to solve the following question:

Let $h$ be a filter that replaces each pixel value with the average of it's 8 neighbors. Let $f$ be a function of the image $8\times 8$ and let $F(u,v)$ be it's DFT. Let $G(u,v)$ be the DFT of the image, after performing the filer on it. Calculate $G(5,5)$ if we know that $F(5,5)=1$.

The solution:

The filter looks like: $$ \frac{1}{8}\begin{bmatrix}1 & 1 & 1\\ 1 & 0 & 1\\ 1 & 1 & 1 \end{bmatrix} $$ The DFT of the filter is: $$ H(u,v)=\frac{1}{10\cdot 10}\sum_{x=-1}^{1}H(x,v)\exp(-i2\pi u x /10) $$ when $$ H(x,v)=\sum_{y=-1}^{1}h(x,y)\exp(-i2\pi v y /10) $$ so we get $H(-1,v)=H(1,v)=\frac{1}{4}\cos(\pi v/5)+\frac{1}{8}$ and $H(0,v)=\frac{1}{4}\cos(\pi v/5)$ and for all $x\not\in\{-1,0,1\}$ we get $H(x,v)=0$. So we get: $$ H(u,v)=\frac{1}{100}\left[\left(\frac{1}{4}\cos(\pi v/5)+\frac{1}{8}\right)\cos(\pi u/5)+\frac{1}{4}\cos(\pi v/5)\right] $$ Then we get $G(5,5)=H(5,5)\cdot F(5,5)=\frac{1}{800}$.

I don't quite understand the solution. I understand why the filter looks like it's mentioned. But I don't understand the DFT part. How do I turn the filter into a DFT function? Also, why they divided by $10$? What is $H(u,v)$ and what is $H(x,v)$? I just need some technical explanation regarding the solution.

$\endgroup$
1
  • $\begingroup$ The notation is awkward. They do a 2-D FFT by first doing an FFTs of the columns ($H(x,v)$) and then FFTs of the rows of the result ($H(u,v)$). These should NOT be both called $H()$ since they are different things. $\endgroup$
    – Hilmar
    Feb 2 at 15:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy