The Ultimate Photoshop Resource

How to blur a photo background in Photoshop using blur masks and Depth Maps


This week I have made a really fun and useful tutorial that not only gives you great results, it will also teach you a little bit about channels. Don’t worry, they aren’t as scary as they sound. This Photoshop tutorial shows you how to blur the background of a photo to add a realistic depth of field by using Depth Maps, or blur masks as they are sometimes called. This method allows you to add a different amount of blur on different parts of the photo.

The photo used here

background blur in photoshop

Creating a Depth Map Powered Background Blur in Photoshop

In this Photoshop tutorial, you will learn how to blur a background to simulate depth of filed from a nice expensive lens. You have heard the term bokeh, or depth of field or background blur. This all comes from a large opening in the lens that throws the background out of focus. Maybe you don’t have that lens, or couldn’t open the aperture because of too much light, or you used a drone, a GoPro or a phone. Or maybe you just want to have that control yourself in Photoshop. We will use masks to control where and how much of a blur will be applied to a photo. This allows you to create a very realistic depth of field effect that add depth as well as simplifies the composition of an image and makes it more pleasing.

 

Step 1. Select the subject (foreground)

Choose the Quick select tool.

Choose select subject, or use the quick selection tool to select our woman.

select and mask

marching ants selection

Step 2.

Choose Select and Mask to refine the selection

Step 3.

First we will make the edges nice, automatically.

the select and mask workspace

Turn on show edges

show edges

Adjust the amount slider until you can just see the edges.

outline in photoshop

Turn show edges off again

a smooth edged selection

Step 4.

Choose the refine brush and go around the edges of the hair to get a better selection.

refine brush around hair

Step 5.

Choose Selection as the output option and click ok

output to selection

Step 6.

Now you have a selection around our woman,

Click on the new Layer icon in the Layers panel to create a new layer.

make a new layer

