Posted by: kerryl29 | June 11, 2018

Focus Stacking: A Primer

I’ve made countless offhand references to focus stacking on this blog without ever actually describing what it is, let alone outlining the technique behind it.  I did describe what was involved in a post I published five years ago during my guest blogging stint at 1001 Scribbles and I’ve adapted that piece here as part of what will probably be a short series on the subject.

*                     *                     *

The Problem

Depth of Field…it can be the bane of the photographer.  It seems as though we’re constantly dealing with more of it than we want or not enough of it.  As a landscape photographer, I much more frequently have to deal with the latter than the former.

For our purposes, depth of field can be defined as representing the part of a scene that is rendered acceptably sharp in a single exposure.  In that sense, it’s inherently subjective; after all, what you may regard as “acceptably sharp” I may not.  So, while establishing a consensus about sharpness is possible most of the time, in the end depth of field is something that we eyeball.

When it comes to landscapes, I frequently find myself unable to obtain sufficient depth of field without stopping the lens down (i.e. reduce the size of the aperture—increase the f-stop number) to levels best avoided.  (Very small apertures can introduce image softening as a result of diffraction; exactly where diffraction becomes perceptible is dependent upon a variety of variables.  For an in-depth discussion of diffraction, go here.)  Sometimes it’s impossible to obtain the desired depth of field regardless of the aperture used.

All things being equal, shorter focal lengths and narrower apertures produce greater depth of field, but sometimes the desired shot requires more depth of field than you can achieve in a single frame.  This is where the focus stacking technique comes into play.

Redwood Sorrel and Ferns Black & White, Coastal Trail, Del Norte Coast Redwoods State Park, California

Three Frames

Focus Stacking:  Personal History

I first started playing around with focus stacking 12 or 13 years ago, using a program called Helicon Focus.  I originally became interested in focus stacking as a way to solve depth of field problems inherent in closeup work.  (The focus stacking technique was pioneered for this purpose.)  But, not long after procuring the software, I started to wonder why I couldn’t adapt the approach to assist me with solving depth of field conundrums that came up constantly in my landscape photography experiences.

When photographing landscapes, I routinely found that I didn’t have enough depth of field (DOF) to realize my vision; I was usually facing the prospect of shooting with wider focal lengths than I wanted to use, simply to acquire enough sharpness.  As a result I found myself facing background clutter, optical distortion, the inclusion of unwanted elements or all of these things.  It was quite dissatisfying.

During a trip to White Sands National Monument in New Mexico many years ago I found myself facing the usual DOF problems when I decided to try a multi-frame technique to achieve the shot I had visualized–an abstract of dunes layers.  The narrowness of the field of view required a telephoto focal length–something on the order of 200 mm, as I recall–but it was entirely impossible to obtain the necessary DOF in a single frame, regardless of how far I stopped the lens down.  Via a bit of trial and error I determined that I could get everything sharp, from front to back in the frame, with five focus-bracketed exposures at f/8, so that’s what I did.  I didn’t have the opportunity to see if the experiment worked until I returned home (more than a week later) and could bring the group of frames into Helicon Focus but when I did, and carefully examined the result, I was thrilled to discover that the processed single image was sharp as a tack.  A subsequent 12 x 18 inch print served as further confirmation.  (This first focus stacked image is below.)

Dunes Geometry, White Sands National Monument, New Mexico

Five Frames

When I saw the final result the gears in my head started to turn.  This approach could open up a world of previously unachievable compositional possibilities.  I’ve been working with this basic mindset–and ever-expanding the use of the focus stacking approach–as I’ve pushed the limits of the software (and as the software itself has objectively improved) in the years since.  I routinely use the technique today.  In my most recent previous blog post–covering the day trip to Cataract Falls–roughly 3/4 of the included images were produced using a focus stacking approach.  Knowing that this approach to DOF problems is in my toolbox has completely changed my thinking in the field.  Images that were once out of the question are now at least open to consideration.

