How to get rid of deconvolution artifacts?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Deblurring in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!