Question Background

It was marked as duplicate.

I don't very agree the current answer of @2012rcampion:

In summary, deconvolution can recover information in certain cases, but cannot improve image quality.

There are many example in documentation of ImageDeconvolve,such as following screenshot: http://o8aucf9ny.bkt.clouddn.com/2016-07-13-11-36-21.png

Or this:


Its not only recover information in certain cases, but also improve image quality.So I think the keypoint is get the appropriate model of the blur image.As the problem is very important and it seem there are no solution for it still,I post it here again for a professional answer.


How to get the $ker$ used in function ImageDeconvolve,which can be a image or a matrix?

I provide a beauty for test here,which maybe make your mouth water but don't forget our purpose please.

Original image:

Blure image

Actually I use Gaussian Blur with 6-pixels to get it in Photoshop.But I cannot restore it by

ImageDeconvolve[blurImg, GaussianMatrix[n]]

It seem we need more smart method to get the $ker$.And This website have some picture for code test too.The picture is from the web.

Desire a universal solution from expert.

  • $\begingroup$ So, Liu Yifei... :) $\endgroup$ – J. M. is in limbo Jul 13 '16 at 4:58
  • $\begingroup$ @J.M. Little strange you know her. $\endgroup$ – yode Jul 13 '16 at 4:59
  • $\begingroup$ I know a lot of strange things. ;) (And no, I did not do Google Image Search.) $\endgroup$ – J. M. is in limbo Jul 13 '16 at 4:59
  • 4
    $\begingroup$ "Desire a universal solution from expert." Good luck with that. There is extensive literature on "blind deconvolution". It's difficult. Read the comments to mathematica.stackexchange.com/questions/95164/…, and this paper: jstarck.free.fr/Blind07.pdf $\endgroup$ – dr.blochwave Jul 13 '16 at 7:40
  • 1
    $\begingroup$ Possible duplicate of How to enhance a fuzzy image? Or at least the one I referenced above about blind deconvolution (which is what this question is asking) $\endgroup$ – dr.blochwave Jul 13 '16 at 10:25


blurredLiuYifei =<OP Blurred Image>;
ListLogPlot@Table[{i, imageBlurMSE[LiuYifei, blurredLiuYifei, GaussianMatrix[i]]}, 
                  {i, 1,15, 0.1}]

enter image description here

resLiuYifei = 
 ImageDeconvolve[blurredLiuYifei, GaussianMatrix[10], 
    Method -> #] & /@ {"DampedLS", "Tikhonov", "TSVD", "Wiener"};
ImageAssemble[{LiuYifei, blurredLiuYifei, resLiuYifei[[4]]}]

enter image description here

Here's a test:

LiuYifei = <originalImage>;

image = ImageAdjust@ImageResize[LiuYifei, 256];
blurredImage = ImageConvolve[image, GaussianMatrix[5]];

imageBlurMSE[im1_, im2_, ker_] := 
  ImageAdjust@ImageDeconvolve[im2, ker, Method -> "RichardsonLucy"], 
  DistanceFunction -> "MeanSquaredEuclideanDistance"]

 Table[{i, imageBlurMSE[image, blurredImage, GaussianMatrix[i]]}, {i, 1, 10, 0.1}]

enter image description here

res = ImageDeconvolve[blurredImage, GaussianMatrix[5], Method -> {"DampedLS", 0.002}];

ImageAssemble[{image, blurredImage, res}]

enter image description here

Drawn heavily from the following:

Challenge: deblurring images

Image Restoration

  • 2
    $\begingroup$ Maybe you want to find the suitable value of GaussianMatrix[n],but note this.And this post for a solution to find the $ker$ even I don't tell you this is a Gaussian Blur :) $\endgroup$ – yode Jul 13 '16 at 5:55
  • 1
    $\begingroup$ I think "drawn heavily from the following" could be made clearer - you've just copied my code from 95171 $\endgroup$ – dr.blochwave Jul 13 '16 at 15:19
  • $\begingroup$ I used method {"DampedLS", 0.002} from mathematica.stackexchange.com/questions/26823/image-restoration/… which produced a better result and as I said in the lower part it was a test of a starting point $\endgroup$ – Young Jul 13 '16 at 15:25

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