How to get razor sharp photos with Focus Stacking

How to get razor sharp photos with Focus Stacking

Manuel Becker Manuel Becker in Tips & Tricks
8 min read
Photo by Manuel Becker

Photography is often not only about knowing your equipment, but also about knowing the different techniques you can use to improve your images and to get the results you have in mind while shooting the scene. Fokus Stacking is something I really like, but lets start with why we even need it and why it’s such a great tool to have.

What is Focus Stacking?

Something probably every photographer knows about is the Bokeh, that occurs for example in the background when you focus the eyes of a person with your lens. The background gets blurred, depending on the focal length and the aperture you are using. This is something we definitely want to have in portrait photography, but landscape and architecture is often about having sharp photos all the way from the foreground to the background. Usually we are achieving this by using an f-stop around 8 to 11, because this is the range where anything should be sharp within our image without losing quality. Using higher values like f/22 creates lens diffraction, which results in blurry details and therefore less sharper images, something we initially intended to increase by using a smaller aperture (which is equal to high f-numbers).

So, just staying around f/8 to f/11 should be fine right? Yes and no, it depends. If you have something within your frame that is very close to you, the depth of field (the distance between the nearest and farthest objects in a scene that appear sharp) often isn’t big enough to get everything sharp. Instead of using a smaller aperture and having a less sharp photo, we can solve this problem with the Focus Stacking technique.

How to get razor sharp photos with Focus Stacking

The initial problem: When you have objects that are very near to the camera and you focus the foreground, the flowers obviously get pretty sharp. The background is very blurry though.

How to get razor sharp photos with Focus Stacking

The same issue occurs when you focus the background, leaving the objects very near to the camera out of focus.

The idea behind Focus Stacking is to take multiple shots of your scene with a different focus. Take one sharp photo of the background, change the focus of your lens to the middleground, take another shot and change the focus again to the foreground to take a third photo. Those 3 images now have different areas of sharpness, that can be combined by using Adobe Photoshop. By using the sharpest parts of every image, you will get one final image that is sharp everywhere.

When to use Focus Stacking?

Every technique has it’s benefits and drawbacks, so it’s quite important to know when you can use it and why. For me the main reason is to get much more depth within my photos, because you can capture everything within one shot with a wide-angle lens, beginning from something that’s very near in the foreground until something that’s far away. Especially photos taken in vertical format are predetermined for this technique.

Use it

The depth of field is to small to have everything in focus. You can check this by focussing on the most important part of your scene, because that’s obviously what definitely needs to be sharp, take the shot and zoom in into your image to see if everything is sharp enough. You could also set the focus somewhere around the middle of your image, to have as much depth of field towards both sides, the fore- and the background. This is so called "Hyperfocal Distance" can lead to having the most important parts out of focus and everything just nearly sharp, so I can’t recommend this, because I wan’t to have everything really sharp.

There is a second great reason to use Focus Stacking and that’s tiny movements within your scene. A tulip field is a great example, because the flowers will be moved by the wind. Using this technique allows us to use a smaller f-stop, resulting in a faster shutter speed and therefore again in sharper images. Additionally increasing the ISO can also help within difficult situations.

Don’t use it

Where tiny movements are usually no problem for Focus Stacking, anything else that’s moving is obviously something that won’t work with this technique. This is especially the case when the whole scene is moving and not only a small part, that you could capture within one image. If anything is moving in the transition between 2 images that should be stacked, it’s often not possible to blend them seamlessly. This is particularly true for the transition between the fore- and the middleground, where a lot of details are visible to the viewer of your image.

Another reason to pass on this technique is time, which is true for taking the photo and doing the post-processing. Sometimes you only have a very small time window to get your photo during sunset for example and if you are not familiar with changing your focus, you will lose valuable time to get your shot or try other compositions.

How to get razor sharp photos with Focus Stacking

