Infinite Depth of Field

Depth of field (DOF) is a very important issue in photography. In many cases, a very large DOF is desired. For instance, this is often the case in landscape photography.

However, this immediately causes technical problems. The usual solution is to stop the lens down to its smallest aperture. This maximizes the DOF, but the small aperture also significantly degrades the quality of the image due to diffraction.

Wouldn’t it be nice if it were possible to get an extended DOF without any lose of image quality? Well, with a little bit of planning, an infinite DOF is possible. The trick here is that several shots of the subject are taken (preferably with the camera on a tripod). Each shot is focused at a different distance. That way, every point in the scene is in sharp focus in at least one of the images. This can all be done at apertures that suffer little image degradation due to diffraction (the middle apertures for most lenses). When using this technique, it is important to lock down the exposure and white balance so that they are the same for every shot.

At first, it might appear that it would be difficult putting all those images together, carefully aligning the images, figuring out which image is sharpest for each point in the scene, and creating a final image. Actually, this is a very simple workflow. Photoshop will do almost all of the hard work.

The Process

The process of combining the images in Photoshop is a six step process.

1. Each image is opened in Photoshop (if using a raw converter, each image must be processed in exactly the same way).

2. All of the images are moved into the same file. This can be done by dragging and dropping the images into one of the open files. The result is a single file with each of the images as a separate layer.

3. Next, it is necessary to make sure that all of the images are perfectly aligned. If the images were shot on a tripod, it might be tempting to think that the images are already aligned. However, this might not be the case (especially if the camera was touched for manual focusing). Luckily, Photoshop can align the images. To do this, the layers are selected by pressing Control+Alt+a on a PC or Command+Option+a on a Mac. Then, the layers are aligned by choosing Edit/Auto-Align Layers (the Auto option is used).

4. The images are now ready to be blended. In this step, Photoshop will analyze the layers to determine which layer is sharpest at each point in the image and will create masks for each layer based on the analysis. With the layers still selected, choose Edit/Auto-Blend Layers and choose Stack Images. It is also suggested that Seamless Tones and Colors be left unchecked. Yes, it does sound like a really good thing to check. However, if this box is checked, Photoshop will try to match the colors of the layers on an area by area basis determined by the masks that get created. In other words, areas that are not masked out get affected but the other areas are not affected. This may create localized color shifts that may cause color problems later. So, it is best to leave the box unchecked.

5. After the blending, there may be a bit of white along some of the edges that is a result of aligning the images. Consequently, the next step is to crop the image. This can be done by fitting the image on the screen by pressing Control+0 on a PC or Command+0 on a Mack, drawing a rectangle around the image with the Crop tool, and hitting the Enter key.

6. The last step is the cleanup. This is necessary because, while the Photoshop blending is pretty good, it is not perfect. There may be a few places where the image detail was not taken from the sharpest image. When this is the case, the best way to clean up any problems is to identify the layer with the sharpest detail in the problem area. Then, paint white on the mask of this layer in the problem area. It will also be necessary to paint black in the problem area on the masks of all of the higher layers. One other point is that it is usually easiest to determine which layer has the sharpest detail for a problem area by first disabling all of the layer masks. Then, the layers can be clicked off and on until the sharpest layer is found.

There are a few caveats with this technique. Obviously, the technique can only be used with objects that are not moving. Also, the camera will need to be manually focused for each of the multiple shots. The last caveat is that it is better to take several shots, each with the focus point moved only slightly from the previous shot, rather than take only a few shots with significantly different focus points. This will guarantee that there will be no out of focus points in the final image.

4 Responses to “Infinite Depth of Field”

  1. Lyndia says:

    Thanks for the lovely blog, even if it took quite a long time to understand. (English is not my national tongue) May I ask where you got your information from? Thanks! Lyndia

  2. Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of writing? I have a presentation next week, and I am on the look for such information.

  3. frank d says:

    This is wonderful tutorial

  4. Great theme! Did you make it yourself?

Leave a Reply

*