top of page

ARTICLES

All photographers have problems achieving sufficient depth of field and superb image sharpness imultaneously because it is a trade-off.  The sharpest aperture on the lens is typically two to three stops down from the maximum aperture on the lens.  With a 200mm f/4 lens, for example, the sharpest apertures are around f/8 to f/11.  Due to the laws of physics, though, the greatest depth of field is always at the smallest aperture (largest f/stop number) which is usually f/22 or f/32.  In simple terms, these f/stops refer to the tiny hole in the lens that is called the aperture.  Due to the wave nature of light, as the hole it passes through decreases in diameter, a larger percentage of the light touches the edge of the hole and bends.  This bending is known as diffraction and causes a loss of sharpness everywhere in the image.  It is a huge problem!

When I tested the diffraction on my Canon 180mm macro lens for a new book—Close Up Photography in Nature.  I was horrified by how bad it is at f/32—even f/22 produced underwhelming results.  Although, in theory, the depth of field is greater at f/32, the overall image sharpness is far less than f/11 due to diffraction.  Although photographer opinions vary, I feel that f/32 and even f/22 is worthless on this lens and probably most other lenses as well.

Stopping the lens down to the smaller apertures – f/16 to f/32 - creates many problems that are easily avoided by using more intermediate apertures such as f/8 or f/11.  Here’s a list:

  1. As already explained, stopping down the lens causes a loss of sharpness everywhere in the image due to diffraction.

  2. Shooting with f/32 requires a shutter speed three stops slower than f/11.  This slower shutter speed becomes a problem when photographing handheld or fighting a persistent breeze blowing the subject.  Often using a faster shutter speed produces sharper images.

  3. Smaller apertures not only increase the depth of field covering the subject, but they bring details in the background more in focus.  This often causes unsightly background distractions.  Focus stacking is not just about getting the most overall sharpness, it also is incredibly helpful for selective focus.  If you want a single flower blossom perfectly sharp, and everything else nicely out of focus, focus stacking is the best way to do it.  Shoot the lens wide open, perhaps f/4, and stack you way through the blossom.  The flower will be perfectly sharp and the background and foreground will look like it would at the chosen aperture.

  4. Don’t forget about flash.  Stopping the lens down makes it difficult for the flash to light distant or large objects.  This probably isn’t a problem in close-up photography, but it is a frequent problem in landscape photography.  I commonly use flash for landscapes, shoot at f/5.6 to allow my flash or flashes to light the foreground, and then stack my way through the scene.  Of course, make sure the flashes have time to fully replenish their energy before shooting each successive image to obtain even lighting between images in the stack.

Tilt/Shift Lenses

Normally, you must use superb technique and align the most important plane of the subject with the plane of the camera’s sensor to achieve the greatest overall sharpness.  However, this is not always the case.  Canon and Nikon offer several lenses that bend or shift.  Lenses that bend are called tilt lenses and they do amazing things.  When the lens is tilted exactly the right amount, and in the proper direction, it is possible if the angle isn’t too extreme to make the plane of focus align perfectly with the plane of the subject without having both of them parallel to each other.  For example, it is easy to make a tilt lens sharply focus a field of tulips or wildflowers.  Tilt lenses work well and I have used them for decades with wonderful results.

However, tilt and shift lenses aren’t for everyone.  They are expensive and there is a learning curve to successfully using them.  The written instructions that come with them are difficult to comprehend, though I find it is easy to show workshop clients how to use these lenses.  However, problems include limited focal-length choices and they only help improve sharpness in one plane.  If you align the plane of focus with the flowers in a field, it is easier to get all the blossoms sharply focused, but their stems become more out of focus because they are in a plane that is almost at right angles to the plane of the blossoms.

I own two tilt/shift lenses – Canon 90mm and 45mm – but I seldom use them anymore because focus stacking works far better for making truly sharp landscape images.  Remember, tilt lenses only help in one plane, while focus stacking covers all planes at once.

Focus Stacking to the Rescue

Focus stacking enables you to achieve unlimited depths of field in all planes with the sharpest apertures on your lens.  To keep things simple for now, focus stacking requires you to shoot a series of images where the focus slightly overlaps from one image to the next.  This stack of images, where a small slice of the subject is sharply focused in at least one of the images, is combined with focus stacking software.  This software aligns the images and selects the sharp portions in each image and merges them into a single image where everything is pleasingly sharp.  If an area in the image is not sharply focused in any of the images, then it remains out of focus in the final image.

This technique is starting to become more widely known and the software for processing stacks of images continues to improve as photographers gain experience with it and offer feedback to the software gurus who create it.  Focus stacking offers many advantages and it is the most powerful new tool to come along in my forty-year photography career.  Finally, we have terrific control over depth of field while using the sharpest apertures on the lens!