This is a good example of how movement can mess up with stacking your photos. The windmills may look pretty futuristic now, but Photoshop obviously had some issues with stacking the images. This case is easy to solve though by just masking in the image for the background manually.

How to do Focus Stacking?

I would definitely recommend you to try this technique, if you haven’t done it before, when you have enough time during the shooting itself, because getting used to it will cost you some time at the beginning. The time is well invested though in my opinion and afterwards it’s pretty easy to use it.

Capturing the photos

Something you will definitely need is a sturdy tripod (read more about this topic in my article about Carbon Fiber vs Aluminium Tripod), because it’s important to have nearly the exact same image section on each of the photos. I would recommend you to start with the foreground, because changing the focus will also slightly change the image section.

Get started with composing your image and changing your camera to live view, so that you can see the image on your display instead of the viewfinder. Now digitally zoom in as much as you can and manually focus on the nearest point of the scene. Using this way to focus your images is something I can definitely recommend you anyway, because you will have much more control about the sharpness, especially during difficult lighting conditions, which is often the case during sunrise, sunset or dark scenes in general. I am always using this way to focus my images. Most of the new cameras even have a feature called "Focus-Peaking" to outline the edges in your image, that are currently focussed. This can also help you to get the maximum sharpness where you want it to be.

After you took your first photo you should still be zoomed in on your display and move the frame position towards the background until you recognize a decrease in sharpness. That’s the next image position you will need to set your focus to and capture it. Repeat this process until you reached the farthest part of your image.

The smaller your f-stop, the smaller your depth of field and the more images you will need, so using something around f/8 to f/11 is usually a good choice. Even if f/11 is usually not the sweet spot of your lens and therefore the sharpest f-stop you can use, it may save you some effort afterwards in post-processing.

Combining the photos in post-processing

Thanks to modern software like Adobe Photoshop, this part is usually pretty easy.

  1. Begin with retouching your photos like you would normally do. In my case I am starting within Adobe Lightroom to do the initial improvements and color corrections to my image. Afterwards you should just synchronize those changes to the other focus stacked images, because the more similar the images are in brightness etc., the easier it will be for the software to recognize the sharp areas.
  2. If you are also using Lightroom, you can select the images, right click on them and use Edit in > Open as layers in Photoshop. If you are not using Lightroom, you can simply copy and paste each image to different layers within one psd-file.
  3. As I already told you, the image section will be slightly different. For this reason we need to select all layers and use Edit > Auto-Align Layers… You could even skip this whole step 3, because Photoshop will automatically try to align the layers within the next step, but it’s usually better to have more control between those actions and check if everything worked out nicely.
  4. Now you can select all layers again and use Edit > Auto-Blend Layers… Set the Blend Mode to Stack Images, because that’s exactly what we want to do here. You can check Seamless Tones and Colors, but I would leave the Content Aware Fill unchecked, because that’s something I would do manually afterwards if needed. How to get razor sharp photos with Focus Stacking
  5. Finally you can crop your image to the size of the foreground image, which will be the smallest one and was therefore the reason to begin the shooting with. You can also combine all layers to one final layer by using Strg-E or Cmd-E. Please check in advance, if Photoshop really stacked anything like you would expect it. Otherwise you can still optimize the automatically generated masks with a brush.

There we go and here is your focus stacked image. You can now continue with any other post-processing stuff you would normally do.

How to get razor sharp photos with Focus Stacking

This is how the final focus stacked image of a tulip field near Espel in the Netherlands can look like. I took an additional photo just for the clouds, so that they are also perfectly exposed. I finally merged them in as another layer after stacking the images.

Additional advice

If the parts within your image were moving a little bit, it’s always a good idea to duplicate your images right after step 3. The reason behind this is, that Photoshop often can’t merge all the regions of your image perfectly, which might require some manual work after auto-blending the layers.
By giving the duplicated layers a black mask you can now easily paint in areas by using a white brush onto your layer mask.

How to get razor sharp photos with Focus Stacking

