Convolve2d just by using Numpy
I am studying image-processing using Numpy and facing a problem with filtering with convolution.
I am studying image-processing using Numpy and facing a problem with filtering with convolution.
I’m using zero padding around my image and convolution kernel, converting them to the Fourier domain, and inverting them back to get the convolved image, see code below. The result, however, is wrong. I was expecting a blurred image, but the output is four shifted quarters. Why is the output wrong, and how can I fix the code?