Focus Stacking for Greater Depth of Field in Adobe Photoshop
One of the lesser-known functionality in Photoshop is the ability to focus stack images. This technique allows you to combine multiple images that are captured at a different focus distance. It is a very handy feature for close up and macro photography to achieve greater depth of field.
In this post, I will explain to you how to use an automated focus stacking technique in Photoshop to get the final image with a greater depth of field. The coolest part is that Photoshop will do the heavy job of recognizing sharp parts of photos and mask other, not so sharp or blurry parts automatically.
Why use focus stackingThe very first question you may have is why use focus stacking anyway?
The short answer is because you can achieve a greater depth of field of what is your camera capable in a single shot. This is often the situation with macro and close up shots where the depth of field is greatly reduced due to large aperture and close distance. Another situation is when you want everything on your photo sharp as it can be. It is possible to expand the depth of field by capturing multiple photos with different focus distances and later to merge/combine them into a single image.
Focus stacking is a two-step processFinally, let me mention that focus stacking is two-step process: you must know how to capture photos and later how to stack them in Photoshop.
First step: capture photosFor capturing part I will recommend to you to read article on Adobe's Create Magazine.
|Two images captured with focus stacking in mind. On the left side yellow flower is in focus while pink is out of focus. On the right side yellow flower is out of focus while pink flower i in focus.|
Second part: focus stacking in PhotoshopThe second part or focus stacking in Photoshop can be also divided into two steps:
- Load images with different focus distance onto separate Photoshop layers.
- Use Auto-Align then Auto-Blend Layers from the Edit menu in Photoshop.
To load multiple images with different focus distances onto separate Photoshop layers you can use Photoshop built-in feature or use commands in Bridge and Lightroom if you prefer to work in that way:
- In Photoshop go to File > Scripts > Load Files into Stack. Select photos or folder with photos and wait for photoshop to load files onto separate layers.
- In Bridge select all photos that you want to load in Photoshop then go to Tools > Photoshop > Load Files into Photoshop Layers...
- In Lightroom select all photos that you want to load into layers then right-click or go to Photo > Edit In > Open as Layers in Photoshop.
Once you have files or images with different focal distances onto separate layers do the following:
- It is recommended to align layers before instructing Photoshop to auto blend them. Select all layers then go to Edit > Auto-Align Layers... Set Auto in the Projection section and click OK. That is it, wait for Photoshop to do its job.
- Once you have layers aligned it is recommended to duplicate them just in case that you do not like the result of auto stacking. You can put layers in a layer group, by the way for easier organization. Hide original layers then select all remaining layers or layer group and go to Edit > Auto-Blend Layers.
- In Auto-Blend Layers dialogue choose Stack Images and leave Seamless Tones and Colors checked.
- Optionally check and Content Aware Fill Transparent Areas what will instruct Photoshop to fill areas which are transparent due to misalignment. When this option is checked Photoshop will create merged layer on top which will be used to fill empty space or transparent areas.
- Click OK and wait for Photoshop to do its job.
Product used in this tutorial:
Adobe Photoshop CC 20.0.7
Align and distribute layers
Combine images with Auto-Blend Layers