Palmetto Closeup Black & White, Riverbend Park, Palm Beach County, Florida

Five Frames

What Is Focus Stacking?

In general terms, focus stacking refers to the technique of: a) taking two or more shots of the same scene; b) altering the focus point of each shot thereby altering the plane of critical focus to different points of the frame; and c) combining these images in post processing, either manually or via an automated, software-driven process.  Regardless of the specific technique, the key to success is meeting the following criteria:

1) Keep the camera in a fixed position (i.e. use a tripod).

2) Adjust focus in a manner that covers the entire range of the scene that you want to be rendered sharp.  In other words, every bit of the scene that is intended to be sharp must be properly focused in at least one frame.  I generally work from front to back (i.e. beginning with the point of critical sharpness closest to the camera and ending with the point of critical sharpness farthest away from the camera) but there’s no inherent reason why you couldn’t do it the other way around.

3) Be sure that each frame overlaps focus with each adjoining frame.  The furthest point in Frame A that is sharp must at least slightly overlap with the nearest point in Frame B that is sharp.

4) Exposure settings (aperture, shutter speed, ISO and, if not shooting RAW, white balance) should be identical for each frame in the stack.  If this isn’t the case, the final stacked frame will likely have issues with uneven tones (though automated stacking programs typically include exposure blending techniques to account for modest differences between frames).  The only thing that should change from frame to frame is the point of focus.

5) Typically, it’s critical that the subject matter itself not move during the process of producing the exposures, though there are some exceptions (patterned moving water, such as a waterfall or stream is one—waves are not), which I’ll discuss in greater detail below.  Over time, as different algorithms have been added to Helicon Focus, altering the manner by which images are stacked, I’ve found that there can, at times, be some wiggle room to the issue of minor movement–with foliage or flowers, for example–from frame to frame.  (More on this later.)

Manual Focus Stacking

I perform manual focus stacking in Photoshop, but any program with layers and masks is suitable.  I have, on rare occasions, done manual stacking work with three frames, but I typically use this approach with only two shots.  (And the truth is, as Helicon Focus (and my own in-field technique) has improved, I do less and less manual focus stacking to the point where, now, I only implement it as a possible end-run when I encounter issues that Helicon can’t handle.)

For landscape shots, the key to using this approach is to have a scene where the upper and lower parts of a frame are at distinct, discrete distances from the camera.  For example, the image below is a two-frame manual stack.  Note how the elements—trees, rocks, etc.—in the upper half of the frame are significantly more distant from the shooting position than those in the lower part of the frame.

Middle Prong of the Pigeon River, Greenbrier, Great Smoky Mountains National Park, Tennessee

Two Frames

This image was photographed at f/7.1, and at this aperture, I couldn’t get the entire scene sharp in a single frame.  (The camera I was using becomes diffraction limited at apertures smaller than f/7.1.)  So, I found a focal point that made the foreground and mid-ground sharp (the background was soft) and clicked the shutter.  I then refocused so that the mid-ground and background were sharp, and clicked the shutter again.  I converted both RAW images with identical settings, brought the frames into Photoshoop, and stacked the two shots on top of one another (with the mid-ground/background sharp image on the top), and added a layer mask.  I found the spot—very near the middle of the frame vertically—where both images were sharp and, and painted black over the lower half of the mask to reveal the lower half of the image on the bottom of the stack—the one with the sharp foreground and mid-ground.  And it was that simple—I now had a single sharp frame, from front to back.

Below is another image that I did a two-frame stack of.  In this case, it was very easy to visualize how to pull it off; the only sharp areas were the extreme foreground (the rocks) and the far background (the trees).  Everything in between was naturally soft (the blurred water).  After establishing the exposure criteria I simply focused on the rocks and clicked the shutter, then focused on the trees and clicked the shutter.  The process of assembling the image was essentially the same as with the creek shot above, with the mask line established somewhere in the water.  It didn’t really matter where.

Anderson Falls Nature Preserve, Bartholomew County, Indiana

Two Frames

