An interesting little photomagic trick.
Dec. 25th, 2004 11:17 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
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!
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!
These features aren't unique to Picture Editor, of course
Date: 2004-12-26 05:19 am (UTC)Photoshop also lets you adjust the three color channels individually, and if I do that—or have Photoshop do it for me with "Auto Levels"—the Bay has a lot more green in the water that way. If you're having trouble with blue-shifting in your picture, you might try adjusting the blue separately from the other channels. I get the same blue-green water if I use "Auto Color Correction," which tries to identify shadows, midtones and highlights in the image instead of evenly distributing the contrast; Adobe's engineers definitely seem to agree that there's more blue in the picture than there's supposed to be :-)
Re: These features aren't unique to Picture Editor, of course
Date: 2004-12-26 01:49 pm (UTC)(Also, I realized that I mistyped the name of the program, which I suppose is one of the dangers of writing after midnight. It's "Picture Publisher", not "Picture Editor", and from Micrografx, not Macromedia.)
Re: An interesting little photomagic trick.
Date: 2004-12-26 05:23 am (UTC)you might be able to play with the individual channels a bit to get the blue shifted into the range you want, but what you'd really need for that is the equivalent of photoshop's "curves" dialog.
Re: An interesting little photomagic trick.
Date: 2004-12-26 01:52 pm (UTC)The Golden Gate is even more evident in the full-size image, too.
Re: An interesting little photomagic trick.
Date: 2006-09-04 06:17 am (UTC)- roger@spacecomics.com