brooksmoses: (Two)
[personal profile] brooksmoses
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!
From: [identity profile] akosut.livejournal.com
In Photoshop Elements, your "Tone Balance" dialog is called "Levels", and if I feed in your "before" picture and adjust the RGB levels to the same values you show in your dialog, or pick "Auto Contrast" to do it automatically, I get what appears to be the same picture as your "after" shot.

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: An interesting little photomagic trick.

Date: 2004-12-26 05:23 am (UTC)
ext_481: origami crane (3D)
From: [identity profile] pir-anha.livejournal.com
histograms rock. :) and that's a great picture; i can make out the golden gate bridge, and i like how there are a lot of depth layers receding into the distance.

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: 2006-09-04 06:17 am (UTC)
From: (Anonymous)
Micrografx also made PhotoMagic, the only photo software I've used for 15 years. I can't give it up because of the Remove Pattern and Stretch Detail effects, which improve scanned images dramatically. I'd like to know if PhotoShop or any other new software can do that, before I'll switch. I've haven't seen the same effects in other software I've looked at. They had some real powerful and effective stuff at Micrografx, as your results, and mine, show.
- roger@spacecomics.com
Page generated Jul. 16th, 2025 07:37 pm
Powered by Dreamwidth Studios