Wonderful Photo
Of The Day
Articles
About

How to Increase DOF by Focus Stacking

Focus stacking

Focus stacking can be used to increase the available depth of field in a shot. You might want to do this where you just can't get the required DOF no matter what aperture you use, or where you are using fairly open apertures to minimize diffraction softening but still want to significant DOF.

 

Flower Dew Droplets
Marguerite dewdrop refraction

First you need to download and install CombineZM.


Taking pics for a stack

You need a subject which is not moving whilst taking the photos. I tend to use fixed focus and move the camera until the first part of the subject comes into focus, take a shot, and note where the subject is just going out of focus. Then move the camera trying to keep the FOV similar and not rotating the camera until the OOF area in the previous shot just comes into focus. Continue doing this until you have covered the required DOF. If you are using a tripod (perhaps recommended for first goes at this) then do the same thing but use the focus ring to move to the next "slice".

Below are 3 shot slices for this stack of a damselfly sitting next to its exuvium (empty shell):


Close objects in focus


Middle objects in focus


Far objects in focus


Stacking the images

Run CombineZM and load the files by clicking on File -> New.


Starting CombineZM

Load in the images you wish to stack.


Loading the images to be stacked

To do the stack, click on Macro -> Do Stack


Instructing CombineZM to begin stacking

The program will then start comparing the shots, aligning them, and color matching them.


CombineZM processing

CombineZM will find detail and apply low and high pass filters before the stacked image appears.

Use the File -> Save Frame/Picture as dialogue to name and save the picture.

Blotching
Stacked and Distorted result

You'll notice that in this stacked picture, there is some distortion on the right hand side. This is normal and is caused by the slight change in FOV that has to occur in the different slices (ie. that part of the image was missing in some of the slices). You just crop this off in PP. However there is also some disappointing noise blotching in the background. You may also see some haloing (not in this example) around high contrast edges. The latter two defects are caused by misalignment of the shots. This can sometimes be helped by clicking on Stack -> Reverse order and doing the stack again. However, a more precise way of dealing with it is to align the pictures manually before doing the stack. Doing this will also correct any rotational errors present in the different slices.


Manual Alignment

Use the View -> Go to Frame dialogue.


Starting the manual alignment process

If the frames were shot in focus order, choose the middle frame as the "master" frame.


Select the middle frame

Find two readily identifiable spots which are present in all the images and are fairly widely spaced (you may need to look at the other images using the View frames to check this). Place the mouse cursor over the left point and hit the 1 key, then click on exit in the dialogue box. Place the cursor on the right hand side point and hit the 2 key, then click on exit on the resulting dialogue box.


Manually align the photos

Now use the View frames dialogue to go to another frame. Place the cursor over the LHS point and hit the 3 key, then click on exit in the resulting dialogue box. Place the cursor over the RHS point and hit the 4 key. Now instead of clicking on exit, click on Set and Use Params then click on OK in the next dialogue box


Manual alignment parameters have all been set


Click OK to confirm

Repeat the latter process on all the remaining slices (not the "master") re-using the 3 and 4 keys.

When you have finished click on Macro -> Do Stack again and let it run through.


Focus stacked macro after manual alignment

You'll see this time the image is cleaner. Save it, Do some noise reduction, and clean up the image in PP.

Here is the final stacked image:


Completed focus stack image


Dew Droplets
Focus stacked dew droplets

Brian Valentine

To view more of Brian's work, click here.