Free Photography Tutorials, Beginners to Advanced

The Depth of Field Dilemma in Close-up Photography

How to get the bits you want in focus and the background out of focus

Here is a method for producing extra depth of field in all, or just part, of your picture. I decided to put this tutorial in the 'photography' section rather than the 'Photoshop' section because, although the large part of the explanation is about what you do in Photoshop, the planning and execution starts at the photography stage.

In the picture below I wanted a shallow depth of field to throw the background out of focus. Unfortunately using a large enough aperture to throw the background out of focus meant that I couldn't get the whole spoon and it's contents in focus at the same time. A common enough dilemma, should I increase the depth of field by selecting a smaller aperture? This would mean a more muddled composition, it needs the difference in focus to lift the spoon and it's contents out of the picture, in fact the whole composition relies on this. However, having parts of the spoon out of focus is not an option either.

The answer is to take two shots of the subject, you obviously need a tripod for this and the subject needs to be completely still, to make sure that the two shots are exactly the same. The only difference is the focusing, the shot on the left is focused on the front of the spoon and the shot on the right is focused on the back. Looking at the shot on the right you can see that the shaft of the spoon is in focus and also the furthest pieces of macaroni. So now we have two shots which between them cover the range of focus we need.

depth of field depth of field

The next step is to drag the first picture, the one with the focus at the front which will be our main picture, onto the right hand picture creating a new layer above it as you can see in the left hand picture below.

Provided that you have 'snap' selected in the view menu, the two pictures should be in register. You can check this and make any adjustment necessary by temporarily changing the opacity of the top layer to 50%. You need to make sure that the pictures match up at the point where the focus changes.

Note that, because we are looking at 50% of one layer and 50% of the other, the whole picture looks out of focus.

depth of field depth of field

Finally add a layer mask to the top layer and paint it with black to reveal the bits that you want from the lower picture. In this case we want the shaft of the spoon and the back pieces of macaroni, you can see the black on the layer mask where I have painted with a soft brush. In theory you should see a difference in the background but, because it is out of focus in both pictures to almost the same degree, you can't really see it at all.

This technique can be used for anything that has been photographed at an oblique angle to the camera, like a flower for instance. It could be used with a subject that is face on to the camera but just too deep to get in focus, but then the painting stage, to reveal the bottom layer, would have to be done with a lot more care.

I have also seen this technique used to take pictures of model cars or trains where the whole frame needs to be in sharp focus and there is not enough depth of field available even at the smallest aperture, sometimes a third shot is needed, focused on the middle section, to cover the whole rage from front to back.

Other tutorials in this section


A few tips for the budding wildlife photographer.

camera icon camera icon

Lighting and perspective.

camera icon

What you need and what to watch out for.

camera icon camera icon
Extended Depth of Field

For perfectionists.

camera icon camera icon camera icon

All the settings you need.

camera icon camera icon

Photograph flowers like a professional, what you need to know.

camera icon camera icon
Focus Stacking

For when you need extra depth of field.

camera icon camera icon camera icon
Macro 1:1

How to get those ultra close-ups in focus.

camera icon camera icon camera icon

Shooting a panned sequence of shots and stitching them together to make a panorama.

camera icon camera icon camera icon

Techniques to help you capture those golden moments.

camera icon camera icon
Photography in the Snow

Getting the exposure right in all that white.

camera icon camera icon
Sports & Action

Tips on how to capture fast action.

camera icon camera icon
Travel Photography

Take better holiday photos without losing your sanity.

camera icon
Wedding Photography

A complete 'how to' for weddings, with an accent on crowd control.

camera icon camera icon
Working with Models

Bribing people to sit for you.

camera icon camera icon
Back to the main 'Photography Tutorials' page
Learn Digital Photography with Geoff Lawrence eBook

If you enjoyed this page you might
be interested in my eBook
Learn Photography with Geoff Lawrence