Wednesday, December 23, 2009

Partial HDR

kw: photography, photographs, digital darkroom

Christmas lights are up, and I decided to experiment a little, to get pictures of my neighbors' displays that looked better than my past efforts. The neighbor across the street has a modest but pleasing display. The image below is reduced from the "normal" JPEG file. All images were taken using Nikon's RAW format, NEF. The images behind the ones shown, obtainable with a click, are 1/4 the original size, 752x500 pixels.

So this image shows what one usually gets from the auto-exposure setting. I forced ASA 200 for smoothness even in the shadows, used Aperture priority set to maximum (f/4.2 at the 30mm zoom lens setting), and the camera used a shutter time of 1.8 seconds. Of course I had it on a tripod.
Because of the brightness of this display, mainly the "tree balls", some light shows on the house. Many photos of Christmas lights just show the lights with little hint that there is a house holding them up! The light on the snow bank is from a street light half a block away.

I have a variety of image processing software. For the work today I used Irfanview 4.2, Nikon ViewNX 1.2, and Picasa 3.0. Both Irfanview and Picasa can work with NEF files. I don't have high-dynamic-range (HDR) software, though I do have Gimp 2.0, which is able to produce HDR images, but with lots of operations. I decided to see what I could do to get "halfway to HDR".

The image that follows shows what Irfanview can do with this default exposure, using the NEF file as a basis. To "pull in" the highlights and shadows I cut the contrast by half (a setting of -64 in a range of -127 to 127). I applied sharpening of 0.2 (20 out of 99), which brightens up any edges, and saved the result as a JPEG file using a quality factor of 95%.
One of my goals was to bring out the colors of the globes in the tree. This image shows them slightly better than the one above it, but its main visible difference is that it brought up the light on the house and a hint of light in the sky.

In case I want to try real HDR processing, I made EV+2 and EV-2 images. This is the EV+2 image. The only difference from the first one above is the exposure time, about half a second. Now you can see mainly the lights, and the globes' colors are more distinct.
I used Irfanview again to cut the contrast in half, but added this: I raised the Gamma to 1.4, which increases effective exposure.
I think the colors are better, but there is a washed-out look. The hint of light in the sky is now just a scant hint, and quite grainy also.

Then I tried something analogous in ViewNX. Being tuned to Nikon files, I hoped it would make all the dynamic range of the NEF file available to being mapped into a JPEG file. JPEG files use 8 bits per pixel, while the NEF format for a D40 has 12 bits per pixel. That adds four stops (4 factors of 2, or 16x) to the lightness range.
ViewNX gives you control of both ends of the range, using "Protect highlights" and "Protect shadows" control sliders. I set both sliders to 100%. This is getting to be a pretty good image, though the sky is still quite grainy. This is about the best one can do with a single NEF file.

I had one more trick to try. I'd read that Picasa has a "poor man's HDR", in its "Make a Collage" section. One type of collage is a multiple exposure. I tried making a triple exposure with all three images, which was overpowered by the EV-2 one (7+ seconds): the globes were glaring white. So I made one just using the "normal" and EV+2. After saving the collage image, I used the Fill Light tuning option, setting the slider to halfway, and saved a copy.
While I am still not satisfied with the look of the globes, as a whole this is the best image. It looks much closer to what I recall seeing visually than any of the unprocessed images.

No comments: