How to Change the focus of a photo in Photoshop, use Depth Maps for depth of field blur

Colin Smith

Subscribe on YouTube:

How to Change the focus of a photo in Photoshop

We will Use Depth Blur to add a shallow depth of field, bokeh effect. Output as a depth map and then touch up the depth map. Apply lens blur for a very realistic depth blur effect.

Download and Open the image of the train. (This is a free photo from Adobe Stock) The photo is sharp everywhere. We are going to change it, to add a shallow depth of field effect.

This is a more advanced tutorial that will provide the highest quality results. For a quicker, more simple way to blur the background on a simple photo without using depth maps, see this tutorial

Black and red steam locomotive 99 783 puffing smoke through green trees

Choose Filter>Neural Filters

Choose Depth Blur, you will see the background becomes blurry.

Depth Blur neural filter blurring the background behind the steam train

Click on the background in the thumbnail on the right

Notice the train becomes blurry and the background sharp.

Depth Blur with the focal point set on the trees, making the train blurry

Click on the front of the train in the thumbnail.

It looks pretty realistic. Except the areas between the poles on the right got missed.

The challenge with AI based, blurring, is sometimes little parts get missed.

Focal point clicked on the locomotive's front in the Depth Blur preview

Let’s take control of the blur.

At the bottom, click Output as Depth map only. The preview image will turn into a grayscale Depth Map.

Click ok.

Output depth map only checked, showing a grayscale depth map of the train

We now have a grayscale depth map that we can use to focus the blur.

The darker areas tell the software, they are closer to the camera and should be sharp. The lighter areas should be more blurred.

Grayscale depth map of the steam train on its own layer in Photoshop

Hide the top layer and click on the bottom layer

Top depth map layer hidden with the Background layer selected

Choose the quick Selection tool.

Quick Selection Tool chosen from the Photoshop toolbar flyout

Use the quick selection to select the areas in between the poles.

Tip: Hold down the alt/option key and use Quick selection to subtract from the selection.

Quick Selection around the wooden utility poles beside the train

With the selection active, turn the top layer back on and make sure it’s the active layer.

Pole selection loaded on the depth map layer

Grab a paint brush.

Hold alt/Option and click to sample colors.

Sample the light tone and paint it into the selection.

Lighter gray tones painted into the pole selection on the depth map

Notice, I painted 3 tones into the selection, so that it matches the rest of the image in the depth map. Press Cmd/Ctrl+D to deselect

Corrected depth map with the poles painted in three gray tones

We are going to make a channel from the depth map, so we can use it.

Open the Channels panel. Window>Channels

Drag the red channel into the Plus icon to duplicate it.

Its called Red Copy and it’s an alpha channel.

Red copy channel in the Channels panel below RGB, Red, Green and Blue

If you want, change the name of the channel by double clicking on the name and typing. I renamed it DM, for Depth map. The names have no purpose, other than making it easy for you to identify the alpha channels.

Click on the name RGB to reselect the RGB channels, the DM channel should be hidden.

Depth map channel renamed DM in the Channels panel

Hide the depth map layer.

Duplicate the background if you want, just as a best practice, to preserve the original layer.

Steam train photo with the Background copy layer selected

Choose Filter>Blur Lens Blur

You will see a Depth Map option. Change source to DM, if it isn’t already selected.

Lens Blur filter with Depth Map source set to DM over the steam train

We can now use this depth map channel to blur the image.

Choose the cross hairs. (Set focal point)

Set Focal Point crosshair chosen in the Lens Blur depth map settings

Click on the area of the photo that you want to be sharp. Adjust the amount of blur to blur the background.

Here is our very realistic result.

Steam train in sharp focus with a realistic blurred background

 

I hope you found this tutorial useful, check out the other hundreds of tutorials here at PhotoshopCAFE.

ciao

Colin


Follow along for more tips

Keep growing with Premium Courses

Photoshop 2026 for Digital Photographers

Learn Photoshop properly, from the basics to pro retouching, step by step.

$129.00 · one-time purchase · instant download

Photoshop Vault: free Layer Blend Modes ebook, actions, brushes, presets and cheat sheets

Free for you

The Photoshop Vault

Get my free Layer Blending Modes ebook along with dozens of exclusive Photoshop goodies: actions, brushes, presets and cheat sheets.

You're on the list, so your free goodies are waiting for you in the Vault.

Get Free Photoshop Goodies Open the Vault

4 comments

  1. Gordon Snyder

    Fantastic 4 minute + Video Post showing a valuable Photoshop technique in a simple understandable way. I particularly like the way you support your video with step by step instructions I can mimic on my photo. Keep the videos coming please…

  2. Psst… Your email signup box locks the website using MacBook Pro 11.6.2 Safari
    You have to refresh to get rid of it …

    1. Colin Smith Author

      There shold be an x in the top corner to close it

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copy link