Advantages of Focus Stacking

  1. Easy to do

  2. Relatively inexpensive – you just need software like Helicon Focus or Zerene Stacker

  3. Offers unlimited depths of field

  4. Works with any lens than can be manually focused

  5. Sharply focuses all planes

  6. Allows keeping the background completely out of focus while the subject is entirely in focus (selective focus)

  7. Allows faster shutter speeds

  8. Helps the flash light objects at distances

  9. Produces images that are unique

  10. It is incredibly fun to do (You will love watching the software assemble the result.)

And some (minor) disadvantages:

  1. The subject must be still

  2. Works best on a solid tripod

  3. It takes more time to shoot the stack of images

  4. The images must be combined with software

  5. Higher magnifications (1x and greater) are most easily done on a focusing rail that you need to purchase and carry with you

Software Choices

Several programs do focus stacking and these include Photoshop, CombineZM, Zerene Stacker ( www.zerensystems.com ), and Helicon Focus ( www.heliconsoft.com ).

The Focus Stacking Process

Select the Subject

A completely still subject is best for this technique.  Subjects that wiggle in the breeze or move on their own—creeping caterpillars or branches wavering in the breeze—don’t work.  Flowers, mushrooms, frost, lichens, frogs, or naturally chilled insects on cool mornings all make excellent prospects.  Often, I use a Plamp (sold by www.tripodhead.com ) to hold the subject as still as possible in case the air is moving the least little bit.  The Plamp is attached to a light stand and the other end is attached to the object that is supporting the subject.  Sometimes a little movement in the subject isn’t a problem.  While photographing a jumping spider on a rock outdoors on a cool morning, the spider raised a couple of its front legs.  It wasn’t a problem because 25 images had already been shot.  The focus was on the spider’s rear legs when it raised its front “paws.”  The focus stacking software selects the sharp areas in each image.  Since the legs that moved during the series of exposures were completely out of focus, the software ignored it and no movement was visible in the final result.

While focus stacking works great for close-up and macro images, it also works for anything else that holds still.  If you have a motionless animal—even an elephant or a flock of shorebirds resting on the beach—focus stacking works.  Landscapes lend themselves to this wonderful technique, too.  Imagine shooting in a slot canyon where there is a near foreground and more distant background.  Now you can focus stack your way all of the way through the depth that needs to be captured.  You could even shoot HDR and focus stacking sets at the same time or focus stacking and panoramas.  The possibilities are endless.  I sometimes shoot combination pans, HDR, and focus stacking all at once!

Focus stacking is incredibly useful in low-light photography.  Rather than trying to shoot a sharp image of Delicate Arch with a near foreground in Arches National Park at dusk when the light is dim with a single exposure using f/22 at eight seconds, it is easier to shoot a focus stacked set of images using the sharpest aperture on the lens—f/8 for instance.  This means the exposure time is a more reasonable and a less noisy 1 second at f/8, rather than 8 seconds at f/22.

Focus stacking solves depth of field problems in the landscape that cannot be solved by stopping down or using the tilt mechanism found on some perspective control lenses.  I remember trying to photograph the reflection of Yosemite’s El Capitan in a Yosemite Valley meadow decades ago.  If I focused on the reflection, the flowers surrounding the pool of water were severely out of focus.  If I focused on the flowers, the reflection was completely out of focus.  I never did get them both as sharp as I wanted because the flowers and El Capitan are so far apart in distance that depth of field can’t cover it.  Now, with focus stacking, it is easy.  Focus on the flowers, select f/8, meter, and shoot.  Then focus a little bit further away, perhaps on the far side of the pool, and shoot another image.  Then focus on the reflection in the pool and shoot another image.  Run the focus stack of images through the software program to get both the flowers around the pool and the reflection perfectly sharp.  It is like magic!

For years I wanted to shoot patterns of lily pads when they are surrounded by fall color reflections.  If I focus on the lily pads and stop down to get all of them sharply focused (and they still aren’t perfectly in focus), the colorful reflections also show more detail and become distracting.  My goal is to sharply focus the lily pads, but keep the reflections out of focus swirls of color.  If I shoot wide open, I get the swirls of color, but only some of the lily pads are sharply focused because the depth of field is too little.  I have done some shots like I envisioned by using a Canon 90mm tilt and shift lens.  By tilting the lens to make the plane of focus coincide with the plane of the lily pads and shooting wide open, I get the desired effect.  Unfortunately, most of the lily pads require a longer focal length lens to optically reach them.  With focus stacking, you can use any lens—even a 300mm or 500mm—and shoot wide open.  Focus on the nearest spot that you want in focus and shoot.  Then focus a little bit further out and shoot another image.   Keep this up until the farthest thing that you want in sharp focus in the background is in focus.  Process the stack and all the lily pads are in focus and the color reflections remain unfocused swirls of color!  In practice, though, I have had a problem getting the pads completely sharp.  Why?  Even on the calmest pond, it seems there are small currents and the pads don’t stay completely still.  If I shoot enough stacks, then I sometimes get a good one where all the pads held still while shooting the stack.

