Focus stacking in Photoshop – How to get any depth of field you need
Left: Single exposure (focus on the front-most droplet)
Right: Focus-stacked and post-processed (entire subject in focus)
In the video tutorial below, Photoshop Principal Product Manager Bryan O’Neil Hughes shows you how to apply focus stacking to a series of images that was shot at a very shallow depth of field. The resulting image has a much larger depth of field than any of the source photos.
Focus stacking is probably one of the unknown gems in Photoshop. At first glance, it really seems like this is a highly specific tool that you probably never need, right? Well, not so fast. What this tool allows you to do is to take a series of photos with a shallow depth of field and varying focus (different elements are in focus in each of the images) and combine them seamlessly into a single image where everything is in focus.
Why is this useful? Well, there are at least two cases where this comes in handy.
Use in macro photography
Especially if you are shooting with a long lens at a low f-stop and/or at a small distance to your subject this technique can really help you. If you are doing macros and close-up shots, the depth of field may not be sufficient to depict your entire subject in focus, even if you set your f-stop to the highest possible value. That’s actually one of the problems that macro photographers have to deal with regularly and why dedicated macro lenses will go to f-stops of f/32 and beyond.
With the technique explained in the video, you simply shoot a series of photos of your subject gradually moving your focus plane through the subject from front to back. Photoshop then picks the sharp parts from each of the images and automatically creates layer masks that reveal only these parts in the final image.
Use to separate your subject from the background
In the shot that you see at the top of this article, the problem was slightly different: I wanted to separate the leafs as much as possible from the background. However, using the widest aperture on my Nikkor 105mm macro lens (f/2.8) wouldn’t let me get the entire subject in focus while closing the aperture down would make the background too busy.
So, I set my f-stop to f/2.8 and used the focus stacking technique. The wide-open aperture would let the background be nicely out-of-focus in each of the images while the entire set of photos would depict each part of the subject nicely in focus. But each part was sharp in a separate photo. Using the focus stacking tool demonstrated in the video created exactly the image I was aiming for: Subject shark front-to-back, and blurry background.
Of course, Brian uses a different set of photos here, but the basic concept is exactly the same.[via the Adobe Photoshop YouTube channel]
Neat trick – now do it with a moving subject ..
Of course it only works with static subjects. But in the world of close-ups and macros that is often the case.