It's spring, which means it's wildflower season, and focus-stacking season.
Last week my wife Claudia and I spent an afternoon photographing flowers in the Merced River Canyon, just west of Yosemite. It was a little past the peak of the wildflower season there, but we still found some nice patches of poppies mixed with other flowers.
As I was processing the images later, it occurred to me that all of them required focus stacking. Literally every single one. And this is very common for me when photographing wildflowers. I don't need focus stacking often in other seasons, but in spring I use this technique all the time. It's just difficult to get everything in focus with one frame when photographing wildflowers. I'm frequently picking out a particularly dense patch of flowers, and using a telephoto lens to emphasize patterns and visually compress the space, making the flowers look closer together. Even with careful focusing and f/22 it's impossible to get everything in focus with a long lens raking across a field of flowers like that. But even with wide-angle lenses it's sometimes difficult to get everything in focus with one frame, because I'm getting really close to the foreground flowers, so there's a tremendous amount of depth.
Using high-resolution cameras the last couple of years has only made it more difficult to get everything in focus. A slight fall-off in depth of field that wasn't very noticeable with a 16- or 20-megapixel camera becomes glaringly obvious with a 36- or 42-megapixel camera. And I'm more reluctant to use very small apertures like f/22 because the softness caused by diffraction at these small apertures also becomes more apparent with high-resolution sensors.
One solution to this problem is tilt-shift lenses. With a tilt-shift lens you can change the plane of focus to match the receding plane of a field of flowers, making it easier to get everything in focus. But I've never gone that route, mainly because tilt-shift lenses are quite expensive. They also have their limitations: there are no zoom tilt-shifts, so you can only use certain focal lengths, and they don't help with situations where the near and far objects aren't on the same plane, like tree branches in front of other tree branches. But having said that, they're perfect for wildflowers, because the flowers are usually on the same plane, so maybe one day I'll bite the bullet and get one.
But in the meantime I can use focus stacking. That means making a series of exposures focused at different distances, and then blending those exposures together in software.
I typically use f/16 for focus-stacking sequences, because on all my lenses that's the smallest aperture I can use before getting objectionable diffraction. I could try f/8 or f/11, but then would have to capture more frames to cover the whole range and make sure every flower is in focus in at least one image. More frames would be okay if there was absolutely no wind, but that's rare. I'm usually trying to capture the whole sequence during a lull, when the breezes are minimal, so the fewer frames I need the better. Using f/16 gives me more depth of field, so the focus overlaps more between frames, requiring fewer images and less time.
You need to use manual exposures for focus stacking, as any variation in brightness between exposures will make it harder to blend the frames together later. I also focus manually, through the viewfinder. I start by focusing on the closest flowers, usually at the bottom of the frame (or one of the bottom corners). I'll wait for a lull in the wind, click the shutter (using a remote or cable release of course), focus a little further back, click again, focus further back again, click again, and so on, until the focus reaches the flowers furthest from the camera. I'm not very scientific about this; I don't measure how much further back I have to focus for each frame, or anything like that. I'm just using my experience, and being conservative, making sure there's plenty of overlap between frames. The physical, real-world distances are not important; I'm guided by how far I turn the focusing ring between each frame, not by the focus distance in feet or meters. I captured this short video the other day to show you what this looks like through the viewfinder:
(If you can't see the video click here.)
I shot this video at f/4, my lens's widest aperture, to simulate how this would look through the viewfinder of an SLR. When you look through the viewfinder of an SLR you're seeing the scene with the aperture wide open. Even if you have the aperture set to f/16, the lens diaphragm stays open at f/4, or f/2.8, or whatever the widest aperture is on that lens, until you actually press the shutter. That keeps the viewfinder bright, and in this case the shallower depth of field you see at a wide aperture helps to clearly show where the lens is focused, which makes the whole procedure easier. (However, with a Sony lens on a Sony mirrorless camera, the lens stays stopped down by default, which makes it harder to see exactly where the lens is focused. I believe you can set one of the Custom Keys to override this, but I'm not sure, since I don't own any Sony lenses – I used a Canon 70-200mm f/4 zoom with an adapter for these images and the video).
Once you've captured the sequence, there are many software tools that can blend the frames together. My favorite is Helicon Focus. This software gives me consistently good results, and has a great new feature: the ability to output the blended exposures as a fully-editable DNG Raw file. Once the DNG file is back in Lightroom it behaves like any any other Raw file, with all the power and flexibility that implies, including the ability to adjust the white balance, recover highlights, adjust the capture sharpening and noise reduction settings, choose a camera profile, and so on. Setting up Helicon Focus to output a DNG Raw file is a little convoluted, but Helicon has a video that walks you through the process. (For the rendering step in Helicon Focus, I typically use Method B, with Radius at 8 and Smoothing at 4 - the default settings).
Photoshop can also blend a focus-stacking sequence. In Lightroom, select the images you want to blend, then choose Photo > Edit In > Open as Layers in Photoshop. Photoshop will open the images and stack them as layers into a single document. Then, in the Layers panel, select all the layers (click on the top one, then Shift-click on the bottom layer). Next, go to Edit > Auto-Align Layers. Choose Auto for the Projection Method, then click OK. Once Photoshop has finished aligning the layers, choose Edit > Auto-Blend Layers. For the Blend Method use Stack Images, check Seamless Tone and Colors, and click OK. Photoshop will then automatically add layer masks, revealing the sharpest parts of each frame, to create the blended image. From there, you can continue to modify the image in Photoshop using Adjustment Layers, or save it as a PSD or TIFF and make further adjustments in the Develop Module in Lightroom.
If you already own Photoshop this second method allows you to blend focus-stacking sequences without buying or learning another program, which is great. Or it would be great, if it worked as well. In my experience, Helicon Focus does a better job of selecting the sharpest parts of each frame to blend into the final image. Here's a closeup comparison of part of the image at the top of this post. The left side shows the image blended in Photoshop, the right side shows the output from Helicon Focus (click on the image to see it bigger):
In the Photoshop blend, the top of the most prominent lupine is blurred, because Photoshop didn't choose the sharpest frame for that part of the blended image. Helicon did a better job on that flower (and others).
Since Photoshop uses layers masks, you can paint on the masks to modify the selection and improve the results. But that requires more work, and can get complicated. (Which layer has the sharpest image of that flower? Should I paint with white on that layer's mask, or black on the mask of a higher layer?) And as I said, I like Helicon Focus's new option to output the result as a DNG Raw file, keeping everything editable. There are several other programs also designed to blend a focus-stacking sequence, but I haven't tried them, so I don't know how good they are. Helicon Focus has always worked well for me, so I haven't felt the need to try other applications.
There is one serious caveat about focus stacking: it doesn't work well on windy days. Flower photography is always challenging in the wind, but focus stacking becomes problematic. Even if you use a fast enough shutter speed to freeze the motion, the flowers won't line up between frames because they're waving around in the wind. Any focus-stacking software will have trouble with this, and may leave ghost images, with the same flowers shown two or three times, as you can see here:
But on less windy days focus stacking works really well. Here are the four original images that were blended to make the final composite frame at the top of this post. The first image was focused on the foreground (the bottom of the frame), the second a little further back, the third yet further back, and the fourth on the background (the very upper-left corner of the frame). Each was captured at 1/10th of a second at f/16, 400 ISO. I've included magnified inserts to show the sharpness of the upper-right and lower-right corners, as well as a spot near the center of the frame. (You can click on all these images to view them larger and see the magnified inserts at 1:1 or 100%.)
And here again is the final image after blending the original four frames in Helicon Focus, plus magnified inserts showing that every part of the frame is sharp:
Focus stacking is an advanced technique, and probably not necessary if you only show your images online or make small prints. But if you make large prints, and care about sharpness, focus stacking is a great way to get everything in focus in situations where that would otherwise be impossible. For me, focus stacking is an indispensable tool for wildflower photography.
— Michael Frye
P.S. Although I use focus stacking most often with wildflowers, it works for other things as well. Here are two more focus-stacked images of non-wildflower subjects:
Michael Frye is a professional photographer specializing in landscapes and nature. He is the author or principal photographer of The Photographer’s Guide to Yosemite, Yosemite Meditations, Yosemite Meditations for Women, Yosemite Meditations for Adventurers, and Digital Landscape Photography: In the Footsteps of Ansel Adams and the Great Masters. He has also written three eBooks: Light & Land: Landscapes in the Digital Darkroom, Exposure for Outdoor Photography, and Landscapes in Lightroom: The Essential Step-by-Step Guide. Michael has written numerous magazine articles on the art and technique of photography, and his images have been published in over thirty countries around the world. Michael has lived either in or near Yosemite National Park since 1983, currently residing just outside the park in Mariposa, California. Visit Michael’s blog for more photography tips and tutorials.