Exposure

Use Manual exposure when shooting multiple images that will be combined into one.  Don’t allow the exposure to change at all within the stack of images.  This means the ambient light or light from a flash must also stay the same.  Set ISO 100 or 200 to minimize noise.  What about the aperture or f/stop?  Set the aperture somewhere between f/8 and f/11.  This is counterintuitive.  Since the goal is to extend the depth of field, why not use f/22 or f/32?  A good question—with a crucial answer!  There is no point in stopping down to small apertures to gain depth of field that will be covered in the stack of images anyway and suffer the image softening effects of diffraction.  The sharpest apertures on your lens are probably around f/8 to f/11 and these “crisp” apertures offer the dual advantages of delivering excellent sharpness while enabling the use of faster shutter speeds.  Finally, adjust the shutter speed until the optimum exposure has been achieved as shown by the histogram and highlight alert.  I primarily use the highlight alert to determine my exposure.  I keep adding light until I see the first blinking highlights on my camera’s LCD, and call that good.  I shoot RAW only and know the first blinking highlights to appear do not mean that area is overexposed, but it is getting close to overexposure, so I stop there.  With a JPEG, add light until you get “blinkies” and then subtract 1/3 stop of light to take them away.

Focus

Use manual focus.  Autofocus modes are too difficult to do (usually) when small focus changes are needed.  Decide where you want the sharp focus to begin.  For example, suppose a jumping spider is quietly perched on a stone.  Do you want all of the stone in the foreground to be sharp or only the stone slightly in front of the spider?  It is your choice.  You don’t have to make everything sharp in the image—only those portions where you want sharp focus.  When you have determined the starting point for sharp focus, shoot the image using excellent technique—tripod, remote release, and mirror lockup, or better yet – live view.  Focus the lens a tiny bit deeper into the scene and shoot another image.  Remember, the increment changes don’t have to be exactly the same and you do want some overlapping sharp areas between consecutive images.  I manually adjust the focus only enough until I see it change and shoot another image.  I need to emphasize what I just said.  I MANUALLY ADJUST THE FOCUS IN THE TINIEST INCREMENT I CAN SET!  Beginners always change the focus too much between images in the stack.  Keep shooting and focusing deeper into the scene until the furthest spot in the image where sharp focus is desired is captured.  Some subjects with limited depth only require a few images and some demand fifty or more.  I commonly shoot stacks of 30 to 40 images when I photograph a small jumping spider or a blossom.  Larger objects need fewer images to cover the depth.  Keep in mind the greater the magnification, the shallower the depth of field at any aperture and the larger your image stacks must be to cover the portion of the image where sharp focus is wanted.  There is no formula for determining how many images you need in the stack.  And don’t believe the advice I sometimes see about stacking with wide-angle lenses.  Many think you don’t need many images in a wide-angle stack.  That is true if the nearest spot that must be in sharp focus is close to infinity focus, but if the foreground is close – think one foot from the lens – then often several images are needed to cover the depth of field.

Focusing Strategies

I use three methods to change the focus.  Let’s make a list and describe each.

  1. With all my lenses, whether a 180mm macro or a 300mm telephoto, I shoot on a tripod and manually focus on the closest point that I want in focus.  I determine the exposure, then photograph my hand to mark the beginning of the stack, and shoot the first image.  Then without looking to see where the lens focuses, I manually move the focus on the lens to focus on a plane slightly further away and shoot that one.  My increment change is the smallest one I can manually set, so I don’t turn the focus ring very much.  The key is small increments!  You can’t shoot too many images, but you can shoot too few if you make the increment jumps too large.  I keep doing this until I finally get to infinity or cover the subject if I don’t want infinity focus.  There is no formula for how many images it takes as there are far too many variables.  Don’t make this harder than it is and you will find covering the depth is quite easy if you make manual tiny focus adjustments.  Start on the foreground and work your way to the background or the reverse works too.  Don’t jump back and forth though to avoid confusing the software.

  2. In macro photography at magnifications of 1x or greater, stacking works much easier if the camera is mounted on a focusing rail.  A focusing rail is an easier way to accomplish the focus changes.  The camera is mounted on the rail.  Turning a knob moves the camera back and forth in as tiny an increment as needed.  The focusing rail is by far the best way to work when you approach and exceed life-size (1x or 1:1) magnification.  Indeed, with my favorite lens for high-magnification images—the Canon 65mm macro—the focus rail must be used because this lens has no focus ring.  Instead, the ring changes the magnification to cover the range of 1x to 5x.  I use a focus rail made by Kirk Enterprises.

  3. There are a few times when photographing a landscape where autofocus works just fine.  You might have a foreground and a distant background with nothing in between where sharp focus is necessary.  For example, a tree silhouetted against the sky or an arch in the Alabama Hills with the Sierras in the background has no middle ground that must be in focus.  In this case I use back-button focus with autofocus and focus on either the background or foreground.  I shoot the first image, then change the AF point to coincide with the other area of the scene that I want sharply focuses, press the back-button in to make the lens focus on the new spot, and shoot that image.  For some scenes where there is no middle ground to sharply focus, this works quite well.  Some cameras allow you to change the focus using the camera’s LCD, so this can be effective.

