A couple of years ago Adobe ran a video titled Photoshop Image Deblurring Sneak that got 1 million views. It was one of those seemingly magic software moments that you would hardly have thought possible. A blurred photograph restored to the way it should have been. Well worth looking at here:-
Well, it is possible, and while the work at Adobe is really impressive, the process is not at all new. It’s called deconvolution, and if you get it right (but there’s the issue, as we’ll see in a minute), you can bring back to life and meaning those occasional pictures that you messed up. In particular, it can restore motion blur, where the image got streaked because either you or the subject moved and the shutter speed wasn’t up to scratch. It can also help if you focused at the wrong distance (that Aaaargh! moment).
Dare I admit it, I’ve been using one piece of software for several years that can do both of these, and it’s called Focus Magic. Looks on the surface like magic, but underneath it’s real math. But then all image processing is about the math. Actually, a fair bit of nonsense gets written about blur restoration, so I think it’s worth setting it straight, without going too deep into the math (not least because I’m very much no mathematician). To some people it seems that something external is going on and that because you can’t see the detail it’s been somehow lost and can’t be recovered. Others think that out of focus blur and motion blur are different creatures. No, they can both be deconvolved, and it really is restoration.
Here goes. You can think of these kinds of blur as two signals that have got mixed up. One signal is from the scene in front of the camera and ought to be sharp. The other signal is the one from the lens that spreads each point around. This spreading around is called convolution. It smears sharp points. One really good example is in astrophotography (which really benefits from this kind of software). Imagine a star field. The stars are points, and the small ones in a photograph take up one pixel. The blurring because of the bad focus spreads these points into little circles. What’s needed is a way of reversing the spread.
And you can. Because this convolution can be described in equations, it’s possible to reverse engineer the image by undoing it. This is deconvolution. Otherwise known as unstitching a messed-up image.
Limitations? You bet. To work well, deconvolution software really wants to know exactly, mathematically, how the image got blurred (ie convolved) in the first place, but in reality with your blurred photograph it has to work ‘blind’. You experiment with the blur radius and the amount, and fiddle around a lot. And with the currently available software, the maximum blur it can handle, whether soft focus or motion blur, is 20 pixels. So, what it can’t do is the central conceit in the Kevin Costner and Gene Hackman movie No Way Out, in which an extremely slow computer (well, it was 1987, after all) spends much of the film bringing Kevin Costner’s face from total blur to recognisable. Also, it needs a lot of computing power. And it tends to introduce artifacts like halos and noise, if you’re not careful.
Oh, sorry, did I give the plot away? A bit ridiculous as a plot device. But when it comes to the difference in a photograph between a bit too soft and pin sharp, this is the way to go. Here are two examples.
In this shot of a young Nurbakshi Muslim girl in Ladakh, by a friend, Carolina Reid who was recently on assignment there, the focus was on the suspended drops of water, perfectly fine. But we wondered if it would help if the girls’ face, several inches behind, were a tad sharper. I think yes. The blur radius was 12 pixels.
Here’s a shot of mine, one of the out-takes, from a shoot in the Gulf of Thailand. It’s a squid boat, and I’m standing on another, so there was quite a bit of up and down. I was trying to keep the ISO down by seeing what the slowest shutter speed was that I could hand-hold. This was too slow, so there’s motion blur. Not only that, but I was using a fast manual lens (Zeiss 85mm ƒ1.4), and there was a bit of drift between the two boats. This shot was also slightly out of focus. I ran Focus Magic over it twice. Once for the soft focus, another time for the motion blur. I was impressed by the results.
There’s actually a bit more to it than that, because quite often the soft-focus area is in just a part of the image, so Focus Magic and similar software work best (for me) selectively. And also often, what you may need is tightly localised. Get the eyes sharp in a photograph of a person, and perceptually viewers will accept any amount of softness everywhere else — intentional or otherwise.