Question

This is an extended question of this ques .Thanks to Kindall and Stephan Van der Wallt ,it turns out in order to solve the previous problem, I need to understand how to apply deconvolution process on an image using python with any related packages.
since I only know python , you may want to show me how to convert the MatLab code in this link MatLap code using python and I'm only interested in "Convolution theorem - practice part",that would be a great help.
I need also to understand what a convolve or deconvolve method does to the image.I googled trying to figure it out but there are a lot of equations that I couldn't fully understand.

Note:
(1) Any explanation on how deconvolve works ,it certainly will be appreciated.
Thanks

Was it helpful?

Solution

Formally, convolution is a mathematical operation on two functions.

In image processing, it can be seen as an operation which, for each pixel of the image, mixes it's value with the values of the neighbors. The neighbors values are weighted by the convoluton kernel. This mix causes a blur effect on images since all transitions in the image are smoothed.

A strong assumption of the convolution model is that the kernel is the same across all the image and does not change from one pixel to the other.

In optics term, the convolution kernel is called the point spread function (PSF).

Deconvolution is the inverse operation which aims to unmix the pixel values. You can sort deconvolution problems in 3 categories :

  • blind deconvolution, in which no information is known about the kernel
  • myopic deconvolution, in which one have a limited amount of knowledge about the convolution kernel
  • deconvolution in which the kernel is known in advance

Of course, the later case is much easier to solve. A simple solution to this later problem consists in applying another convolution to the image with an inverse kernel. This simple solution has the major drawback that it tends to raise the noise level of the image (since deconvolution is an ill-posed inverse problem).

As a response to this issue methods to regularize the inversion have been developped. But keep in mind that deconvolution is an active area of research and general-purpose, efficient blind deconvolution algorithms are yet to be found.

Note that deconvolution is to be distinguished from unsharp masking which also aims at sharpening the image but by increasing the high-frequencies of the image.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top