Geek: Image recovery fun
Monday, September 17, 2012

You have probably watch shows that features some ridiculous image recovery and enhancing capabilities. Even though most of them are greatly exaggerated, there is some truth to it. In this post I'm going to show how much detail there are in the images that you've taken.

Disclaimer: This is done to show the proof of concept and not as a tutorial of how do it. Though I will briefly discuss the techniques. p.s I promise not to use it for evil.

Due to how creepy it would be to edit some random person's pictures, I shall find some of my really old pictures and use them instead.


This was taken in the cinema some many years ago, as you can see, or not see rather, this is a really screwed up image.

But after just a little bit tweaks here and there.


Granted, you could recover most of the details just by bumping the brightness up. (you'll be surprised) But most of the work comes between the balancing of details vs noise. When you switch to black and white, you get a little bit more leeway and will easily recreate the image like this.


Of course, that is really noisy, but it's alright for b/w images. It could be a little better, I apply a noise filter. It reduces the noise, but the trade off is lesser details as you can see.


If you're using photoshop or any other image editing programs, one thing to look out for is the histogram. (or levels) This shows the amount of light (data) that's within the image.


From this graph, you could tell where the light is gathered at. For this example, you can tell that most of the light data is at the darker end of the spectrum. Which means that all highlight and midtones are practically gone. As you can tell from the image, it is very flat, with little to no dynamic range. That's because all the data is recovered from the "black" side of the image.

Here's a before and after to illustrate what I've done so far.

Left: Before | Right: After

(Sorry I had to take a random image from facebook.) Well, there is a limit to what you can do if the image isn't taken well in the first place. If you're using a cellphone, and it doesn't have a decently sized sensor (5MP and above), chances are that there are not enough details and you're screwed either way. An example will be this following image.


There is a limit of what you can achieve with this, but the results are still pretty amazing. Suddenly you can tell the shape of the shades, you could tell the features of the chair, and you could tell that they are in a 4D cinema or something similar.

All I can say that this is a powerful tool if used for creepiness. Stalking people and uncovering details they did not intend is fun, but you know, it's creepy as hell.

These are actually all very simple. Once you have the fundamental understanding of how light works,  how your camera (sensor) captures the light and how your computer interprets it, this is pretty much a piece of cake. Most photographers out there could do this in their sleep probably. I'm just guessing that most people wouldn't know that so much raw data is actually in the images that they've uploaded. I'm not trying to scare you or anything, I just thought it's good to know.

Oh also, if you've heard of raw images, those are even more fun to play around with. As the name implies, it captures raw light data and lets the computer interpret it. Which is why the file sizes are usually pretty big. 20+MB per image. However, because there are no compression involved, you preserve most of the data and you can do amazing stuff with it.

So... you know, just don't use this for evil.

Labels: , , , ,