Focus stacking to control backgrounds

During these last two workshops I used a focus stacking technique to not only get all the important parts in focus, but to also control the background.

Especially with close ups, the problem you run into when trying to get enough depth of field for your main subject is that you often pull in too much detail from the background. By taking a series of shots at a wide aperture opening, focused at different points, you essentially have the same background in all the images. And once you stack them up using Photoshop or a stacking program like Zerene Stacker, you end up with your subject all wrapped in focused goodness while preserving a nice clean out of focus background.

Front of old truck at vintage gas station
Image taken at f/22. Notice the detail in the background grass. Too much for my taste.

But sometimes, the parts that need to be in focus are so far apart that when you focus on the back element, the one farthest from the camera and closest to the background, you may still end up with more detail in the background than you wish, even when shooting wide open.

The solution to this is to bring in the background from the image in the stack that has the best background. How to do that? Well, in Photoshop, you’d need to do some fancy masking. In Zerene Stacker, however, just go into edit mode, choose the image from which you want to grab the background, and paint it in. It’s really quite easy, much, much easier than masking in Photoshop.

In the example of this truck and vintage gas station in the Palouse, I was using my 80-200 zoom. I was able to get all the important elements in acceptable focus by using f/22, but at the same time, the grassy hill in the background has way more detail than I want.

Taking a series of three shots and running them through Zerene Stacker, I was able to get all the bits in focus. But the background for the stacked image was taken from the image with the pump in focus, making the grass in the background a little more in focus than I wanted.

Zerene Stacker interface
Using Zerene’s image editing

old truck at vintage gas station in the PalouseUsing Zerene’s editing capabilities I was able to use the background from the nearest focused image. This was no more difficult than using a brush in Photoshop. When you enter Zerene’s edit mode (Edit > Start Retouching) you’ll have the final image on the right and an image from the stack on the left. The file names of the images are presented on the far left of the screen. Click on them until you find the image from which you want to clone.

You’ll also see that you have a round brush in each image, the brush will be in the same place in both images. Just click and paint in the area you want to replace, the image portion from the source image on the left will be place in the final image on the right. When you’re done, go back to the Edit menu item and choose Commit Retouching. Then just save the output image by going to the File menu and choosing Save Output Image. And that’s it.

2 thoughts on “Focus stacking to control backgrounds”

  1. Interesting article about focus stacking. CAn this be done with JPEGs, or does it have to be in RAW? Can you adjust for brightness, saturation, etc. after you have stacked all of the images into one? or does each image need to be adjusted before you start to work on them? Do you do any further sharpening?

    I hope I will be able to master this procedure. Thank you for the info!

  2. I exported to TIFF first then loaded the images into Zerene Stacker, but it can be done with jpgs. If you have the Zerene Pro version it has a Lightroom plugin to send the images directly into Zerene. In the plug-in you choose the file type you want to send: Tiff or jpg. I believe Zerene will take only Tiff or jpg.
    You can do all your adjustments to individual images before stacking if you wish. I usually wait until I’ve stacked the images and then make adjustments to the final stacked image.
    Sharpening is at your discretion. If I was going to print, I’d sharpen for that. For the web, I just use Lightroom’s screen sharpening set to standard.
    Zerene can be as simple or as complicated as you like, it’s got lots of esoteric options that I’ll probably never use. It’s not too hard to master the basic stacking.
    There are also all sorts of tutorials over on the Zerene site.

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.


Newsletter

Take a look through the Newsletter archives or subscribe.

Keep up to date on workshop offerings, print sales, photo tips, puppy pictures and more!



Affiliate links below! If you buy after clicking these links, I get a taste. Win-win!

Maven Filters


High quality magnetic photo filters that will change your photographic life!
Affiliate link.


Topaz Labs

Awesome plug-ins to reduce noise, sharpen, and resize images. Affiliate link!


Think Tank

Affiliate link!

Lightroom Classic The Missing FAQ

Highly recommended. This is my go-to Lightroom book. Click on the book image. Affiliate link!