How to Get Landscapes Sharp with Focus Stacking

How to Get Landscapes Sharp with Focus Stacking

Focus Stack Initial Image

The initial image, shot at f/8, lacked front-to-back sharpness as there was not sufficient depth of field. ISO100, f/8, 2 secs

A key aspect of successful landscape photography is image sharpness.  Usually, it is desirable to ensure that all elements of a scene, whether close or far, are captured in sharp focus.  This can prove to be challenging and, if not achieved with the click of the shutter, cannot be corrected later during post processing.

One approach that is often taken is to use the smallest aperture available, e.g. f/22, to obtain the largest depth of field.  Whilst maximising the depth of field is a good intent, using such a small aperture will actually result in softer images due to an effect known as diffraction.

Most lenses are at their sharpest when used at apertures between f/8 and f/11 and whilst hypefocal focussing may allow you to capture an entire scene acceptably sharp in one image using these apertures; it is always still a compromise between a number of factors and there will be times when you cannot generate enough depth of field to capture a whole scene at optimum sharpness.

That is where focus stacking comes in.

Focus stacking is the technique of stacking (or blending) a number of images that have been focussed at different points throughout a scene to give a final image that contains the sharpest portions of the originals, seamlessly blended into one.  It isn’t as laborious as it sounds and can give really good results, rendering scenes far sharper than possible in just one exposure.

In the field…

As you will be stacking the images into one, aside from the point of focus, you want the individual photographs to be identical in all other respects.  Therefore, it is best to have the camera positioned on a tripod and use a remote release.

Using your optimum aperture (can easily be determined for a given camera/lens combo using focus charts, however you will most likely find that f/8 is a good starting point), take the required number of images focussed at different points throughout the frame.

A minimum of two images are required, i.e. one focussed for the foreground and one focussed for the background, however an additional third image, focussed for the middle ground can also be a good idea.

Focus stack comparison foreground

A comparison of a 100% crop of the foreground from two images, one focussed for the foreground (left) and one focussed for the background (right).  Both shot at ISO100, f/8, 2 secs.

Focus stack comparison background

A comparison of a 100% crop of the background from two images, one focussed for the foreground (left) and one focussed for the background (right).  Both shot at ISO100, f/8, 2 secs.

Back at home…

Open the two images in Photoshop and create a new file that contains both images as different layers, in the one file (to make life easier, name the layers accordingly, e.g. near, far).

Select both layers and go to Edit > Auto-Align Layers to ensure both images overlay perfectly.  Select the ‘Auto’ option, and deselect the ‘Vignette Removal’ and ‘Geometric Distortion’ options.

Then select Edit > Auto-Blend Layers, and choose ‘Stack Images’, ensuring ’Seamless Tones and Colours’ is selected.

Focus stack auto blend dialog box

The Auto-Blend dialog box

At this point, Photoshop will determine the sharpest portions of each image to incorporate into the final image, and apply a mask to each layer.  Below you can see the layer masks applied to the two images.  In this instance, you can see the rocks in the lower portion of the image are the main area selected by the layer mask for the ‘near’ layer whereas the rocks in the middle distance and the background mountains are incorporated from the ‘far’ layer.

Focus stacks layer masks

The automatically generated layer masks, applied to each layer, includes the sharpest portions of each layer (shown in white).

It is worth checking the image at 100% zoom to ensure that there are no strange artefacts caused by poor blending of any moving grasses or branches.  These can be fixed by manually painting white or black on to the relevant layer mask (remember: white reveals, black conceals).  For those using Elements, if you are only using 2 or 3 images, it is possible to do the blend manually using layer masks and white/black gradients.  In some instances, it actually gives better results, with fewer ‘blending artefacts’ to do the blend manually.

Once you are happy with the blend, merge the layers to give your final, focus stacked image.

Focus Stack final image

The final image with good sharpness from the foreground rocks right through to the mountains in the background

It may not be immediately apparent when showing images at web resolutions, but the difference in the overall sharpness when using optimum apertures and focus stacking is astounding when printing images.  To be able to focus stack, it only takes a little more forethought when out capturing the scene, and a few short processing steps when back at your computer so why not give it a go the next time you are out photographing landscapes.

Read more from our Tips & Tutorials category

Elliot Hook is a wildlife and landscape photographer based in Hertfordshire, UK. Elliot loves being outdoors with his camera, and is always looking to improve his own photography and share what he has learnt with others. Elliot also can be found at his website, on Twitter, Flickr and 500px.

