mattbell: (Default)
[personal profile] mattbell
The view from an aircraft is incredible, but the atmospheric haze even on clear days dramatically reduces the contrast.  However, I realized that, mathematically speaking, the haze is adding a constant amount of light to each pixel of the image.  (The blue haze that occurs in absence of air pollution or atmospheric particulate matter comes primarily from Rayleigh scattering.  Rayleigh scattering is also the answer to the childhood question "Why is the sky blue?)  I can estimate the color value of this haze by finding a particularly dark part of the image and assuming that the actual object there is black.  Then, I can subtract that value from every pixel.  The results are dramatic:

Before:

San Francisco before haze subtraction

After:

San Francisco after haze subtraction by you.

More pairings:

Bay bridge construction:

Bay bridge construction after haze subtractionBay bridge construction before haze subtraction

A reservoir:

Northern CA reservoir after haze subtractionNorthern CA reservoir before haze subtraction

Some hills:

N California hills after haze subtractionN California hills before haze subtraction

If I really want to do this right, I should take multiple black samples to account for the fact that there is a greater distance (and thus more haze) in the top parts of the photo than there is at the bottom.  Then I can make a gradient in Photoshop between the two values. 


Date: 2008-12-23 07:01 am (UTC)
From: [identity profile] crasch.livejournal.com
Very cool!

Date: 2008-12-23 08:49 am (UTC)
From: [identity profile] arethiel.livejournal.com
Mmmm, levels / curves. Always nice for photo adjustment.

Date: 2008-12-23 09:30 am (UTC)
From: [identity profile] acydrayn.livejournal.com
Hah, I was going to say the same thing :) Curves is made to do just this. Eyedropper tool for something black, something white and if available something gray or neutral. Then sliders to adjust and you can add points along the tonal ranges to fill in the rest.

Date: 2008-12-23 09:47 am (UTC)
From: [identity profile] factitiouslj.livejournal.com
Very cool. I'm actually not sure I wouldn't like the proposed refinement at the end less, though. The way these are, there's a bit less contrast at the top parts, which gives a nice kind of atmospheric impression of the scale involved.

That works better in the first two pictures than the others, I think.

Date: 2008-12-23 04:09 pm (UTC)
From: [identity profile] agentsteel53.livejournal.com
I tend to set darkest to black, lightest to white... really aids the contrast. Especially if done in two halves - one for ground, one for sky.

see here

Date: 2008-12-23 07:36 pm (UTC)
From: [identity profile] agentsteel53.livejournal.com
thanks :)

I tend to do a lot of levels adjustment on the shadow end to fix contrast problems, whether due to windshields, airplane windows, or the lens itself losing contrast.

Date: 2008-12-23 06:45 pm (UTC)
From: [identity profile] dixiemouse.livejournal.com
Not to sound like a smartass, or incredibly ignorant, but how much of the haze is induced by the double paned, internally plastic window?

Date: 2008-12-23 07:34 pm (UTC)
From: [identity profile] nasu-dengaku.livejournal.com
There is some haze and reflection from the window. It often affects one corner of the image more than the others and has to be dealt with separately.

Date: 2008-12-23 07:38 pm (UTC)
From: [identity profile] agentsteel53.livejournal.com
the worst is getting a reflection of a hand. especially problematic at night. I've been known to create a makeshift shroud out of a black shirt.

there's some nighttime air photos here. In general, my air travel tag contains what one expects. :)

Date: 2008-12-23 09:10 pm (UTC)
From: [identity profile] dixiemouse.livejournal.com
How much does putting something, like a tissue, over the flash actually help in this particular situation? Or is it better to not use flash?

Just generally curious... :)

Date: 2008-12-23 11:07 pm (UTC)
From: [identity profile] easwaran.livejournal.com
It's definitely better not to use flash for any photo unless you're taking pictures of something that's less than 100 feet away (in fact, the effective range may be much shorter). I think that with some cameras, using the flash also tricks it into using a shorter exposure time, which I suppose might be useful if you're trying to take a picture of something distant and bright in a generally low light situation, but otherwise just makes the picture look very dim.

Date: 2008-12-23 10:38 pm (UTC)
From: [identity profile] triath.livejournal.com
Glad you made it home ok. There have been lots of flights canceled.

Any chance you're going to post those kayak photos soon?

Date: 2008-12-24 06:48 am (UTC)
From: [identity profile] nasu-dengaku.livejournal.com
The kayak photos didn't come out that well, but I'll put them on flickr now.

Here you go:

http://www.flickr.com/photos/9055206@N06/tags/olympia/

Date: 2008-12-23 11:08 pm (UTC)
From: [identity profile] easwaran.livejournal.com
That's really nice! I'll have to try that with the pictures of the Australian outback that I got from the plane but didn't bother posting on Flickr because they're so washed out.

2 geeky cents

Date: 2008-12-29 09:22 am (UTC)
From: [identity profile] catithat.livejournal.com
I looked into haze removal a couple years ago for a project. If you're still playing with this stuff, the detailed technical answer is that the scattering of haze has 2 effects to correct, which both decrease contrast, so any contrast-increasing method will take care of it.

Some of the light sensed by the camera came from the object you're taking a picture of, while some came from skylight, that is, light from the the sun, scattered by the air into the path of the camera, making it brighter by an additive factor. This is what you've already corrected.

Also, some of the light that otherwise would have made it to the camera is scattered out of the path of the camera, so the picture becomes darker by a multiplicative factor.

Both of these are different for each color channel, and are not actually constant over the image, but as you guessed are directly proportional to distance.

If you want to really really geek out, check out:
http://www1.cs.columbia.edu/CAVE/projects/vision_fog/

I hope your travel plans are progressing. I'm spending some downtime chilling out for the next couple days before the next roadtrip :)

Re: 2 geeky cents

Date: 2009-01-02 04:39 am (UTC)
From: [identity profile] nasu-dengaku.livejournal.com
Ooh... that's a good point.

Profile

mattbell: (Default)
mattbell

February 2011

S M T W T F S
   123 45
67 89101112
13141516171819
20212223242526
2728     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 6th, 2026 10:39 pm
Powered by Dreamwidth Studios