Focus stacking: why use it, what exactly is it, and what are some of its limitations.

Why use focus stacking?

Because I primarily photograph landscapes where the foreground may be quite close and occupies a significant portion of the frame, there are four technical considerations I always try to maximize, and these include: detail, sharpness, dynamic range and depth of field. Maximizing detail included purchasing the highest megapixel count on a full frame sensor camera I was able to afford. Maximizing sharpness includes precise (usually manual) focusing while the cameras is on a tripod, assuring that the shutter speed is fast enough to stop any motion in the photograph that I want stopped, using a cable release, tripping the shutter when the mirror is in the up position (which it always is in live view), and using an electronic first curtain shutter – which my camera supports. Dynamic range is usually greatest at the camera’s lowest native ISO, which I use whenever possible, or the closest to it that I can reasonably get. That leaves depth of field, the optimizing of which, is the primary “focus” of focus stacking.

 

Depth of field refers to those areas in front of and behind of the subject (that is the subject which is focused on) that also seem to be in focus in the final photograph. In many landscape photographs one of the goals is to maintain the sharpest focus possible throughout the photograph from the furthest to the nearest objects. The traditional methods of optimizing depth of field (a good tutorial on depth of field can be found at: http://www.cambridgeincolour.com/tutorials/depth-of-field.htm) includes using a smaller aperture (larger f-stop number) and hyperfocusing (focusing on a point about 1/3 of the distance from the camera to the furthest object you want in focus). The downsides to both these methods are twofold:

  1. since a smaller aperture results in less light reaching the sensor per unit time, in order to maintain a proper exposure, compensation must be provided by either “boosting” the sensitivity of the camera sensor (increasing the ISO) or increasing the exposure time or both; and
  2. above certain f-stops (larger f-stop numbers – the particular f-stop number depends on the particular camera’s sensor size and density) diffraction may become an issue by decreasing sharpness to a noticeable extent (a tool to determine at what f-stop diffraction may become a problem for your particular camera and a good tutorial on diffraction can be found at: http://www.cambridgeincolour.com/tutorials/diffraction-photography.htm).

Increasing the ISO may add an unacceptable amount of noise to the exposure and decrease the dynamic range of that exposure, which may be undesirable. Adding more time to the exposure may decrease sharpness by introducing some degree of motion blur, either involving the camera/user and/or camera/mechanical shutter interface itself, particularly with handheld shots, or from the subject motion and/or camera/ mechanical shutter interface when using a tripod. The blur introduced by the camera/mechanical shutter interface is more pronounced in cameras with higher density sensors and mirrors which require the mirror to move up and away from the sensor prior to initiation of the exposure. The net result usually is an increase in noise and compromises in both sharpness and dynamic range.

 

What is focus stacking?

One method of rectifying these issues is to use a larger aperture (lower f-stop number) and focus stack the image. Focus stacking involves taking a bunch of frames with the camera on a tripod and with the same (manual) exposure settings, ISO, and white balance, where each frame is focused at different points in the picture from the furthest to the nearest objects you want to be in focus, and combining them with a specialized software program to insure that each element in the resulting photo is tack sharp. It is important to insure that enough frames are taken so that each element in the picture is in focus. I’ve found it very disheartening to discover, when trying to focus stack, that I didn’t focus on enough points in the frame so that some elements in the photo are not in focus in any of the stacked images, and consequently, the stacked image composite will display those elements as out of focus.

Since the importance of each frame being in register is paramount, using a tripod is almost always mandatory. Although it is possible to focus stack using different apertures rather than different focus distances, using different apertures is much more limited in terms of the ability to focus stack. And although it is also possible to focus stack using Adobe Photoshop and layers, this can be a very complex and potentially very time-consuming method, especially if it involves a large number of focused images. That’s why I choose to use a program dedicated to focus stacking.

Popular focus stacking programs include: Helicon Focus (http://www.heliconsoft.com/heliconsoft-products/helicon-focus/), Zerene Stacker (http://zerenesystems.com/cms/stacker), TuFuse (http://www.tawbaware.com/tufuse.htm), and CombineZM (http://combinezm.en.lo4d.com/). TuFuse and CombineZM are both freeware. Helicon Focus and Zerene Stacker both have free trials. I have been using Helicon Focus for close to 15 years, and over time the program’s algorithms have been refined to yield more precise and visually sharper blended photographic composites; editing the resulting image has also become easier using the retouched tab. I have no idea how to (or how easy it is to) focus stack images using Zerene Stacker, CombineZM, or TuFuse.

The reason that focus stacking without these programs can potentially be so difficult is that each time you change the focus on your lens – even on fixed focal length lenses, you very minutely change the effective focal length of that lens and consequently change the magnification of the frame, which can exponentially increase the difficulty combining these images into a single stacked frame.

 

What are some potential problems when focus stacking?

However, as with everything else in this life, there are no free lunches, and focus stacking in and of itself introduces other issues and compromises. In my experience shooting landscapes, the most frequently recurring problem relates to the movement of elements within each frame to be combined into a single stacked image. In a studio, where all the elements in the photo can be made static, movement of each individual element can be controlled, and may not be problematic when combined to form a focus stacked image, and often no additional corrections are required after running the photo stacking program. When taking landscape photographs I usually use a 20 mm fixed focal length lens (it’s the sharpest lens I have) and set the aperture to F8 (for my camera sensor this is the best compromise between edge-to-edge sharpness and diffraction) and use the lowest ISO consistent with an appropriate shutter speed. However, in landscape photography the wind usually will not allow all the elements in the photograph to remain static throughout each frame of a photo stacked series. Although Helicon Focus has greatly improved its ability to fix motion artifact since I first started using it many years ago, there are still situations where motion artifact presents problems. I’ve found that when the wind is 4 miles an hour or less I will usually end up with an acceptable stacked image after some minor retouching in Helican Focus. When that sort of wind is infrequent and intermittent, taking a large number of incrementally focused images advanced a minuscule amount from the previous image will usually result in a focus stacked image that requires little retouching. If the wind is persistently erratic the editing in the retouching section may be extensive and time-consuming; sometimes I can’t completely fix some artifacts in Helicon Focus, and may need to use the spot healing brush in Adobe Photoshop to remove those aberrant elements. When the wind is 7 miles an hour or more the photo stacking process may require extensive retouching, often consuming great amounts of time, and only rarely resulting in perfect images.

 

Another problem may occur when shooting a set of focus stacked images to be combined into a panorama when there are relatively fast-moving clouds, since it takes some time to shoot one set of focus stacked frames before rotating the camera to the next set of focus stacked frames in the panorama, and the clouds may have moved significantly in the interim. This can be solved by using a panorama index head rotator with selectable detents (for example: https://www.amazon.com/Rd-64h-Panoramic-Panorama-Indexing-Rotator/dp/B013U38DV6/ref=sr_1_1?s=photo&ie=UTF8&qid=1478170766&sr=1-1&keywords=Panorama+indexing+head+rotator) and selecting the detent that enables each image in the panorama to overlap by about 20% on each side. Then instead of shooting each set of photo stacked images before moving to the next, shoot each photo in the panoramic sequence that includes the sky focused on the most distant object only in rapid succession, moving from one detent to the next. This will ensure that the set of panoramic frames in which the clouds are in best focus will have minimum cloud movement between each frame. Then go back to the first detent and shoot the rest of that series of frames to be photo stacked. Move to the next detent and shoot that series of frames, and continue moving to each detent and shooting those frames until you have a complete set of frames to be photo stacked for each frame in the panorama. If you try using this method without a rotator, it is almost impossible to keep each set of images to be photo stacked in proper register with those first images.

How far the nearest and furthest objects are from the camera, the focal length of your lens, and the f-stop will determine how many frames are required to properly focus stack that picture, anywhere from three or four to over 100, with the larger numbers required to include objects that are both very far (hundreds to thousands of feet) and a very close (inches) from the camera. When focus stacking for a panorama it can require a fair amount of time between the first and last shots. For large focus stacked panoramas that involve very far and very close objects I’ve spent as long as 45 minutes completing the focus stacked series of panorama shots. Inevitably, the lighting will change somewhat between the first and last shots. I found that in the morning shooting the brightest areas first (and setting an exposure to be used for the whole series that favors those brightest areas) and in the evening shooting the darkest areas first (again setting an exposure that will favor those darker areas) will tend to minimize the difference in exposure between the two.

Summary:

Focus stacking, while it can be a complicated process, may enable you to produce tack sharp images throughout the entire photograph, keeping noise to a minimum, eliminating blur, and without compromising dynamic range.