Perform convolution between two functions

24 Views Asked by At

I'm trying to solve:

Find the fourier transform of performing mask $h(x,y)=\text{sinc}(x)\cdot\text{sinc}(y)$ on the image: $$ f(x,y)=\begin{cases} 1 & 0\leq|x|,|y|<0.5\\ 0 & \text{otherwise} \end{cases} $$

What I did - We need to calculate $g(x,y)=f(x,y)\star h(x,y)$ and then find the fourier transform of $G(x,y)$. We will find the fourier transform of $f(x,y)$: $$ \begin{align*} F(u,v)&=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y)e^{i2\pi(ux+vy)}dxdy\\&=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\mathbb{I}_{\left\{ 0\leq|x|,|y|<0.5\right\} }e^{i2\pi(ux+vy)}dxdy\\&=\int_{-0.5}^{0.5}\int_{-0.5}^{0.5}e^{i2\pi(ux+vy)}dxdy\\&=\int_{-0.5}^{0.5}e^{i2\pi ux}dx\int_{-0.5}^{0.5}e^{i2\pi vy}dy \end{align*} $$ We know that $\int_{a}^{b}e^{i2\pi ux}dx=\frac{i\left(e^{i2\pi au}-e^{i2\pi bu}\right)}{2\pi u}$ so we get: $$ \int_{-0.5}^{0.5}e^{i2\pi ux}dx=\frac{i\left(e^{i2\pi0.5u}-e^{i2\pi(-0.5)u}\right)}{2\pi u}=\frac{i\left(e^{i\pi u}-e^{-i\pi u}\right)}{2\pi u} $$ We will use that $\sin\theta=\frac{1}{2i}\left(e^{i\theta}-e^{-i\theta}\right)$ so we get: $$ e^{i\pi u}-e^{-i\pi u}=2i\left(\sin\left(\pi u\right)\right) $$ In total, we get: $$ \int_{-0.5}^{0.5}e^{i2\pi ux}dx=\frac{i\left(e^{i\pi u}-e^{-i\pi u}\right)}{2\pi u}=\frac{i2i\left(\sin\left(\pi u\right)\right)}{2\pi u}=-\frac{\sin\left(\pi u\right)}{\pi u}=-\text{sinc}(u) $$ So: $$ F(u,v)=\int_{-0.5}^{0.5}e^{i2\pi ux}dx\int_{-0.5}^{0.5}e^{i2\pi vy}dy=\left(-\text{sinc}(u)\right)\left(-\text{sinc}(v)\right)=\text{sinc}(u)\text{sinc}(v) $$ This means that the fourier transform of $f(x,y)$ is $\text{sinc}(u)\text{sinc}(v)$: $$ h(u,v)=\text{sinc}(u)\text{sinc}(v)=\Im\left\{ f(x,y)\right\} $$ From the Duality theorm we know that if the fourier transform of $f(x,y)$ is $F(u,v)$ then the fourier transform of $F(-u,-v)$ is $f(x,y)$. So we get: $$ \begin{align*} f(x,y)&=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}F(-u,-v)e^{i2\pi\left((-u)x+(-v)y\right)}dudv\\&=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\text{sinc}(-u)\text{sinc}(-v)e^{i2\pi\left((-u)x+(-v)y\right)}dudv\\&=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\text{sinc}(u)\text{sinc}(v)e^{-i2\pi\left(ux+vy\right)}dudv \end{align*} $$ This means that we get: $$ f(x,y)=\Im\left\{ \text{sinc}(u)\text{sinc}(v)\right\} =\Im\left\{ h(u,v)\right\} $$ Now I'm trying to use the convolution theorem. For 1 diminution:

if $y(t)=f(t)\star h(t)$ then $\hat{y}(f)=\hat{x}(f)\hat{g}(f)$ and if $h(t)=g(t)\cdot k(t)$ then $\hat{h}(f)=\hat{g}(f)\star\hat{k}(f)$.

Now we have $g(x,y)=f(x,y)\star h(x,y)$ so we get: $$ g(x,y)=f(x,y)\star h(x,y)=\Im\left\{ h(u,v)\right\} \star\Im\left\{ f(u,v)\right\} $$ From the convolution theorem we get: $$ G(u,v)=h(u,v)\cdot f(u,v)=\text{sinc}(u)\text{sinc}(v)\cdot f(u,v) $$ Is it possible to check my solution?