# How to get rid of deconvolution artifacts?

16 views (last 30 days)
When I convolve the pattern in Fig1A with a function PSD, I obtain the pattern in Fig1B. However, when I deconvolve the pattern in B with the same function PSD I obtain the pattern in Fig1C. The pattern in Fig1C contains the initial pattern + some high frequency artifact (see red arrows). I would be very grateful if you could help me to find a good method to get rid of these artifacts.
I am not an experted in Fourier analysis but I think these may be border effects. I used the function padarray.m to add different types of padding to the pattern in B but this is only moving the high frequency noise around. Also, my goal is to deconvolve complex 2D matrices for which it is not easy to find good paddings.
Functions like deconvblind.m or deconvlucy.m actually get rid of the artifacts but they produce bad estimations of the initial pattern (a very low pass version).
here is how I do the convolution and deconvolution (only one line is different )
function C = F(A,B)
%% Check inputs and/or outputs
[nYA,nXA] = size(A);
[nYB,nXB] = size(B);
%% Convolution
tFFTA = zeros(nYA+nYB-1,nXA+nXB-1);
tFFTB = zeros(nYA+nYB-1,nXA+nXB-1);
tFFTA(1:nYA,1:nXA) = A;
tFFTB(1:nYB,1:nXB) = B;
% shift center to pixel (1,1) to avoid any shifting in image from multiple
% FFT multiplications
tFFTA = circshift(tFFTA, -floor([nYA,nXA]/2));
tFFTB = circshift(tFFTB, -floor([nYB,nXB]/2));
FFTC = fft2(tFFTA,nYA+nYB-1,nXA+nXB-1);
FFTB = fft2(tFFTB,nYA+nYB-1,nXA+nXB-1);
% CONVOLUTION -----
FFTC = FFTC .* FFTB;
%--------------------
% DECONVOLUTION ---
FFTC = FFTC ./ FFTB;
%------------------
tConv = ifft2(FFTC);
% reverse shifting from earlier
tConv = circshift(tConv, floor([nYA,nXA]/2));
C = tConv(1:nYA,1:nXA);
end
Thanks

Steve Eddins on 6 Nov 2020
I think this is because you are performing inverse filtering in the frequency domain, and the blurring function has zeros (or almost-zeros) in the frequency domain. This is typical and is why deconvolution / deblurring is such a challenging problem. If the blurring function has zeros in the frequency domain, then there are an infinite number of solutions to the deconvolution / deblurring problem, which makes it ill-posed.
The inverse Fourier filtering approach might look better (except where it doesn't) in the simulation method you've used, but if you add in even the tiniest bit of noise (such as quantization noise) to the simulation, the output of the inverse Fourier filter is likely to be completely unrecognizable.
Deblurring techniques such as deconvlucy are intended to do a reasonable job in real situations when the blurring filters have zeros in the frequency domain and when there is noise in the system.
Giacomo Benvenuti on 6 Nov 2020
Thank you, this is very helpful!