Note that with both of these images, subject movement between shots wasn’t an issue.  The water movement itself was so tightly patterned and naturally blurred that it’s impossible to detect the masking line between frames.  But beyond that, any foliage movement between frames wouldn’t be detectable since all of the foliage lies in either Frame A or Frame B; there’s no need to line things up since these frames are distinct elements of the final product.  This is not the case with the automated focus stacking approach discussed below.

One reason why I use manual focus stacking so rarely these days is that there can be element alignment problems, even without subject movement from frame to frame.  Changing the plane of focus will literally change the magnification of the elements in the scene, thereby producing offset “ghosting” effects that are particularly evident with distinct lines and shapes.  When it comes to things like moving water in the creek and waterfall of the above images, this effect is undetectable.  But with most other elements, it’s plainly obvious and creates all kind of issues.  These problems can, usually, be cleaned up in post-processing, but it often involves a lot of painstaking work.

Trillium Ravine Preserve, Berrien County, Michigan

Four Frames

The image above is an example of the kind of scene that would be virtually impossible to render acceptably using a simple manual mask/blend approach as the “seam line” between each blended frame would cause alignment issues with every distinct shape that fell along the areas of overlapping areas of focus.  This kind of scene is littered with countless distinct lines and shapes.  Software designed specifically for the purpose of stacking focus-bracketed images adjusts for this magnification problem.

Software-Based Stacking

A more commonly applied approach—both for close-up photography, where depth of field is often extremely limited (sometimes measured in millimeters) and for landscapes and still life shots—is a more automated, software-based stacking process.  There are a number of different packages that you can use, including Helicon Focus and Zerene Stacker.  (As noted throughout this piece, I use Helicon Focus myself, but I’ve heard very good things about Zerene.  Photoshop now includes a focus stacking feature, but I’ve never used it.  The addition of this capability to PS was years away when I started playing around with the technique.)   I almost always use this approach when the number of shots needed to create the final image is greater than two.  And, in fact, I now typically use this approach even with a mere two-image stack.

Fallen Leaves, Eagle Creek Park, Indiana

Eight Frames

In this instance, within the software package of your choice, you select the frames that you want to be part of the stack and then let the software do its thing. You typically do have some options for setting parameters—I advise messing around with the various options (which may include specific processing algorithms, radius settings and thresholds) to see how they impact the final result. Over the years that I’ve been using Helicon Focus I have changed the default settings to obtain what I consider to be better results.)

Crop Rows, Hancock County, Indiana

Ten Frames

I have, at times, combined more than 30 images in a single stack, with extremely magnified close-up images. A more common number, particularly with landscape images, is five to eight though, as noted earlier, I’ve used as few as two images.

7-Frame Close-Up Stack

Seven Frames

Note that with this approach, it’s absolutely critical that the subjects don’t move. Even slight image movement will often result in “ghosting”—a kind of multiple outline artifacting that will show up around subject edges. Over the years, stacking software has gotten better and better at eliminating this ghosting (which, to a degree, inevitably results because changing focus points in the field literally changes the size of the subject as recorded by the camera’s sensor), but movement ghosting of any significance is very hard to eliminate. This problem can often be cleaned up manually in postprocessing, but it can be a tedious exercise indeed if it exists in any quantity.

Pink Canyon, Valley of Fire State Park, Nevada

Nine Frames

As I mentioned above, I’ve found that one of the specific blending options available in Helicon Focus (there are three) can, with some scenes, render a certain amount of subject movement between frames moot.  Each frame needs to freeze movement independently, but modest element movement between frames can be overcome.  The less plane of focus “intersection” there is throughout the frame, the more likely this approach is to work.  (In the interest of relative brevity I won’t go into the details here but if there’s enough interest I’ll put together a future post on this subject.)

Autumn Overlook, Dark Canyon Loop Trail, Kebler Pass, Gunnison National Forest, Colorado

Two Frames

The Payoff

