Magic: fixing double-exposed photos

A few days ago, a customer emailed us with a problem: a double-exposed photo. Could Blurity help, they wondered?

I decided to investigate.

The flaw in the photo was that the same image appeared twice. If it has been two separate photos on top of each other, there would have been no hope, but since it was the same image only shifted slightly, it appeared visually similar to standard linear motion blur. Moreover, the repeated image was consistently shifted throughout the frame.

I’m not quite sure how the image became double-exposed, and the customer didn’t know either. Close inspection suggested that the images originated from a scan of a film print, so the flaw might have been introduced inside the film camera, at the lab during development or printing, or at some point during the scanning process.

Here’s an example photo that I whipped up with Photoshop showing a nearly identical double-exposure flaw. To make it, I duplicated the image in another layer, reduced its opacity to 50%, and shifted it a bit. The net effect is about the same as was shown in the photo the customer submitted.

Double-exposed photo of my dog

Double-exposed photo of my dog (Click photo to enlarge)

Since the double-exposure is both visually and practically similar to motion Blur, I was confident that Blurity would be able to reverse it.

I opened the image in Blurity, went to Advanced mode, and fiddled with the deblurring parameters until I found a combination that produced good results. The most critical parameter choice was probably the number of solver iterations; for large blurs (or pseudo-blurs) like this, fewer iterations are often better.

Also important was the position of the red sample box so that the region of interest was centered on a good reference for the Blurity algorithm. As noted in the Blurity tutorial and Blurity user manual, the red box should be centered on an object that has strong edges, like a filled circle. An eyeball is usually a great choice.

Deblurring settings for fixing the blurry photo

Blurity UI and deblurring settings for correcting the double-exposure blur. (Click photo to enlarge)

After a few seconds of processing, Blurity produced a model of the blur. The blur model (also known as a blur kernel or a point-spread function) consisted of two bright spots separated and offset by the exact amount of shift in the double exposure.

For the advanced math fans out there, here’s another explanation of the blur kernel: if you were to convolve┬áthe blur model with the original sharp image (which is usually unknown), you would end up with the blurry image (which you opened with Blurity).

Blur model (also called a point-spread function, PSF, or blur kernel) that was computed by Blurity using the settings shown earlier

The blur model computed by Blurity for this image using the settings shown above, plus an enlargement of it. Note how there are two bright spots corresponding to each instance of the double-exposed image.

How do the results look? Great! (I mean, I’m biased, but still…) The double exposure is almost entirely removed by Blurity. There are some visual artifacts from the deblurring process, but they are comparatively minor and would be easily cleaned up with some post-processing in Photoshop.

The photo has been fixed!

The photo has been fixed! No more double exposure. (Click photo to enlarge)

Now, a word of caution: this approach doesn’t work for photos that have a double-exposure effect due to a flash at the same time as a long shutter speed. Said differently, if you take the photo with a flash, but the ambient light is also bright enough to expose the scene, you’ll get something resembling a double-exposure effect. However, those cases are very different from the one described above. The flash effectively produces a second, entirely different, image on top of the available-light photo. Since the problem there is effectively two different photos stacked on top of each other, they can’t be separated.

However, if you happen to run into a double exposure of exactly the same scene, or you produce some motion blur that looks like a double exposure, Blurity just might be able to help.

 

Categories: Features, Imaging, Lessons | Tags: , , , , | Comments Off on Magic: fixing double-exposed photos