Fill the selection with black on the new layer. (Press D to reset the color and use Option+Delete (Mac) Alt+Backspace (windows) to fill.

Press Cmd/Ctrl+D to deselect

fill with black

 

Step 7. Selecting the midground

Choose the background layer in the layers panel

Grab the quick select again. This time select the ground near our traveller. Use the alt/option key to remove from a selection if you went too far.

fill foreground with black

Step 8.

Choose select mask

Turn on show edges

This time make the outline thicker

making a better edge in photoshop

Turn off Show Edges

Step 9.

Use the refine tool to clean up the selection around the bush

use refine brush in photoshop CC

Step 10.

Click ok

Make a new layer

make a new PS layer

Step 11.

Choose 40% gray as the foreground color

To get 40% gray, click the color swatch. reset colors

Choose black, and then under HSB, change the B to 40 (B is for brightness).

Press Cmd/Ctrl+D to deselect

choose a % of gray in photoshop

Fill the selection with 40% gray

Depth map

Step 12. Making the Depth Map

Hide the background, so only the black and gray layers are showing.

Step 13.

Press Shift+Cmd+Option+E (Mac) Shift+Ctrl+Alt+E (Windows) This will create a new layer on top that contains the content from the 2 visible layers.

Hide all the layers except for the new merged layer we made in step 13.

Press Cmd/Ctrl+A to select all

Press Cmd/Ctrl+C to copy

blur mask

Step 14.

Open the Channels panel

Click the new icon to create a new Channel (alpha 1)

Channels in Photoshop

Step 15.

If the channel is black, press Cmd/Ctrl+I to invert it and make it white

invert

Step 16.

Press Shift+Cmd/Ctrl+V to paste in place. (The Shift key makes it paste in place)

You should see a black foreground, gray midground and white background. This is our mask, or depth map

final mask in channels

Step 17.

Click on RGB at the top to make sure that the RGB is selected and showing and the eye next to the Alpha channel is off. (If it looks red, you haven’t done this step correctly, look at the screen shot carefully)

select layer

Step 18.

Go back to the Layers panel and hide everything except for the background which is our image. Click on the background to make it active.

Press Cmd/Ctrl+J to duplicate the background, this gives us a safety layer.

apply a filter to a photo

Choose the duplicated background layer if it’s not already selected. This is where we are going to apply our effect.

Step 19 applying the Lens Blur

Choose Filter>Blur>Lens blur

lens blur filter

Step 20.

Change the blur amount to add more blur to the photo. The problem is, everything blurs.

Photoshops lens blur

Here is the key.

Under Source at the top, choose alpha 1 (our map) for the dropdown menu.

Choose our channel;l

Now it should protect our woman in the foreground and apply the full blur to the background.

background blur

Something interesting happened in the mid-ground where we made it gray. It only blurs 40%. the same percentage as the shade of gray. This means that the amount of blur is directly proportional to the shade of gray used.

Click ok to apply

final background in photoshop blur and bokeh

This is just a simple example of how this effect can be used, with 3 level of blur. You can use gradients or multiple shades of gray to build up a very complex blur mask if you put the time in.

I really hope you enjoyed this week’s tutorial here at PhotoshopCAFE.

PS Don’t forget to join our mailing list and follow me on Social Media>

 

(Ive been posting some fun Instagram and Facebook Stories lately)

You can get my free Layer Blending modes ebook here

 


30 responses to “How to blur a photo background in Photoshop using blur masks and Depth Maps”

  1. Shooting with a Canon EOS SL1, It’s a great camera with a small body which makes for very convenient travel. The crop sensor may be a problem for some, but you learn to make the appropriate adjustments for good composition.

  2. excellent tutorial! I use a Light16 camera now – almost entirely. Love it. Export their Lumen RAW to DNG.

  3. What camera? Well, way long ago used to use a variety of film cameras. Then moved to Canon Rebel XTi with several lenses. Then went down to Rebel SL1 with one compact lens. And now, I’m totally smartphone – Android Galaxy S6 with 16 megapx. Produces very decent photos when used with a Gorilla Pod or a standard tripod. And great video for informal podcasts, etc. How the world has changed!

  4. Just moved from a Canon 7D MII to Oly EM1-X – the weight difference of the lenses and the 7.5 stop IBIS make it a remarkable upgrade.

    Great video – Presumably this approach could use several levels of grey/depth?

  5. Canon D7
    Colin, I’m finding out more and more people are using their iPhone or Android as their shoot/click camera. I recently bought a Smooth 4 gimbal for the Note 9. It is a miracle in design engineering, features and mobility. What it isn’t is easy to use. It is highly demanding you pay attention to the available tuts. Many of them are crap but there are a few that are just stellar. Recommend using the ZY Play downloaded from Google Play. It’s just fantastic esp. for time lapse and slow mo. Get it from Amazon as they are amazing about returns. I had an issue with the first one and, before I even took it to UPS for return, I had received the replacement – no shipping charge. So, I heartily recommend the Smooth 4 for iPhone/Android.

  6. Mr. Smith, I taught graduate and undergraduate students for 35 years. I can really appreciate the amount of effort it takes to continually have to think of new ideas for presentations. Then, to have the teaching skills to put a presentation together with video, audio and written procedures is truly impressive. And this effort is without direct financial rewards. It all comes down to teaching as a passion which is only partially rewarded by “student” expressions of thanks in the replies. As a 74 year-old continual student, I just want to say how deeply I appreciate your mind, skills, effort and passion.

  7. Hi Colin, I have enjoyed your tutorial but have a snag. Using PS 2019 and the “lens blur” is greyed out. Have tried several ways including open the file in RAW to no avail. Any ideas?

    PS. I am using your image of the girl

  8. Handy tutorial but something from the comments occurs to me that I wonder about…should we be caring what camera everyone is using, or is that more of a “look at me” sort of thing?

    • Its useful to know what brands people are using, so I know what reviews to do in the future, I don’t thank anyone is seeing it as bragging thing.

  9. Great tutorial! I love the variety of lessons that you put up. I came back to this one the other day to do a test on a photo I took of a bird. It worked! I use either the Sony A7 III or a Sony A7R III primarily.

  10. Easy to follow tutorial. Thank you Colin.
    Although I am having the same problem as David above where I cant use the lens blur? Using PS 2019

    My camera is a Canon 5d mk4

Leave a Reply

Your email address will not be published. Required fields are marked *

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


Access The Photoshop Vault

Unlock dozens of valuable Photoshop resources for FREE

The Ultimate

Photoshop Resource