Focus Stacking with the lumix GH5Written by Paul Bourke
Focus stacking is the process by which multiple photographs, each with a different focal plane, are combined into a single image with an overall deeper depth of focus. The most common application is in macro photography where the object is close to the lens and the depth of focus does not extend across the depth of the object. While using limited depth of focus is often an artistic/composition choice, there are other applications such as digital recording for archive purposes where having all depths in focus is desirable. The interest for the author is the photography of small small objects for the purpose of 3D reconstruction.
The Lumix GH5 has two builtin focus stacking modes they both automatically scan across the focus range. In one mode (focus stacking) one can save individual frames by choosing focus depth, or merge the images in the camera to achieve a wide focus range. In addition to the individual images one might save, the result in the form of a mp4 movie is saved on the SD card. This makes one suspect the image quality may not be as good (probably using the 4:2:2 or 4:2:0 compression the other video modes use).Examples
In the other mode one can choose the number of focus steps and the separation between each step, this is accessed through the focus bracketing mode. Unfortunately this separation is in some undocumented step so some trial and error is required. In this mode one just gets N images, one at each focus setting, and use a third party focus stacking software to combine the images.Examples
In the following examples, two lenses are used, a 100mm macro attached to the camera and a 50mm prime attached in reverse to the 100mm lens.