This is an example for stacking moving objects. Sometimes Photoshop merges the layers correctly in general, but leaves some spots with ghosting effects (transparent flowers). In this case we can just manually mask the layer in to get rid off this effect, especially in the foreground where mistakes like this would be visible to the viewer.

How to get razor sharp photos with Focus Stacking

This is how your layers could look like when you've duplicated them before stacking. I added the black masks manually to the copied image layers and I am now able to paint in the layer that I need without changing the masks, that were automatically generated by Photoshop.

Do you have any questions about this technique or are you already using Focus Stacking? I would love to hear from you in the comments below!

Comments (30)

Please log in or sign up for free to leave a comment or ask a question.
Murali Narayanan
Murali Narayanan 30.07.2023
Terrific article, Manuel. After started using the focus stacking technique, I now use it for about a third of my images - more than I expected. I then decided to sell my beloved Nikon D810 and bought the D780 that does the focus stacking automatically and it is blazingly fast. Also, I find Zerene Stacker and Helicon Focus are much superior to Photoshop to handle stacks. Photoshop introduces a lot of artifacts that you will notice when you print big images.
Manuel Becker Team
Manuel Becker 30.07.2023
Good point Murali and thank you very much for the hints. How are the results of the automatic stacking via the camera and can you still access the raw photos the camera used? If so that sounds like a great way to solve this issue, especially because this takes so much time if you do it manually.
Murali Narayanan
Murali Narayanan 30.07.2023 , edited
Manuel: Here are my observations. (1) Yes, you can shoot the stack in raw but camera will not do the processing. (2) I use electronic shutter (via camera settings) and so you wont have any shutter noise (3) Stacking will disable "mirror up" functionality (4) You setup the maximum number of shots and "focus step" (a number between 0 and 10). The camera uses the lens focal length, aperture setting, the starting focus distance and "focus step" to determine the number of shots. It will start with the starting focus distance and take shots until infinity. For landscapes, it takes anywhere between 3 and 20 shots depending on focal length, aperture, starting focus distance and "focus step". Longer the focal length, more images it will take. Similarly, smaller the aperture (high f-stop number), it will take less images. For landscapes, I use 5 as the focus step number. Lower this number, more shots it will take. I end up using anywhere between 2 and 8 of the shots the camera spits out to process the stack. As you say in your article, wind is a HUGE factor. When there is wind and leaves flutter, less images to stack is better. (5) when it is windy, I end up shooting multiple stacks and I'll pick different iamges from different stacks to do the processing in Zerene Stacker. Also, when the camera is done, the focus will be at infinity and if u want to do another stack, you need to bring back the focus to your original focus point to reshoot. If you dont do that, it will take only one shot at infinity :-). (6) Net: It is definitely faster than manually changing focus but you don't need to use every image the camera spits out to process the stack. (7) if you are doing super macro images (e.g. of insects), the camera can take up to 250 images for stacking.
Manuel Becker Team
Manuel Becker 31.07.2023
Damn, these are really great insights into your experiences and learnings, thank you very much. Sounds super interesting. When I started to shoot full frame in 2015 I totally underestimated how much this will change my photography when it comes to having everything in focus and super sharp. It's so nice to have a wider frame but typical landscape photography often depends on sharpness, so solving this issue in an easy and effective way is definitely important. Thank you for your thoughts dear Murali, I really appreciate it.
Not Seano
Not Seano 12.01.2022
Worst moment is getting blurred photos of beautiful places.
Manuel Becker Team
Manuel Becker 12.01.2022
Fully agree and yet it will happen to all of us which can motivate us to learn and pay more attention in the future. At least that's what happened to me when I started with my first Canon 300D and every photo I took was unsharp or sharp at the wrong position... ;-)
Debbie
Debbie 05.04.2019
Great article and tips. This topic came up in a recent conversation and something I've been meaning to learn how to use/do. Your article explains it very well and is easy to follow. Thank you for writing and sharing.
Manuel Becker Team
Manuel Becker 06.04.2019
Thank you very much dear Debbie. Did you find the article via Google after the conversation or did you see it in the newsletter? Glad that it helped you, but definitely try it yourself as well, since it might need some practice to get used to it. But it's definitely worth it and the results are awesome. Have a great weekend!
Eric Helligrath
Eric Helligrath 01.04.2019
Very good article Manuel. Keep up the great work.
Manuel Becker Team
Manuel Becker 01.04.2019
Thank you dear Eric, really appreciate the feedback and it helps me to get a better feeling if it was worth it to put nearly 2 full days into such an article where I wanted to write about anything as good as I can.
Trang Nguyen
Trang Nguyen 31.03.2019
Thank you for the tips! Appreciated
Manuel Becker Team
Manuel Becker 01.04.2019
Anytime Trang, hope they help you and feel free to ask if you have any further questions.
Sean Chiu
Sean Chiu 31.03.2019
Thank you for the tips!
Manuel Becker Team
Manuel Becker 01.04.2019
You are welcome dear Sean!
Mark_dp
Mark_dp 31.03.2019
nicely done! Thank you!
Manuel Becker Team
Manuel Becker 31.03.2019
Thanks for the feedback Marco, really appreciate that and glad that you like it! :-)
Alona Azaria
Alona Azaria 14.06.2018
Thank you so much Manuel! this is a real Masterclass!! so clear and detailed. However, I am confused a bit in the chapter "Capturing the photo", second paragraph, you say "Now digitally zoom in as much as you can and manually focus the background of the scene. " Do you rather mean foreground?
Manuel Becker Team
Manuel Becker 15.06.2018
Ha, you got me and found my intentional mistake I added to the article... ;-) Just kidding, it's like you said the foreground you need to focus on if you start with this frame, so I corrected this part of the article. Glad that you like my "Masterclass"! (I don't know why, but the word sounds really good...)
Alona Azaria
Alona Azaria 15.06.2018
Don't worry, it was obvious what you meant, and it is also self explanatory that you meter for every section that you take separately. Keep up the excellent work Manuel!!!
Zohaib Khan
Zohaib Khan 19.05.2017
Great tutorial Manuel. I was wondering if you can elaborate a little bit more on your last technique to eliminate motion blur using masks. Perhaps explain it in a video?
Manuel Becker Team
Manuel Becker 19.05.2017
Hey Zohaib, thanks for your feedback. I guess I could try to explain masks in another article or video, because if you understood this very powerful tool, this should be easier to understand. Would this be fine for you or do you have any other specific questions about that? It's not that hard to do, it's just sometimes a lot of patience needed... ;-)
Sean Sutton
Sean Sutton 05.05.2017
Thanks, Manuel. A great tutorial for a useful technique. Very clear and well illustrated.
Manuel Becker Team
Manuel Becker 05.05.2017
Thank you dear Sean. Are you also using it?
Sean Sutton
Sean Sutton 05.05.2017
I haven't used it in a while but your article reminded me I should be using it!
Daniel Schmitz
Daniel Schmitz 30.04.2017
Hi Manuel, thanks for sharing your in-depth knowledge about focus stacking. Great article! I will definitely try this technique out in my next shooting. Cheers!
Manuel Becker Team
Manuel Becker 01.05.2017
Thanks my friend, hope it helps you and if you have any questions after trying just let me know!
Albert Lam
Albert Lam 30.04.2017
Thank you for showing the whole focus stacking and post processing steps. I will start using this technique in the future.
Manuel Becker Team
Manuel Becker 01.05.2017
You are welcome Albert, wish you great results!
Patrick Makelberge
Patrick Makelberge 29.04.2017
Thanks for the tips and tricks
Manuel Becker Team
Manuel Becker 01.05.2017
No problem Patrick, glad that you like them! :)
Imprint & Contact © Locationscout 2024 Privacy / Terms