Pages

Friday, February 4, 2011

My Photo Tweaks; panoramas and HDR

Producing Panoramas

Hiking in scenic locations begs for extra-wide pictures that can't be taken in a single frame. Over the years I have used various tools for combining overlapping images; currently I use fotoxx for this task.

In the following screen capture you will see several steps:
  1. Choose the Panorama option.
  2. Pick two pictures for the panorama.
  3. Set the lens used for the pictures (mine was at 25mm).
  4. Position the images as closely as possible to the proper overlap.
  5. Click on proceed.
  6. Fotoxx highlights the parts it is working on in red.
  7. Skip the match brightness option.

Let's watch the clip.


It's best to set the lens value properly, because it will make aligning the photos much easier and more successful. A wide angle lens makes a square image out of a round view -- think of the 'fish eye' lens, which warps up to 360° of view into a rectangle. With the right lens value, fotoxx can restore the original curvature of view, making alignment of features in the two images practical or, in some cases, achievable at all. 

The photo I wanted on the left of the panorama was originally on the right of the workspace, so my first action was to drag it over until fotoxx swapped the images. Then, using a combination of drag and rotate, I did my best to align the overlap. When objects both at the top and at the bottom of the image are crisply superimposed, you've got the right mix of rotation and positioning. If things aren't working out well, you can try changing the lens value, which alters the degree of curvature, to compensate. (For purposes of shortening the demo I edited out several seconds of my fumbling about placing things.)

Fotoxx takes over after you click on 'Proceed.' It searches for the best match, tweaking your image rotation and position, and choosing which pixels to use in the overlap zone. It can take some time; for this demo, I cut out about ¾ of the frames to speed things up.

When fotoxx decides it has done all it can do, the Match Brightness panel pops up. With this, fotoxx can attempt to match the brightness levels of the component images to make the panorama as seamless as possible. Usually, when I have adjusted each image ahead of time as in the previous post, this isn't necessary.

When I'm satisifed with the panorama, I save it and do final processing with the GIMP. This is primarily doing any rotations needed to level the horizon, cropping out most of the black areas, and trimming the left and right sides. If the panorama, intended to be wide, is too wide, it becomes very short when squeezed into a browser. (Yes, I could also do these things with fotoxx, but I'm already familiar with the GIMP. There is a swarm of photo-editing tools to chose from, and no reason to master them all.)

Here is another photo-taking tip for panoramas. If you hold the camera steady and rotate your body to take the overlapping pictures, objects in the foreground are almost impossible to line up (superimpose). Their picture was taken with the camera in two different locations. For distant objects the shifting is negligible, but it can make you pull your hair out over objects from near to many yards away. I've given up on one or two panoramas where I was sloppy and stumbled over the parallax. It's best to keep the camera in the same position, and rotate it around center of its lens to take the overlapping photos.

High Dynamic Resolution (HDR)

What's HDR? Consider a scene with both deep shadows and bright surfaces or skies. Even with contrast tweaking, it can be impossible to produce an image that clearly shows detail within both the very dark and very bright parts. High Dynamic Resolution, which I have briefly experimented with, is taking two more more photos of the same image at different exposures, and using the best parts of each. To bring out the detail in very dark sections, use those parts of an otherwise overexposed image. To reveal the structure in very bright sections, use those parts of an otherwise underexposed image.

Fotoxx offers an HDR operation in the same menu as Panorama. There is no manual alignment; any adjustments are done by fotoxx. This requires that the two images are, except for the exposure, close to identical; otherwise, fotoxx can't figure out how to combine them. Ideally, your camera has the ability to take a series of photos at different exposures with one press of the button, while you hold the camera still (or deploy it on a tripod). Mine will take 3 shots, but across a limited range of exposure, and the demo that follows is from images taken before I remembered how to do even that!

The two originals do not align exactly but fotoxx eventually figures it out nonetheless. They are not different enough to make a striking improvement when combined with HDR, but there's enough change to demonstrate the principle.

Now let's watch the fotoxx HDR processing in action.

In the first several seconds you can see fotoxx working up a sweat aligning the two images as best it can. Eventually it finishes its work, and the Adjust Image Contribution panel pops up. This panel allows you to specify how much each image contributes to the combined result across the different brightnesses, by manipulating the lines (one for each original image) in a fashion similar to the Adjust Color Curves panel in the GIMP. The fotoxx documentation points out that by bringing out the detail in the dark and bright areas, you effectively decrease the contrast, and Adjust Image Contribution allows you to compensate for that, or to follow other artistic impulses.

When I first tried HDR I stumbled into an issue, motion. If flags are flapping, branches waving, or people walking, the images you combine are of course different. Ghosting or double-exposure will result. There may be techniques to manually correct the resulting image, but those experiments are in the future. Improving photos is a never-ending process!

No comments:

Post a Comment

Comments may not appear immediately as they are moderated by the author to eliminate spam.