Some Older Comments

  • Carl Brady July 29, 2013 12:30 pm

    It would be a great help if your resolution was high enough to actually see sharpness in any of the images!


  • rambler May 21, 2013 01:00 pm

    You can do a trial with Helicon Focus software if you do not have PS,

  • Jeffrey May 19, 2013 03:24 pm

    @karl if you go to Photoshops video tutorials on the web they will show you exactly how to focus stack.
    They should be available while you are actually doing the stacking in Photoshop. Give it a try!

  • Karl West May 19, 2013 05:50 am

    I believe this was on last weeks lessons. Again you hav edirections not inclded in Elements. Again, I will say that is the fault of Debbie Grossman in Popular Photography as well

  • CJ May 17, 2013 11:20 pm

    Fine idea but I think the author overdoes it. Landscape images can be really sharp if the hyperfocal distance is set correctly to have full depth of field covered. I would pay full attention to the scene and worry about the perspectives, angle, etc. but not marginal improvement of sharpness after stacking. Focus stacking is definitely needed for the macro photography where the original DOF is really thin.

  • Richard May 17, 2013 10:52 pm

    Thanks for a great article. Now I know why my landscapes are lacking in sharpness, will definitely be trying this. As I am using Lightroom and ACDsee I will try the Image stacking software called CombineZM, it is a free down load.

  • May 17, 2013 10:30 am

    Dunno Lorraine I dont have Nik but the answer is give it a try and find out

  • JillB May 17, 2013 09:19 am

    Hello, as a newcomer to photogrpahy, with a Panasonic FZ-200, how do I go about focusing on two different points in the same landscape scene where an Aperature Priority mode is used? All suggestions and pointers gratefully received.

  • Steve Thompson May 17, 2013 09:16 am

    So if I'm doing HDR and focus stacking, I need to take six images?
    HDR, focus stacked panorama?

  • Stephanie May 17, 2013 02:55 am

    Awww hell, it never even occurred to me to focus stack non-macro shots. Genius. Thanks for the article!

  • Lorraine May 17, 2013 02:02 am

    Is this related to HDR only in the area of focus instead of exposure? Could I use my Nik software in Lightroom to process these images and stack them together? Or is the image stacking a totally different concept?

  • perry May 16, 2013 02:32 pm

    Dean, the procedure you outline looks fine but you 'probably' only need foreground and back/infinity. Whether you use man or auto focus is kind of irrelevant i think as long as in auto focus mode you use use the spot focus mode and put it on the distance and the stuff close up you want to include in yr final pic. make sure you have manual exposure set tho so you dont get different values in each image. The really hard one to keep constant is the SKY. In a big pan, shoot like 60% overlap with a standard or tele lens. Personally i like to shoot about 100deg which is roughly normal human viewing. Adding a bit of foreground detail i think makes the pan look more Ah 'Dynamic'? or at least interesting and you have a bit of perspective. A few examples here
    If you turn on the information you can see which are the Large Format images and they havent been fiddled with and show pretty good focus all through t the field

  • Jonathan May 15, 2013 02:17 pm

    Hi.. I repost it again anyways!

  • rose May 15, 2013 11:51 am

    sorry Jonathan lol

  • rose May 15, 2013 11:51 am

    Jonothan, the link is not working, can you repost? Thanks.

  • Jonathan May 15, 2013 10:00 am

    To the "non-experts" this is a short introductory guide on focus stacking. This is not for landscaping but for macro, but the idea is the same one. Hope it helps!

  • Dean May 15, 2013 05:22 am

    I've never thought of using focus stacking for landscapes. It would make a bracketed panorama witht he body into the vertical position a bit more, umm, fun!

    Im sure the sun will have appreciably moved by the time I get the range of shots done. Need some practise on my part, clearly.

    Im sure the sun would have noticably moved

  • r May 15, 2013 05:19 am

    Interesting. I am not a landscape photographer but this is something I would love to try out. Thanks for sharing.

  • Dean May 15, 2013 01:46 am

    This may be a stupid question ?
    So you have the camera on the tripod and shot composed, now do you manually focus on an object in foreground them middle ground then back ground or auto focus moving focus point as far down as you can go without moving your setup then move focus point of middle, far for the other shots ? What would be the best practise to get optimal results ?

  • Roger Harrison May 14, 2013 12:17 pm

    Thank you everyone for some good comments, suggestions & advice.
    My last trails using full manual settings on lens & camera, and using hyperfocal chart settings has produced a couple of good landscapes (seascapes).
    Stacking is not for me at present but is a fall-back I will remember.
    Kind regards from the Sunshine Coast of Qld.

  • perry May 14, 2013 10:06 am

    Perhaps you dont really need auto align. If you convert the image to a layer, enlarge the canvas size to fit the image you started eith and the image you want to include , open the other image you wish to ad and then pick a spot common to both images in this shot 2 and decrease the opacity (not sure if elements does this). Using the drag tool, take it over to image 1, normalise the opacity and then flatten layers. Its trial and error and not that time consuming. Its what one did before the automate photo merge tool was included in PS . Best done with a normal lens and up. Wides can be problematic - even with automation, too much curvature.

  • Terry May 14, 2013 09:31 am

    If a person can't afford Photoshop, of which I'm, them consider a program like Zerene stacker. Focus stacking really works well for macro but also for landscapes.

  • Roger Harrison May 11, 2013 01:38 pm

    I am wondering which version of photoshop you refer to?
    PS Elements 11 does not have "Edit- Auto Blend" or anything like it.
    I have tried photo merge with images of varying focus to produce a nice clear image but maybe my tongue was in the wrong position.
    Meanwhile, I use a hyperfocal chart and manually dial in the pre-calculated data with reasonably sharp results.

  • Thomas May 11, 2013 06:45 am

    I presume that the hellicon focus apps could also be used?

  • Noah Parks May 11, 2013 03:44 am

    Brilliant! So glad I finally understand why my shots can't measure up to the pros. I just need a little photo editing to get the best from my shots.

  • Karl West May 11, 2013 02:35 am

    What is there to say?

  • Karl West May 11, 2013 02:34 am

    This article about sacking images sounds good, but it is useless with Elements that doesn't have Edit> Auto Align

    Debbie Grossman does this all the time in Pop Photography

  • Geoff May 11, 2013 02:17 am

    Pls don't knock this stacking concept. I have used it in macro with a slider rail cheap from Hong Kong with fantastic results. I never even thought about using it for landscape photo's. And I must admit some of my landscape shots are not quite in focus as I would like.So will have a shot at stacking landscape.The same principal must apply i'm sure.

  • Stuart Heggie May 10, 2013 10:25 am

    I found this to be a very cool and easy way to improve my close-up shots! Here is my first try:

  • perry May 10, 2013 08:57 am

    LF is certainly better, but a few years ago in my late 50's i figured i had hit the wall after lugging an LF outfit up several volcanos in Java. I bought a 5d. It didnt have the sharp detail that is stored in an LF tranny, but i just dont do blow ups of a size that would show.
    I have been stacking for various results for a few years, I didnt realise that it actually selects the most focussed sections and i tend to crop the images i want to get the parts that i need into the one frame. Stacking also gives you a more regular image if you are creating a panorama from a sequence of shots.
    The thing that i really miss about film is the lack of instant gratification. You had to wait to see what you got when i picked up my trannies from The Lab and slapped them on the light desk i nearly wet myself with the first frame LF at Bromo Tenger
    PS is expensive BUT you could buy an older version second hand I still use cs4. I have 6 but just havent got to installing it.

  • marius2die4 May 10, 2013 02:48 am

    Very goo article and nice technique.Tkx for very good explanations!

    Some of my pics:

  • Eric May 10, 2013 02:07 am

    Kinda funny that people often view film cameras as clunky and "out dated" but with my large format, I can keep the entire scene in sharp focus, beyond anything digital can do, and I don't have to spend any time in lightroom or photoshop to accomplish this.

    I'm not knocking this article, I just couldn't resist giving you digital peeps a good-natured ribbing :)

  • Pat David May 10, 2013 12:33 am

    @sillyxone - Hey! I don't eat instant noodles (much), and I moved out of my moms house years ago!

    But while I'm mentioning it, if you really want to step up your game, how about decreasing the noise levels in your final image beyond what your camera is capable of doing in one shot?

  • Tyler Ingram May 9, 2013 06:53 am

    What about making use of the Hyperfocal Distance? Isn't that supposed to help bring more of the foreground and background into focus? Might help those who don't want to have to rely on focus-stacking an image. Though you would have to calculate the distance to focus on and then sort of rough estimate it with your camera unless you brought a very long tape measure ;) Though there are apps that will also help calculate the distance to focus at etc.

  • sillyxone May 8, 2013 11:13 pm

    link to Hugin/Enfuse tutorial for those of us who still live in mom's basement and eating instant noodle :-D (not meant to hijack, at least one person asked for Photoshop's alternative):

  • sillyxone May 8, 2013 09:47 pm

    The free/open-source Hugin can also perform focus stacking very well (using Enblend engine) beside being excellent at stitching panorama. So, with Hugin, you can take multiple set of panorama of different focus and Hugin will do it all for you.

  • Steve May 8, 2013 05:39 pm

    This is a good technique and can be used with 'bracketing' to also balance out shadows and highlights

  • Mridula May 8, 2013 05:16 pm

    I keep coming back to DPS because there is always something new to learn, I don't think I will try this, I am very low on processing but it always amazes me to see what all is possible!

  • mehrdad May 8, 2013 12:58 pm

    @ScottC you can use Gimp(it's free) with advice for Elements. ie manually painting and blending photos

  • Evan R May 8, 2013 08:32 am

    Please take a look!

  • ScottC May 8, 2013 08:29 am

    Any advice for lightroom? I don't have the scratch for photoshop, not a complaint....