Brooks (brooksmoses) wrote,

An interesting little photomagic trick.

On a recent airplane flight, I had an excellent view of San Francisco out the window, and took a number of pictures. They came out nice, though quite hazy.

Take, for example, this one:

Nice, but very hazy-looking; nothing like what the view "felt" like as I was looking out the window. It certainly seemed like a nice clear day when I was looking at it!

So. In my photo-editing program (Micrografx's "Picture Publisher", which was a Photoshop-competitor about five years ago; the company has been sold and the program is no longer made, which I consider unfortunate), there's a nifty feature called "tone balance", which displays a histogram of the pixel shadings, and lets one reset where "black" and "white" are on that scale. Here's what the histogram for the above image looked like:

Remarkable, no? All the pixels are in this narrow band between 50% and 75% brightness. Which, if one looks at the science, is exactly what one would expect from atmospheric haze. Any given photon will randomly either come from the haze or from the view behind it, and so the net effect is that everything is shifted towards the pale gray color of the haze. (An interesting thing that comes from this is that we think of "foggy" as meaning blurry, but fog doesn't blur things, except very bright lights, to any notable degree.)

The obvious fix for this, looking at the histogram, is to reset the colors so that the darkest pixels are black, and the lightest ones are white, like so:

The effect of this is quite stunning, as if all the haze and fog suddenly disappeared:

This isn't even as I saw it; I remember a little haze in my view. This is the deep blue ocean and the clear sky and the bright city that I would have seen had there been no haze at all.

It turns out that things aren't always quite this simple; this was at about 8,000 feet or so, and an image that still looks ok if it's a touch blue-shifted. The photos that I took from 30,000 feet over Utah have a very definite blue shift (from the air itself, I suppose), which is a lot harder to erase -- the remaining blue gradiations don't quite have enough range to reveal much, and the blueshift isn't uniform across the image. Nonetheless, it works pretty good for San Francisco, I think!

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.