2D Deconvolution using FFT in Matlab Problems
I have convoluted an image I created in matlab with a 2D Gaussian function which I have also defined in matlab and now I am trying to deconvolve the resultant matrix to see if I get the 2D Gaussian function back using the fft2 and ifft2 commands. However the matrix I get as a result is incorrect (to my knowledge). Here is the code for what I have done thus far: % Code for input image (img) [300x300 array] N = 100; t = linspace(0,2*pi,50); r = (N-10)/2; circle = poly2mask(r*cos(t)+N/2+0.5, r*sin(t)+N/2+0.5,N,N); img = repmat(circle,3,3); % Code for 2D Gaussian Function with c = 0 sig = 1/64 (Z)