Infinite Depth of Field

Digital photography opens up new possibilities for depth of field. While optical solutions such as Tilt & Shift lenses exist, there is a simple technique for merging multiple exposures into one image to create a practically unlimited depth of field.

Problem Image


Here is an example of an image taken in Death Valley that cannot be captured using the traditional approach of stopping down. The focal point was taken 1/3 of the way in to the image at f22 using a 14mm lens. Even with the extreme depth of field of this combination, both the foreground sand and the mountains are out of focus.


100% crop from top of image



100% crop from bottom of image


Creating Infinite depth of field images

The solution to this image is to take three images and merge them in Photoshop. The first image focused close to the camera, the second focused in the middle of the sand dune and the third focused on the mountains. While taking the three images it it critical to keep the same aperture.


Near focus image

Mid focus image

Far focus image


Open all of these images in Photoshop as layers. If you use Lightroom, this is easy – just select all three images, Control-Click (right click) and select Edit In -> Open as Layers In Photoshop. If you don’t use Lightroom simply open all three images in Photoshop and copy all three images into multiple layers in a single image. Rename the layers Near, Mid, and Far. Put the Far layer on the bottom, and the Near image on top.

Select all three layers and choose Edit -> Auto Align Layers -> Normal – this will line up the all of the layers.

Add masks to the Mid and Far layers by selecting the layer and clicking on the “Add Vector Mask” icon.

Now select each mask by clicking on the mask and then invert the mask by hitting Command-I .

Select the Mid mask and choose the brush tool. Make sure the brush color is white, opacity is 100% and the flow is 50%. Make the size of the brusg about 20% of the height of the image.

Now draw the mask on to the middle portion of the image. Setting the flow to 50% will allow you to feather the edges of the mask. You might find it helpful to see the mask overlayed on the actual image – toggle the mask preview by pressing the “\” key.

Finally, select the Near layer and draw the mask on to the bottom portion of the image.

You now have an image with infinite depth of field.

Leave a Reply