Software improves lighting on digital photos
 |
By Ian “Gizmo” RichardsA common cause of poor-quality digital photos is the lighting conditions present when the photos were taken.
While there’s no magic solution for photos that are already ruined, with the help of some clever software you can get superb digital photos from near-impossible lighting conditions that would normally be regarded as impossible. |
Digital photography’s dirty little secret
Digital technology has certainly brought about a revolution in the cost and convenience of photography. But amid all the hype about megapixels, image stabilization, and other technological wonders, there’s little mention of digital photography’s relatively limited ability to correct areas that are too bright or too dark.
This weakness is present not only in digital photography but also, to various degrees, in other digital media. Digital TV has a similar problem, and even audio CDs are challenged when reproducing volume ranges from very soft to very loud.
The problem lies not in digital technology itself but in the implementation of the technology. That’s good news, because it means we can expect enhancements over time. For example, when plasma TVs were first introduced, they were almost laughably poor at reproducing highly illuminated areas. Today’s models have improved greatly. Similarly, LCD TVs have always reproduced black and dark tones poorly, but the latest models give quite acceptable results.
Digital cameras have also improved, although most mass-market models still have serious limitations when reproducing scenes with stark contrasts in lighting. For example, try photographing a white Persian cat lying in the sun on a black velvet lounge. Almost certainly, all the details of the lounge or of the cat will be lost – and quite possibly both.
Old film cameras are generally better at handling these stark contrasts than digital cameras, but even they fall far short of the performance of the human eye, which is quite remarkable in its ability to handle huge ranges in brightness. Consider, for instance, how well the eye deals with a situation such as driving on a dark road at night while encountering an oncoming car with its headlights on. Most cameras would simply display such a scene as two formless white spots on a black background. Yet, thankfully, we humans still manage to see a considerable amount of road detail.
The superb performance of the human eye lies at the heart of many of the problems of digital photography. What the eye effortlessly sees may simply not be reproducible with a digital camera.
The limitations of digital image editors
Most digital cameras include free image-editing programs that can be used to improve the quality of the photographs they create. There are also some excellent free image editors whose features range from the most basic to fully professional tools comparable to Adobe’s Photoshop. However, I’ll focus here on what image editors can’t do.
Most digital editors allow you to make the dark areas of a photo lighter and the light areas darker. On the face of it, this seems like an easy way to fix photos that suffer from having some areas too dark and others too light.
Alas, it’s not that simple. You can indeed lighten the dark areas and expose more detail, but in the process those areas often become grainy and flecked. And when you try to darken the white areas, you may find that they stay white with no more detail revealed. The two images in Figures 1 and 2 are a rather extreme example of this phenomenon.
Figure 1. An image of fireworks on a bridge, prior to enhancing the lighting.


Figure 2. The same image with its light areas darkened and its dark areas lightened.
As you can see, it’s possible for a digital editor to recover some detail from dark areas, but it’s much more difficult to recover detail from white areas. This means that, when you take digital photos where the subject has a lot of light-and-dark contrast, you’ll generally have a better chance of improving the picture with a digital editor if your photo is on the dark side rather than too bright.
If your camera allows manual adjustments, try reducing the exposure. If it’s completely automatic, you may – if the light is good enough – improve the image by turning off the camera’s flash.
There’s a far better solution to this problem, however. It involves using advanced computer software.
New image editors improve picture balance

Figure 3. These three images show the same scene captured at different exposures by a digital camera.
__________
In the past few years, two new digital photo-processing techniques have become available to amateur photographers: high dynamic range (HDR) photography and tone mapping. Both techniques are related and indeed often combined.
The idea behind the technologies is to combine two or more shots taken at different exposures into a single photograph. If one photo is underexposed (too dark) and the other overexposed (too white), the computer can take the best information from each to produce a well-balanced composite.
I know what you’re thinking: “Why not simply take one photo that’s correctly exposed to start with?”
As I explained above, it’s not easy to do this with digital cameras when there are both very dark and very bright objects in the same scene. For this situation, HDR is an excellent solution.
Look at the examples in Figures 3 and 4, which are taken from HDRsoft’s Photomatix site. The three photos in Figure 3 were taken at different exposure levels and are combined into the single, superior image in Figure 4.

Figure 4. The three images are combined via HDR to create a single one with improved detail in both the dark and the light areas.
As you can see, the HDR composite has much better balance than any of the three photographs used to generate it. It’s also livelier and more appealing.
Taking two or more photographs at different exposures is not that difficult. In fact, many modern digital cameras have a feature called exposure bracketing that automatically takes a specific number of shots one after the other, each at slightly different exposure levels. Even if your camera doesn’t have this feature, you may be able to capture various exposures manually – providing, of course, that your camera has manual exposure controls.
For best results, you must use a tripod when taking your multiple photos. Still, acceptable results are possible if you hold the camera very steady.
Once you’ve taken the photographs, you need special HDR software to combine them into a single HDR photo. There are many HDR packages available, but before you buy any of them, try the free Qtpfsgui open-source package. (The name is derived from the Qt application framework and pfs back-end library, while gui stands for graphical user interface.) Qtpfsgui is all that most users will need; as a bonus, the program does tone mapping as well.
Qtpfsgui is available for Windows as a 3.8MB .zip file, which can be unzipped and run without an installation routine, or as a 9MB installer package. If you use the .zip version, you must also download a separate .zip file containing DLL files the program requires. Full details can be found in the readme.txt file included in the Qtpfsgui archive.
Please do try Qtpfsgui. Although free, it really is an outstanding program. Download your copy from the Sourceforge site.
Superficially, tone mapping works much like HDR, even though the underlying processing is quite different. Unlike HDR, tone mapping can be applied to a single image, though the results are usually inferior to those obtained using multiple images. However, if you don’t have multiple images, tone mapping is worth exploring. Just don’t set your expectations too high.
The best results I’ve obtained by tone mapping a single image were with Re-DynaMix, a commercial Photoshop plug-in (U.S. $16). You’ll find more information about the plug-in on the MediaChance site.
I suspect that Re-DynaMix is doing a lot more than straight tone mapping. As you can see in Figure 5, the resulting image is noticeably livelier and better balanced than the original. In many ways, the output is similar to an HDR image.

Figure 5. The Re-DynaMix plug-in for Photoshop improved the quality of the image on the left by applying tone mapping and other effects.
One thing’s for sure: HDR photography is here to stay. Indeed, the next generation of digital cameras is likely to include HDR processing in the camera itself. That’s fine, but personally, I like the flexibility of making the fine adjustments I want by using software running on my PC.
———————————————————
Ian “Gizmo” Richards is senior editor of the Windows Secrets Newsletter. He was formerly editor of the Support Alert Newsletter, which merged with Windows Secrets in July 2008.