Where we require great depth of field, particularly with close up images, the mechanism of focus stacking is a great solution. As an example, the image below of the single coffee bean was captured using the Nikon 105mm f/2.8G VR Micro (Macro) lens together with the Nikon TC20E III teleconverter. The use of these two lenses together will give a total maximum magnification of 2x when the 105mm Micro lens is set at its maximum magnification of 1x. As can be seen from the single coffee bean image there is a very limited depth of field. The coffee bean was only around 5mm long and even with an effective aperture of f/40 there is very limited depth of field and it should be noted that there is also some diffraction effects causing some loss of sharpness of the image overall.

Coffee Bean

If we take quite a few images and vary the focus point using an adjustable focus rail and then combine the images during post processing then we can get a great increase in the depth of field. In the case of the image below six images were captured and all were combined in photoshop to give a final stacked image. The only change to each image was to vary the movement of the focus rail. Electronic flash was used for the lighting.

Coffee Beans

The workflow in Photoshop to get this resulting image is as follows:

  • File/Automate/Photomerge.
  • Browse for the individual files you want to merge, I usually use the Raw camera files to get the best results.
  • Deselect ‘Blend Images Together’.
  • Use Auto Layout.
  • Select all the source files and select OK.
  • After aligning all the layers, each of the layers will appear when the Layer tab in Photoshop is selected.
  • Select all the layers.
  • Select Edit/’Auto-Blend Layers’.
  • Select ‘Stack Images’.
  • Select ‘Seamless Tones and Colors’.
  • Click ‘OK’.
  • Photoshop will do its work and all layers will now blend together, after blending you will need to do any final post processing such as cropping and sharpening and then save your work.

As can be  seen from the above image the combined layers now have much more depth of field compared to the image of the single bean above.

The number of images you need to take will depend on the lens aperture used, the larger the aperture the more images you will need to take with smaller increments between each exposure. This is due to the fact that larger lens apertures will give a smaller depth of field.