Using the Olympus OM-D E-M1 for Focus Stacking

(updated September 2019)


Stacked photo of Fly's eyes

Return to Home Page


When I first became interested in photographing butterflies, I soon realised that a macro lens was a valuable asset. For working 'in the field', it is best to choose one with a longer focal length, since it allows sufficient 'working distance' to avoid disturbing a living insect. For my Pentax and Nikon systems, I used a Tamron 90mm macro lens, sometimes with the addition of a 1.4X teleconverter, to increase the working distance at any given magnification.

One major problem when taking macro photographs is the issue of 'depth of field'. When using a lens to provide a magnified image at a short working distance, very little of a three-dimensional subject can be kept in focus at the same time, unless a very small aperture (high f-number) is used. This creates two difficulties – firstly, it means that a slow shutter speed (or powerful flash) must be used, to capture sufficient light from the subject, and secondly, a small aperture reduces the sharpness of the image, through the effects of diffraction. (for further information on diffraction see

I have now changed to using an Olympus OM-D E-M1 camera and one of its important features is the ability to 'stack' macro photos automatically. This is a technique that can overcome both the depth of field and sharpness problems.

Orchid - Pleurothallis hirsuta
Pleurothallis hirsuta
Stacked flower image - Olympus 60 mm lens at f/6.3

8 images stacked

Photo Stacking

'Stacking' is a technique by which several images are captured, each with the focus set at a slightly different point within the 'depth' of the subject. The resulting 'stack' of images is then processed digitally, to create a final image in which all parts of the subject appear to be 'in focus' at the same time. Two things are necessary for this technique to work: the subject must not move between the separate exposures, and the focus steps must be sufficiently small that the individual images can be combined together without any obvious 'steps'. To achieve the best results, the camera needs to be mounted on a tripod

Orchid - Lepanthes adrianae
Lepanthes adrianae
Stacked flower image - Olympus 60 mm lens at f/5.6

8 images stacked

The Olympus system simplifies the whole process, by automating the steps needed to create a 'stack' of exposures and then processing them to a final image within the camera. To enable the automatic system to work, the E-M1 camera must be used with one of a select range of lenses. For more information about the requirements in the Olympus system, see

In my case, I use the Olympus 60 mm macro lens (equivalent, in terms of working distance, to a 120 mm lens on a 35 mm camera). I use either natural light or, sometimes, a ring-light mounted on the front of the macro lens, as shown below:

Macro setup for Photography
Macro ring-light on Olympus 60 mm lens

Setting up the Olympus E-M1 for Image Stacking

In the Olympus system, 'stacking' is implemented as an extension of the idea of 'bracketing'.  The first step is to enter the 'Shooting Menu 2' option for 'Bracketing' and turn bracketing 'on'. This opens up a list of options, such as 'exposure bracket (AE BKT)' and so on, with 'focus bracket (Focus BKT)' at the end of the list. After turning focus bracketing 'on', a further sub-menu appears, where 'Focus Stacking' can be turned 'on'. This is the mode which makes the camera produce a stacked image automatically.

Originally, the'number of shots' was limited to 8 but the latest firmware (v.3) for the E-M1 Mk.ii allows up to 15 shots to be selected.. Overall, the exposures are made in about 1-2 seconds, using the electronic (silent) mode of the camera's shutter. There is an option increase the interval between exposures by adjusting the 'charge time' setting, to allow a flashgun to re-charge.

After this stage, the user can set the 'focus differential' on a scale from one to ten. Making a sensible choice requires further understanding of the meaning of this scale, which is determined by the properties of the lens that is being used.

Focus Bracket Setting
Focus BKT Menu

The numbers on the scale are linked to the depth of field, calculated by the camera for both the lens focal length and the aperture selected by the user. If '1' is chosen, then, after making the first exposure, the focus setting of the lens is changed by an amount equal to the depth of field, and the second exposure is made automatically.  If higher numbers are chosen for 'focus differential', the focus setting is changed by 2-times, 3-times, etc. the depth of field between each of the eight exposures. After collecting the individual images (which can be RAW or JPEG), the camera proceeds to merge the images, by combining the 'in-focus' sections from each individual exposure. The final result is saved as a JPEG-only 'stacked' image, together with all the individual images, onto the memory card. Thus, each 'stacked' operation results in several images being recorded on the memory card.  If you only want to use the 'stacked' result, then all the intermediate images can be deleted.  Alternatively, the intermediate images can be stacked using computer software.

For a final result that retains the full 'sharpness' capability of the lens (at the chosen aperture setting) then the 'focus differential' should be set to '1' but this choice only extends the overall depth of field to 8X that of a single (unstacked) image. In practice, a higher differential can be selected without any noticeable loss of sharpness between the focus steps, especially if the result is only to be viewed as a small print or 'on screen'.

Experimental Results

In order to assess the effects of choosing different differential settings, I carried out a series of tests, using a graduated scale as subject. The scale was laid on a flat surface with the camera looking down obliquely along the scale. These tests were all made with the earlier firmware which only allowed 8 shots to be taken.  The following image shows the results from some of these tests.

Stacked Macro Images
Image Series from Olympus E-M1 with 60mm lens
 at two different apertures

On the left-hand side, I show results when using an aperture of f/5.6 with my Olympus 60 mm macro lens. The eight individual exposures are shown side-by-side and, in each case, I determined by eye the sharpest point of focus. This point is marked with a yellow spot on each image. To the right of these 8 exposures, I show the 'stacked' result, saved by the camera as a JPEG image.

On the right hand side, I show the same information but with my macro lens set to an aperture of f/8.

The first exposure (labelled '1') was made at the focus point I chose initially. I used manual focus, with a magnified viewfinder image, to set the initial focus as accurately as possible. After that, it can be seen, from the images, that the camera moved the focus point forwards, for exposure '2' and then made the rest of the exposures at steadily increasing distances.

When I examined the original 'stacked' images, at actual size on my computer screen, it was hard to detect any loss of sharpness between the focus points at a differential setting of '3'. Examining closely, a very slight loss could just be seen at a differential setting of '5' and this became increasingly obvious at higher differential settings.

Comparing the results from the two aperture settings demonstrates how the camera has compensated automatically for the greater depth of field at f/8, by increasing the distance steps between the individual exposures.

I have subsequently re-plotted the above data by reading the focus distances directly from the Olympus EXIF data, attached to each image file, where the focus distance is recorded to the nearest 5mm:

Stack Focus Distances
Focus Distance at each Step, from Image EXIF Data

Practical Considerations

As a result of my experiments, I have concluded that differential settings between 3 and 5 are appropriate for many purposes. If the coverage of a large range of distances is more important than overall sharpness, then higher settings can be used but there will be visible fluctuations in the sharpness of the image across the range.

All these results were obtained with the camera mounted on a tripod, which is essential for high-magnification macro images. Because the camera takes the images by means of its silent electronic shutter, exposure times longer than 1/8 second cannot be used. This needs to be taken into account when lighting the subject, to ensure that longer exposures will not be required.

It is also possible to use automatic stacking in the field, to keep subjects at different distances in focus together. In these less demanding circumstances, I have found that the software can cope with slight movements associated with hand-held photography, although it is advisable to use some sort of steadying support, such as a monopod.

Inkpen Crocus Field
Inkpen Crocus Field - Stacked Image

Any movement of the subject itself cannot, however, be compensated by the stacking software and may result in a double image, as shown blow:

Stacking Error
Stacking Error due to Subject Movement

Another aspect of the stacking software is that the final image is slightly 'cropped' from the original images. Presumably, this is to allow for the changing viewpoint as the lens moves between focus settings. Because of this, is is important to compose the initial image so that there is a margin around the subject, to allow for the crop. The latest firmare (v.3) for the E-M1 Mk.ii helpfully displays the crop lines in the viewfinder display.

Cropped Image during Stacking
Effect of Crop during Stacking


I believe that automatic stacking is a valuable feature for photography of static subjects, such as flowers. There are limitations, as noted above, which have to be learned and taken into account but, overall, this is a very convenient way of achieving sharp images over an extended depth of field.

Apart from its use for macro photography, stacking can also be used 'in the field', to keep subjects at different distances in focus, simultaneously.

I should also mention that the 'focus bracketing' feature can be used without enabling the 'focus stacking' feature. If 'Focus Stacking' is turned 'off', then up to 999 images can be taken automatically, in a series of focus steps extending outwards from the initial focus point. These images cannot be combined in the camera but can be used to create 'stacked' images, by means of separate computer software.

Focus bracketing can be useful for high magnification images, where a wide aperture is needed, to provide maximum resolution, together with a large number of steps, to cover the depth of the subject.  This photo of the eyes of a fly, shown at the top of this page, used 12 steps at an aperture of f/2.8 and the resulting images were 'stacked' by using CombineZP software in my computer:

©Mike Flemming, rev2. September 2019

Return to Home Page