If you’ve learned about photography and found out about camera settings, you’ll know that the aperture setting controls how much of a scene is in focus. Adjusting the aperture controls how wide the opening in the lens is; opening it wide with an aperture like f/2 means that only a very narrow range of the photo is in focus, while “closing it down” to an aperture like f/22 makes the focus range much deeper.
Compare these two photos. The first was shot using an aperture of f/8, so the mountains are out of focus. Closing the aperture down to f/16 for the second photo makes the depth-of-field greater, allowing the mountains to be more in focus.
The relative proportions in the image when using a telephoto lens or wide-angle lens affect the depth-of-field differently. When compared to a longer focal length, a wide-angle lens appears to have a much greater depth-of-field. This is partially a trick of the eye, but it’s also caused by the way in which the lens distorts the image by diffracting the light differently.
The logical solution to get objects in the foreground and in the background in focus at the same time is to use a narrow aperture like f/22. This works well, but unless you’re using anything but an insanely expensive, high-quality lens, you’ll find that the diffraction caused by closing the aperture rings down until they form a tiny hole will make the entire image less sharp than it could be.
Back in 2012, I took some test shots with a Sigma lens at various apertures, which showed the problem clearly. Although concerns about sharpness in my photos led me to do the comparisons, the level of difference in sharpness was quite surprising. By closing down the aperture and gaining an overall depth-of-field, the sharpness of the image was completely ruined.
So, how do we get around the problem? Watching videos by landscape photographers like Nick Page, Gavin Hardcastle and Thomas Heaton have helped me to work around the issue by focus stacking. This video by Thomas goes into detail with an example image from the north east of England.
The basic principle is to take multiple photos of the same scene, each of which is focused on a different point in the scene. Then, when editing the photo, layer the images on top of each other in Photoshop and mask the part of each layer which isn’t sharp. This is the technique I used for this wide-angle view of crocuses in the Jungfrau Region, which means that both the flowers and the distant mountains are tack-sharp.