Focus Stacking for Greater Depth of Field in Adobe Photoshop

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 stacking

The 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 process

Finally, 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 photos

For capturing part I will recommend to you to read article on Adobe's Create Magazine.
images with focus stacking in mind
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 Photoshop

The 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:

  1. 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.
  2. Auto-Align Layers in Photoshop
  3. 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. 
    Auto-Blend Layers in Photoshop
  4. Photoshop will automatically create layer masks leaving visible only sharp parts on each of layers/photos. Save or export resulting composite image.
  5. Result of Auto-Blend command in Photoshop with layers masked

Product used in this tutorial:
Adobe Photoshop CC 20.0.7

Align and distribute layers
Combine images with Auto-Blend Layers


Popular posts from this blog

How to Change Artboard Size in Adobe Photoshop

Free Puzzle Pieces Actions For Photoshop and Elements

Old Weathered Vertical Wooden Planks Free Image