Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Since there is an algorithm to blur images, so that part of it cannot be recognised, can we reverse the algorithm and unblur part of than image?

Is there a program that already does that, is that even possible, even in a near future?

share|improve this question
Do you mean as in a full un-blurring of images, or just enough that you can tell what something was with a fair degree of accuracy? –  rob Jun 24 '11 at 16:39
just enough that you can tell what something was with a fair degree of accuracy –  mahen23 Jun 24 '11 at 17:20
Well... I guess it depends on what the something is and how blurry it is. So the answer is... Maybe! See @Greg Jackson's answer for the technical details. –  FrustratedWithFormsDesigner Jun 24 '11 at 17:31
You may be interested in this classic Stackoverflow competition: stackoverflow.com/questions/891643/… –  MatrixFrog Jun 24 '11 at 17:36
Do you want to reconstruct data or "make up" possibly realistic data? If so, take a look at this: wisdom.weizmann.ac.il/~vision/SingleImageSR.html –  Birgit P. Feb 1 '13 at 12:31
add comment

5 Answers

up vote 22 down vote accepted

Deconvolution can partially deblur a photo. There is plenty of software out there that implements it, and this was even a fairly basic excersise in an image processing class I took in College. It's not possible to completely reverse the blurring, since it is lossy, but a lot of information can be restored.

A motion blurred photo will be easier to restore than something that's simply out of focus, though both can be restored to a degree.

share|improve this answer
yep, i tried a software called Focus Magic, but i need to play around with it more. –  mahen23 Jun 24 '11 at 17:38
When the applied convolution is finite and the margins are preserved (i.e. image is let growing untrimmed), is it a fully reversible operation? –  vines Jun 24 '11 at 21:02
@vines: I'll be honest, it's been too long since I've dealt with this stuff to give you a good answer. My gut says no, a blur is lossy even if you allow it to extend outside of the original image, but I also remember there was something special about such blurs. In a very limited test setting, it may be possible. The important thing, though, is that in the real world, you will never come across such an image, so while interesting mathematically, it's a moot point, practically speaking, as to whether that's the case or not. –  Greg Jackson Jun 27 '11 at 17:00
I'm pretty sure no information is being restored - at least not in the Shannon sense. –  jk. Feb 1 '13 at 7:40
the links do not work anymore –  jgauffin Feb 1 '13 at 9:08
add comment

Reversing image manipulation depends on how something has been manipulated.

Since the image is a representation of the object and we only have the visual data in that image, we can't "unblur" it, since we don't have the data.

Imagine a blurred image (like a pixelated faced) is similar to an email without all of the characters, we wouldn't be able to take the characters that we do have available to make up the exact words of the original email.

There may be ways to make a rough appropriation what the image may be, but they'll only ever be approximations, nothing like Action film "enhance!" representation of image manipulation.

Update: obligatory link to a page about the "swirled face" http://sciencenotes.wordpress.com/2007/10/20/what-computers-can-swirl-computers-can-unswirl/

share|improve this answer
I've seen some pretty amazing real-world uses of image manipulation to unblur things that appeared completely unrecoverable. Although yes, an approximation...they're getting pretty damn good at approximating. Nothing like a blurred area in an image, but very poorly focused images brought into focus such that you can begin seeing detail even in far away things. –  Crazy Eddie Jun 24 '11 at 16:15
"there may be ways?" So in other words, you don't really know that much about it right? –  Jeremy Jun 24 '11 at 16:16
@StuperUser - that's exactly the approach taken by maximum entropy based deconvolution. If the object was a straight line, what would the blur look like, compare to the image, adjust the line - repeat. –  Martin Beckett Jun 24 '11 at 16:35
@David - one big difference is that wrt your glasses, the information is all still there, it just needs to be adjusted. Wrt images though, the information is not there and has to be recreated/approximated. –  Crazy Eddie Jun 24 '11 at 16:48
It doesn't even hit the rods and cones, its being distorted by your lens and it amounts to a lossy compression. Still, you can interpolate missing information. –  Jeremy Jun 24 '11 at 19:16
show 4 more comments

No, because blurring is like lossy compression: it removes information which cannot be recovered afterwords.

share|improve this answer
Removes? How so? –  vines Jun 24 '11 at 21:04
@vines: See TheFogger's response for the mathematical rationale behind this answer. –  Mason Wheeler Jun 24 '11 at 21:54
Think of blurring as a function, like rounding. If round(x) is 3, was x 3.1? 2.9? 3.499? 2.501? No way to tell. The information has been removed. –  Malvolio Jun 24 '11 at 21:55
@Mason Wheeler, @Malvolio: TheFogger's answer is a common sense guess. See en.wikipedia.org/wiki/Deconvolution for the theory. –  vines Jun 25 '11 at 11:42
add comment

No, you cannot reverse the algorithm. At some level, most blur filters work by summing and averaging over pixel values. If you add two pixel values and replace each number with the average of both, you can not later determine which values you had originally.

pixel1 = 3
pixel2 = 5

blurredPixel = (pixel1 + pixel2) / 2 = 4

newPixel1 = blurredPixel = 4
newPixel2 = blurredPixel = 4

If you only have newPixel 1 and 2, you cannot find out if the original pixels where 3 and 5, 1 and 7 or any other possible combination.

share|improve this answer
But in an image with a lot of data, you can use probabilistic models to predict what those might have been. –  Greg Jackson Jun 24 '11 at 16:32
If there was originally pixels 1..N, and what you've got is the average of each adjoining pixel, then the value of each pixel is completely determined by the value of any one pixel. If you have some idea of what the original was likely to be (perhaps limits on the likely values) you may well be able to come up with something very close to the original. –  David Thornley Jun 24 '11 at 20:31
add comment

If the convolution function is continuous then it should be possible. But since we pass through it to a band limited filter, the function cannot be continuous, some information is lost. But you can still find a close approximation.

share|improve this answer
Could you explain your answer to the point where someone who hasn't had a signal processing class (but a professional programmer nonetheless) could understand it? –  MichaelT Feb 1 '13 at 3:37
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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