Referring to this topic, I am interested in a deconvolution using Python.

However, unlike the linked topic above, I want to deconvolve a 2D image. The scipy.signal.deconvolve function unfortunately does not support 2D deconvolution.

This amounts to solving the following equation for f, when h is observed, n is the added noise and g is the convolution kernel, and all are 2d arrays:

f * g + n = h

My first question is therefore: How can I perform a 2D deconvolution in Python?

The most obvious option would be, for a known function g, to transform to Fourier space and divide h by g. I have read however that this is merely good for illustration purposes and fairly inaccurate for science purposes.

So, what would be the cleanest, most accurate way of performing the deconvolution?

  • $\begingroup$ Welcome to DSP.SE! I'd suggest implementing the 2D FFT-based approach, so you can see the problems and have something to compare other approaches with. This page has a python package that may do something a little better. YMMV. I've not used that particular package before. $\endgroup$
    – Peter K.
    Sep 13, 2015 at 14:51

1 Answer 1


Erik Hom has developped the Adaptive Image Deconvolution Algorithm (AIDA) in Python. Looking at this code may help you a lot develop your own code.

High-quality deconvolution is still a quite open problem. Dividing $h$ by $g$ in the Fourier domain might cause noise explosion, if $g$ possesses a limited spectrum. The most accurate way depends:

From my recent experience in signal deconvolution, transforming the image with a sparsifying transform, and constraining sparsity in the process may help a lot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.