Throughout this process, be careful to avoid bumping the tripod supporting the camera because it may cause a change in composition and then your images won’t align well—although most focus stacking software programs can align images if they aren’t too far out of alignment. 

Lens Choices

                       

Focus stacking works with any lens for landscapes as well as close-ups.  You could take a 70mm lens and focus on an arch in California’s Alabama Hills and then focus on the Sierra Nevada Mountains far behind it and merge the two together.  In close-up photography, any macro lens works nicely.  To shoot really high magnifications, use a shorter macro lens with extension tubes to reach magnifications greater than life-size.  Some of you may be surprised who have read my books and articles that I don’t automatically go to long focal-length macro lenses.  Short macros work nicely at high-magnification.  The wide angle of view of a 50mm macro isn’t that big of a problem because the depth of field at f/8.0 or any aperture is so tiny at life-size and greater that no object distractions appear in the background because everything is completely diffused from being so far out of focus.  However, bright spots from the sky can still be a problem, so pick a background that is entirely a single color and brightness.

Processing the Stack of Images

Helicon Focus

Using Canon’s DPP4 raw image processing software, I download the images from my CF card to a 3TB external hard drive.  I typically shoot many stacks of images and mark the beginning and ending of the stack by photographing my hand.  Using DPP4, I put each stack of images in its own folder.  For example, I recently photographed the tulip fields at the Wooden Shoe Tulip Farm in Woodburn, Oregon.  Under the Tulips folder, I have many subfolders labeled FS01, FS02, FS03, and so on.  I use the letters FS to denote this folder contains a set of images that are focused stacked.  The unique numbers merely separate the different sets of stacked images.  Then I open Helicon Focus 6.71.  When the window opens, at the top left of the screen, I click File and then Open Images.  This lets you find the images wherever you put them on your computer or the external hard drive, or they could be on a jump drive if you wish.  Click on an image in the stack and press Control-A to select all the images.  Click on OPEN and the software opens them.  Now Click on Render and the software does the rest.  At the end of the process, you have the option of saving the results in various ways.  Once you do this process a few times, it is simple to run many image stacks.

Under the Parameters button, there are three methods one can use to process the stack.  These methods include:

  • A    w.average

  • B    depth map

  • C    pyramid

Some methods work best with certain images.  For example, jumping spiders have lots of detail and method C works best.  I usually run every stack through method B and C.  So far, method B or C have always been the top choice, so I don’t run method A anymore.  Some of the processing controls can be adjusted, too.

Summary

Focus stacking provides the opportunity to obtain far more depth of field and overall sharper images than previously possible.  It is simply amazing to have enormous control over the depth of field.  Although photographers tend to use focus stacking to get everything sharp, it also works the other way.  Now you can using focus stacking to photograph a flower with lots of depth and get everything sharp.  But, if you stop shooting the stack at the back edge of the flower, it is easy to keep the background completely out of focus.  Indeed, by using f/5.6 to stack your way through the blossom, the background is far more out of focus than it would be if the flower is shot with a single exposure at f/11.  Although most use focus stacking in close-up photography, it is incredibly useful in all types of photography anytime it is possible to shoot multiple images of a still object.  I use focus stacking for landscapes frequently and it is possible to use it in wildlife photography when the animal is motionless.  I use it with tilt-shift lenses too.  Let’s return to our field of tulips example.  Tilt the lens to make the plane of focus coincide with the plane of the flower blossoms.  The stems go more out of focus because the horizontal plane of focus is closer to right angles with the vertical plane of the stems.  Now focus stack your way through the stems to get them fully sharp up and down and merge all of the images together for the ultimate in sharpness.

As times passes, I continue to find new uses for this technique.  Focus stacking is the most useful technique that has become available during my forty-year photography career.  Don’t be left out!  Go to the Zerene Stacker ( www.zerenesystems.com ) and Helicon Focus ( www.heliconsoft.com ) web sites, view the tutorials, and download the free trial software.  Search the web for focus stacking articles, tutorials, and picture examples.  Get started now, have fun, and shoot fabulous images!     

Focus Stacking

By John Gerlach

My most recent images are posted on Facebook and Flickr 

  • Facebook Social Icon
  • Flickr Social Icon
bottom of page