The problem arises with cases the filter attenuates the energy practically into zero. Now, since in frequency this is basically an element wise multiplication, one would say the easy way to invert it is element wise division by the inverse filter. One could answer it using Linear Algebra.īut a more intuitive, in my opinion, approach would be thinking of it in the Frequency Domain.īasically the degradation operator attenuates energy of, generally, high frequency. The objective function as a function of the data is given by: It can be statistical models (Priors) or any knowledge.įor images, a good model is piece wise smooth or sparsity of the gradients.īut for the sake of the answer a simple parametric approach will be takes -Minimizing the Least Squares Error between the restored data in the model to the measurements.
There are many methods for Deconvolution (Namely the degradation operator is linear and Time / Space Invariant) out there.Īll of them try to deal with the fact the problem is Ill Poised in many cases.īetter methods are those which add some regularization to the model of the data to be restored. Legend('Blurred and noise added signal','Clean Signal','Filtered Signal') Hold on, plot(sig_filtered,'k-','LineWidth',2) Sig_filtered=conv(sig_noisy,h_inv,'same') ( sig_clean = sig_noisy * h^-1) h_inv=deconvwnr(sig_clean,sig_noisy,1) Then you can use it as a filter to filter the noisy signal. Legend('Blurred and noise added signal','Clean Signal','Deconvolved Signal')Īlternatively, if you don't know the h function, but know the input and output, this time why not deconvolve the input signal with the output which will give the h^-1 function. Hold on, plot(sig_deconvolved,'k-','LineWidth',2) Hold on, plot(sig_clean,'b-.','LineWidth',2) I am using Wiener deconvolution here sig_deconvolved=deconvwnr(sig_noisy,h,1) Then why not deconvolve the output signal with the h function and obtain the (almost) input signal. Legend('Blurred and noise added signal','Clean Signal') Hold on, plot(sig_clean,'b-.','LineWidth',3) Sig_noisy = awgn(sig_noisy,0,'measured') However, you can also use these functions for 1D signals. There are deconvolutionįunctions in MATLAB which are used for image processing applications. I will go to very beginning of the question. Our intuition is correct, sharpening cancels out blur. This kernel looks interesting! It is a sharpening operator. Therefore, in order to deconvolve, we can simply convolve the signal again with this approximation: We can see that most of the energy in each line is concentrated in 3-5 coefficients around the center. We can also see how the inverse matrix looks like: figure imagesc(inv(A)) That goes well with our intuition, mild averaging of original signal is much easier to reverse.
Now, let's try some milder averaging: b = After averaging, it is hard to get back the original signal. Now, let's try to see what happens with different kernels: b = function A = GetConvolutionMatrix(b,numA) If A has low condition, you can compute the inverse, and apply it on the result.įirst, I've made a function that computes the convolution matrix. You can estimate it by computing the condition number of the matrix. Even matrixes that are not singular, but close to being singular, can be problematic, as they will have large numeric error. These are the cases when you have singular A. Obviously, in some cases de-convolution is not possible. So the matrix is nxn: (Let it be called A): I am assuming for the sake of the answer that the filter is much smaller than the signal Your signal can be represented as a vector, and convolution is multiplication with an N-diagonal matrix (where N is the length of the filter).