The best part of focus stacking is recognizing that it exists, because realizing that this approach is available can open up an entirely new way of thinking about imagery.  Images that are optically impossible to render in a single frame can be realized using this technique and recognizing the expansion in opportunities can bring a breath of fresh air to your photographic creativity.  Additionally, it’s possible to combine focus stacking with other creativity-inspiring techniques, such as HDR.

Cataract Covered Bridge, Cataract Falls State Recreation Area, Indiana

Two Image Stack/5-Exposure HDR Combination



  1. Very Nice! I use this and other techniques all the time and it nice to see others wide range of examples. These techniques come in very handy when you are traveling light with only one or two lenses. Or when you are trying for a certain “look or feel”.

    • Thanks! It’s great to hear that others are using this approach.

      • I know that Reed uses Photoshop and the results are amazing, but for a novice would Helicon Focus be more user friendly?

        • I’m not sure; I can’t make a direct comparison because I’m not using the current version of Photoshop (I’m still using CS6, the last edition of the perpetual license version of the program), but I can say that Helicon Focus is very easy to implement for basic usage. It is, in my view, worth fiddling around with the settings (especially the stacking method–I use Option B for landscape work), but the interface is very easy to work with.

      • The Helicon FB Tube would automate the process of focus braketing. Rather than manually shifting your focus the extension tube automatically shifts the focus and captures the stacked images which can then be processed with the software. It might be a useful tool.

        • Thanks for pointing this product out–I had never heard of it before (and I’m a Helicon customer–they never notified me of its existence and it appears to have been available for well over a year now. I haven’t found much in the way of objective reviews of it and I can’t tell if (or how well) it would work for landscape focus stacking; it’s positioned for macro use. I’ll keep looking.

          Again, thanks very much for bringing this to my attention.

  2. Very informative. Thank you so much!

    • Thanks very much!

  3. Thanks for this enlightening post and detailed examples. Put me on the list for wanting to read and learn more. A question…I see how it would be relatively easy to shoot 2 frames with one focusing near and one far, but when you are shooting a series of 6-8 of a landscape scene, are you visually selecting the focus points or are you turning the focus ring after each shot without knowing exactly where the focus point lies and relying on experience to end up with the desired result?

    • Good question. I probably should have detailed this part of the process in the post. Unless you’re working with subjects that will not move–studio flowers, for instance–it’s imperative to work as quickly as possible when obtaining the frames for the stack. There really isn’t time to carefully select the focus points. If I’m using a focal length/aperture combination that I’ve worked with a lot, I use experience. I’ve made mental notes so that I can simply adjust the focus ring on the lens by using the distance scale. If I’m using a combination that I haven’t worked with very much, I’ll make a best guess test run and carefully check for focus overlap using 100% magnification on the LCD screen, and rinse and repeat as necessary.

      There are several cameras on the market that have a feature that allows for the semi-automating of the entire process. Assuming a focus-compatible lens, you set up the shot and tell the camera how many exposures to use and it will carry out the sequence with one click of the shutter (i.e. it will re-focus the lens to optimize the focal planes, given the information provided). The Nikon D850 does this and I believe the Sony a7rIII does as well. (I have no personal experience with this, I’ve just read about it.)

      • Thanks for responding to my question. I figured that the necessity of shooting quickly impacts how the process is carried out. Oh boy…yet another technique to practice!

        • I can demonstrate what’s involved, at a mutually convenient time. Just remind me. 🙂

  4. My recent efforts to understand landscape painting have introduced me to many interesting concepts. An old one, possibly relevant here, is the softening of edges with distance. The idea is to mimic on canvas our way of seeing in the real world, giving the painted scene the illusion of “depth”. Objects in the foreground and the middle ground are fairly well defined; those in the background become increasingly less distinct, brighter in tone, and less saturated in color. The technique also allows the painter to subtly emphasize the motif of the painting to the viewer.

    I mention this only to suggest that a shallower depth of field in a landscape photo may sometimes be an asset rather than a curse. Soft out of focus elements within the frame often provide vital accompaniment to the grand symphony.

    • I’ve been thinking about this point since I first heard (or read) about it years ago and I’ve concluded–your mileage may vary, of course–that it’s not as simple as it might otherwise appear, at least as it pertains to photography and the way I want to be able to display it.

      The key for me is the (perhaps subtle) distinction between: 1) blur due to less than ideal focus on the one hand; and 2) a reduced rate of detail with increased distance. The latter is what the naked eye naturally sees and what I want my landscape photography to represent, the vast, vast majority of the time. And, crucially, it’s what I receive in the way of output when I maximize DOF for all parts of a scene. Whether it’s due to the physical properties of optics or environmental factors or a combination of both, if I examine an image optimally focused for all distances present in a scene, detail is greater the closer it is to the camera/lens. Distant objects are in-focus, but less-detailed. But, if I optimize focus for the near (and mid-) ground and let the background fall where it may, the lack of distant detail is modified by the sense that I’m looking at something out of focus, not merely less detailed. And, the larger the print, the more emphatic this impression is. (This has also become a more emphatic phenomenon as higher-resolution sensors have made it possible to…well, resolve…more detail. But that’s a different, though related, story.)

      The background blur phenomenon has nagged at me for years, and is one of the principal reasons why I started messing around with focus stacking for the landscape in the first place; I just don’t like the visual effect of background softness in these instances. Again, YMMV.


    • Thanks very much!

  6. […] good enough.  All of the fern forest images you see above (and immediately below) required a focus stacking approach, ranging from three to six frames to establish front to back sharpness.  Fortunately, […]

  7. […] the craft.  It’s not that there haven’t been craft-related posts–there certainly have.  But I haven’t spent a great deal of time discussing technique.  That’s not to imply […]

  8. […] This approach almost always requires use of a focus stacking process; I almost literally never have enough depth of field when I use this technique to render the entire frame sharp with one exposure.  I posted an entry devoted to the focus stacking approach a year ago and you can check it out here. […]

  9. […] wasn’t a breath of wind–a much appreciated factor since I knew that I’d have to focus stack to complete the shot.  With access to the pull-out and the lack of wind, executing the final image […]

  10. […] manner made it impossible to get everything in sharp focus.  This was remedied by implementing a focus stack.  The second problem?  Though this was a virtually windless day, a breeze was being created by […]

  11. […] matters worse, the focal length necessary for these images was sufficiently long to necessitate a focus stacking approach to ensure sharpness throughout the frame…and that meant needing even longer spells […]

  12. […] of focus stacking on this blog several times in the past.  (For a primer on the subject, go here.)  I’ve been using this technique, designed to overcome natural depth of field […]

  13. […] who has read this blog for any length of time knows that I use both focus stacking and HDR. And if you’ve been reading this blog for a while, you also know that I’ve been […]

  14. […] The morning was cloudy, so there was no consideration of a sunrise shoot, but we got up and out not long after daybreak. It was relentlessly cloudy and chilly (the temperature was in the low 40s (F)) and it was fairly windy to boot–not exactly ideal photo weather. But we persevered. Our first stop was at Linda Creek, a spot less than 10 miles north of Wiseman on the Dalton Highway that we hadn’t visited in 2018. Accessing the creek required climbing down an embankment, so we ditched the car in a pullout located a few hundred feet up the road and made our way to the entry point. My first shot wasn’t of the creek itself, but of a small alcove north of the creek that was a riot of color that I couldn’t help but notice. We descended to creek level on the south side of the stream and I donned my foot coverings and splashed through the shallows to get to the north side to produce the below image. Making the image required patience given the wind and the need to execute a three-frame stack. […]

  15. […] I’m doing—whether it’s related to specific in-field techniques (e.g. focus stacking, high dynamic range capture, etc.), or what lens I choose to use, or where I choose to position the […]

  16. […] my camera to check and, sure enough, I deemed that–with an appropriate three- or four-image focus stack, I could make it […]

Please feel free to comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


%d bloggers like this: