2D convolution for matrices of same size

849 Views Asked by At

I have an $N \times N$ image say $x$. Its Fourier transform is $X$, same size $N \times N$.

Now I have a mask $M$ applied to $X$. By "applied" I mean element wise multiplication.

According to convolution theorem, this is equivalent to convolving $m$ with $x$, where $m$ is the inverse Fourier transform of $M$ and $x$ is the inverse Fourier transform of $X$.

In this case, both $x$ and $m$ are of same size $N \times N$. So I am wondering in this case, how do we do convolution between $x$ and $m$ ? Thanks a lot.

1

There are 1 best solutions below

3
On BEST ANSWER

You need to apply 2D circular convolution, if your image is large enough and your filter is small enough (at least its energy is mostly localized) you may also survive with linear convolution (with some degradations along image borders).