Top Nav

Photoshop: Expand Depth of Field (DOF) with Focus Stacking

What is Focus Stacking?

Focus stacking (also known as focal plane merging and z-stacking or focus blending) is a digital image processing technique which combines multiple images taken at different focus distances to give a resulting image with a greater depth of field (DOF) than any of the individual source images.

– from Wikipedia

How should I take the photos?

In terms of composition, both the camera and all of your subjects need to remain in the exact same position for all of your images. Take a minimum of two photos with the focus on each one at a slightly different distance. Even if your lens focuses in a way that introduces slight distortion of the out-of-focus areas, Photoshop can align automatically for you, so just concentrate on the photos without worrying about post-processing.

Focus Stacking gif photoshop images photography dof expand

The Automated Method

After transferring all of your images to your computer you need to load all of them into a single Photoshop document. For up to 3 images, opening the first one and then using File > Place for the others is okay. If you have a larger number of photos, however, try File > Scripts > Load Files Into Stack.

photoshop load files into stack script expand dof photography tutorial

A window entitled Load Layers will appear, allowing you to import your images. Press the browse button and navigate to wherever your images are, then select them all and pick Open.

photoshop photography tutorial expand dof load images focus stacking stack

Pro tip: If you put your photos into a separate folder, you can also try Use > Folder.

load images from folder photoshop photography dof expand tutorial images stacking

After selecting the images, you can optionally tick Attempt to Automatically Align Source Images if you think the photos might not be perfectly aligned.

Photoshop photography tutorial loaded images automatic alignment align stack images focus dof

Press OK and watch as Photoshop does the work for you, turning each and very image into a layer.

images to layers script photoshop image photography dof expand focus tutorial

With the top layer selected, hold Shift and click the last layer to have them all selected.

layers selection shift photoshop layers select all dof stacking photography tutorial

Now go to Edit > Auto Blend Layers.

auto blend layers photoshop feature photography focus stacking tutorial

From the newly appeared window choose Stack Images, and leave Seamless Tones and Colors checked.

auto blend layers options seamless tones colors photoshop photography tutorial

Click OK to begin the process (usually from 2 to 5 minutes depending on image size and computer performance).

auto blend images layers focus stacking photoshop tutorial

Represented with a GIF, this is how Photoshop gradually stacks up images:

Blending dof focus stacking photoshop process gif

Then it gives you the final result:

result final photoshop stacking image focus stack photography tutorial

If you’re happy with the final result, you can press a quick Ctrl + Shift + S to save your final image as a new file.

save as keyboard shortcut photoshop

Check out Page 2 for the Manual Method.

More Reading:

,

2 Responses to Photoshop: Expand Depth of Field (DOF) with Focus Stacking

  1. Ron White August 23, 2013 at 4:19 pm #

    Hey, Stefan. That’s terrific! I knew Photoshop would do that I’ve been interested in trying it out, but, well, the truth is I’m too lazy. Thanks for showing me how-to and showing it’s not all that hard.k

    ron

    • Stefan August 25, 2013 at 1:05 am #

      Thanks for your comment, Ron!
      Glad I helped out.

Leave a Reply