Macro focus stacking is a photography technique that allows you to take multiple photos of the same subject, each with a different focal point. When you stack these photos together, the end result is a photo with much greater clarity and sharpness than you could get from any one individual photo.
Modern DSLRs don’t shut down the lens aperture until the moment you take the photo. But you don’t see the effect a lower aperture has on depth of field while composing a shot.
To preview the effect, use your camera’s depth-of-field preview button if it has one. More of the scene is in focus at smaller apertures. Particularly if you switch your camera to live view without exposure simulation.
If your camera lacks a depth of field preview button, take a test shot.
The same adjustments will change the depth of field in macro photography as well. But it won’t be by the amount you might expect.
You might have enough depth of field for a normal subject such as a person several meters away. But this will go down as you move the camera closer to the subject.
This presents a particular difficulty in macro photography. Obtaining a large image of a small object on your sensor means getting the camera very close to the subject.
You can use a small aperture to maximize the depth of field. But closing it down to the min. will introduce diffraction. And it’ll soften the resulting image.
It’s quite common for the resulting macro depth of field to be only a few millimeters. Even when using a small aperture.
For the sharpest results, set your lens aperture to around the middle of its range. This is the sweet spot.
You’ll avoid diffraction softness. And a very shallow depth of field when shooting at the max aperture.
Even with the optimal aperture, the depth of field can still be small. Canon’s MP-E 65mm macro lens is capable of x1 to x5 magnifications. But it has a depth of field at full magnification of 40 microns.
There’s only so far you can go with camera and lens adjustments. Instead, you need a more sophisticated approach – and that is what image stacking provides.
To bypass the DoF limitations, take several photos of the same subject. Alter the focus of each exposure to capture a succession of sharply focused ‘slices’.
These will range from the nearest to the farthest point on your chosen subject.
Once you have a series of images, you can combine the focused areas from each photo. This ‘stack’ will produce a single sharp image where the whole subject is in sharp focus from front to back.
That’s the theory. In practice, there’s more involved than blending a series of images.
Take, for example, this macro photo of a printed circuit board. It may have been easier to take this photo square onto the board.
This would mean most of the components would be a similar distance from the camera and in focus at the same time. But you can get a more interesting result by shooting at a low angle close to one edge of the board.
The problem is that even at f/16, the depth of field is too shallow.
In this example, blending is a two-stage process. We first have to deal with the variation in image size and position. After that we can select the areas of max sharpness from each image.
You can either blend the images in Photoshop or using dedicated software.
Let’s look at how to do this in Photoshop and then examine a dedicated focus stacking application.
If you’re working in Lightroom, select all the images you want to stack from the library view. Right-click one and then select ‘Edit In’ | ‘Open as Layers in Photoshop’.
Don’t confuse the photography term ‘stacking’ in Lightroom with what we’re trying to do here.
Lightroom’s term refers only to the way it groups photos in the library view and has nothing to do with layers.
You should see your photos arranged in the layers palette ready for processing. You might have already opted to align the layers during import.
You’ll see that Photoshop has reduced the sizes of some of the layers. These now have transparent borders. This size change facilitates alignment.
What if you’ve imported your images from Lightroom? You’ll need to instruct Photoshop to align them now.
To do this, click the bottom layer and then shift-click the top layer to select them all.
Then from the top menu, select Edit | Auto-Align Layers… Select the ‘Auto’ option and hit ‘OK’.
Photoshop now needs to analyze the high spatial frequencies in each of the images. And it needs to mask out the low-frequency spatial frequencies.
This is a lot simpler than it sounds. Select all the layers, and from the main menu, select Edit | Auto-Blend Layers…
If you don’t have Photoshop, there are other options. These not only align and blend focus stacked images but will also automate much of the process.
The best known of these is Helicon Focus. It’s actually two software apps – Helicon Focus and Helicon Remote.
Helicon Remote controls the camera via a cable. This is to step focus the lens, take the photo and transfer each focused slice to the computer.
Helicon Focus stacks a series of images. It makes all the adjustments needed to produce the composite result.
Here’s a quick outline of the process. Set your camera to manual mode (so the software can control it) and connect it to your computer.
Helicon Remote should recognize it and switch the camera to Live View. This way you can see the subject on the computer screen.
Focus stacking is particularly useful in macro photography. But it’s also a great tool for achieving sharp images with any lens.
Don’t limit yourself to macro lenses – try it with both wide-angle and telephoto lenses.
Try using the technique in landscapes, or product photography. Any situation where you can sweep the focus in a series of images is good to practise.