The basic way to remove the haze and colour casts in your picture in open source software is using the Gimp. This program can trivially easy do it for you, however you must spend up to few minutes to adjust your colour preferences. Basically the Gimp software is perfect for people, who want to enhance the colours more and reduce the unpleasant thin layerm of fog. Aside from normal photos, that generally editor is focuse on the foreground or 2nd plan only the Gimp can be also used to emphasize colours of the background. Frankly speaking the software is also tailored for the long distance observation lovers.
Another tool, that can take a full advantage from the picture and bring all desired colour for us is IrfanView. I can recommend you this simple open source graphic software only when you want to modify your picture on the quickest possible way. Looking for it from the other side the IrvanView will bring the quality of your picture down, when you use it for purpose described here by myself.
The example below comes from the Gimp 2.8 open source graphic program. All steps shown in this article may trace to the RAW image processing, as we used to do nowadays. However this is not the issue for this text. I have focused for .jpg and .png images only, because it must be quickly and also without extravagant system requirements.
Well, aforementioned picture show us the example of far realing view from The Cotswolds northernmost brink (Ebrington Hill western slope) near Hidcote Manor Gardens. First plan is not interesting, because there are fields and trees. 2nd plan become more curious, because we can see some settlement there This is the Stratford-upon-Avon town, where William Shakespeare born in 1564. Beyond is getting more interesting, because we can spot some objects on the horizon. Unfortunately the haze interrupts our view and only we can say, that something is there, but not sure what it is.
Before we start to investigate what is there I will show you the Gimp’s tool, where we can do some photo amendments. First of all open the picture, which you want to work on and next from the main toolbar menu on the top choose “Colours” and next select “Levels” to get the window as per in the picture below (Pic. 2).
The box shows you the histogram with values. You can also adjust your picture changing the single channel saturation, but I will back to this next.
Possibly you spotted 3 small arrows just below the histogram. You can adjust them watching the visual changes of your picture at once. Another image, slightly modified is a good example, where dehazing the picture in Gimp is commonly used. The brightness and contrast has been changed a little bit whereas colours remained the same (Pic. 3). In the result our panorama became more distinct.
Next step involving us into more advance image processing. I think everyone according to his own preferences can rectify this picture. My examples are below.
Treat the Pic. 5 as the final output. Admittedly the horizon appears to be clearer, but we lost many tinges. Our image is strongly blue. The blueness appears everywhere even on trees and fields. Moreover some hues are gone. When you spot on the foreground it looks almost dark. Let’s have look what can we do to make our processed image better.
Looking on the “Adjust Colour Level” box you can notice the “Channel” dropdown list. The “Value” is our default variable. Once you click on the arrow on the right you will have the choice of the RGB channels, that you can adjust separately. Ant there you go! Now you have RAW-looking image processing (Pic. 6). Gimp is very good in it.
I am telling you again; everyone can adjust the picture in the different way. My process is only the example.
Pic. 8 is my final image. It looks quite realistic and horizon is clear, although Pic. 7 shows better horizon, where you can be able to distinguish the colours of the buldings. Anyway Gimp 2.8 is a really good tool to enhance the colours of the foreground of your picture and reduce the haze. You must spend a few minutes to do it, is not the quickest way but is definitely worth. The description above refers to the Gimp 2.8. See the links at the end to study this process for older Gimp versions.
IrfanView is much simpler graphic open source tool than Gimp. It sounds better for someone, who want to process the image quickly. In the long distance observations purpose this is definitely the quickest way to get rid of the haze from your photo. Other side remains in the quality, that I am going to considerate in this part of the article.
At first I show you where can we find the colour corrections boxes in the IrfanView software. From the main toolbar on the top select “Image” and click the “Color corrections” from your drop down list (Pic. 9).
Unlike to Gimp software the IrfanView has everything located the same in most versions. Once you’ve got older one this “Color correction” box is to be found in the same place.
When you have the “Color corrections” box opened you have a few optiuons to change the colours of your picture. The basic de hazing tool is a “Gamma correction” value, always as a default set on 1.00. When you decrease this value down to around 0.50 the difference will be considerable (Pic. 9). Alongside with the gamma you need to change the “Contrast” as per in the picture below (Pic. 8), because the gamma only will make your photo too dark. The preview at the upper part of the box helps you to adjust the photo colours correctly (Pic. 9).
When you have ascertained about the “Gamma correction” and “Contrast” values just go OK and see the how the image changed.
In the picture above the horizon looks much clearer. We can even to point which object far away is brighter or darker. The worst side of this image is strong blueness.
The left part of the box includes another options to colour corrections of your picture. There are RGB canals and “Saturation” value (Pic. 13).
Unfortunately the IrfanView doesn’t handle with it like Gimp. To be honest is better don’t touch these options in left part of the box when you dehazing your panorama (Pic. 14).
I spent maybe a tens seconds to correct the image above. This option to de haze is definitely the quickest, but…
… the output can bring you down on the contrary with Gimp software. However there are pros and cons of everything. Gimp cannot de haze your horizon like the IrfanView does. That’s why I shown you the quickest way to de haze your picture for long distance purposes; when you don’t care about the quality and only want to documentate the far realing view, choose the IrfanView. You won’s spend longer than minute doing this.
1. Dehazing the picture – explanation
2. About digital photo dehaze
3. Dehaze the picture with Gimp – older versions
4. Haze removal with open source photography software (Gimp 2.2.13)