Removing Haze (Local Contrast Enhancement)

Before After

Haze occurs due to a variety of natural and man-made conditions, including water vapor, smoke, pollution, etc. Scanners and digital cameras can also produce a sort of “haze” when digitizing images, which is really just a case of not capturing the full dynamic range available for the image. Here’s a simple technique you can use to improve (if not eliminate) problem haze of both varieties in your photographs.

Giving credit where credit is due: I did not come up with this method. I adapted it for The GIMP from an article on the Luminous Landscape web site (great photography web site, BTW, I recommend it).

The Procedure

Here’s the original image loaded into the GIMP. It suffers from both types of haze that I described above: a compressed dynamic range (probably a result of the in-camera metering algorithm being fooled, or overwhelmed by the wide contrast in the scene), and haze due to water vapor over the town of Kailua on Oahu, Hawaii.
The first thing to always check is the histogram. Here I bring up Levels (Layer/Colors/Levels in GIMP 2.0). Notice how the upper (right) end of the histogram falls off well before the right end? I can improve this compressed dynamic range by bringing the white point slider down a bit to the end of the histogram, as I have done here. Hitting “Auto” (Auto Levels) will often produce good results, with the caveat that you lose the control that you get manually adjusting the sliders.As you can see, making full use of our available dynamic range improves the overall contrast of the image.
If I zoom in to a 100% view you can see that there is still a fair bit of “natural” haze left in this photograph. It is unlikely that I can remove this completely, but there is another trick that helps out significantly.Run an Unsharp Mask filter on the image (Filters/Enhance/Unsharp Mask). Set the Radius parameter to a largish, seemingly unreasonable value somewhere between 50 and 100. You’ll need to experiment with the Amount parameter, but the idea is generally to have it as a small to moderate value (in this case .40). Leave the Threshold parameter at 0.

What you are doing is applying a local contrast enhancement to the entire image. Unsharp mask works by increasing the contrast between edges in the photos (areas of color or tonal transition), making them appear sharper. Even though they really aren’t, your brain registers this increased contrast–technically called “edge accutance”–and the edges appear more defined, thus sharper. What we are doing here is making the pixel Radius big enough so that the filter is not just increasing the contrast along fine lines, but in larger swaths.

As you can see, the result has more punch and a less “gauzy” appearance.

Zoomed out we see the full effect. To see the before and after effect in your own image, make use of the Undo (Ctrl+Z) and Redo (Ctrl+Y) features to quickly compare before and after at different zoom levels. If you want to try different sharpening parameters (say more or less Amount), just Undo, bring up the last filter applied with Ctrl+Shift+F and tweak the parameters.

Further Reading



  1. […] al Banco Piano. San Lorenzo 1098 esq. Sarmiento, Rosario, Argentina. (Retocada con el Gimp para eliminar niebla.) Building of the former Banco Francés, today Banco Piano, in Rosario, Argentina. (Retouched with […]

    Pingback by Zapatero ve “razonable y asumible” la necesidad de capital de bancos y cajas - Refinancia tu vida — March 12, 2011 @ 12:23 am

  2. […] al Banco Piano. San Lorenzo 1098 esq. Sarmiento, Rosario, Argentina. (Retocada con el Gimp para eliminar niebla.) Building of the former Banco Francés, today Banco Piano, in Rosario, Argentina. (Retouched with […]

    Pingback by Latest Bancos News - Unificación de préstamos — March 15, 2011 @ 11:58 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at

%d bloggers like this: