# Deconvolution in Python in 2D

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?

• 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. – Peter K. Sep 13 '15 at 14:51
• Votes or best answer validation are required – Laurent Duval Jul 28 at 11:58

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: