Macrophotography of fern gametophytes using a DIY focus stacking system

Proposal Summary

The aim of this project is to home-build a microscope capable of photographing gametophyte ferns. The style of photography aims to produce attractive images of the sort that might normally be seen on the front of Gardeners' World Magazine, or similar.

The technique to be used is called focus stacking and Jennifer Deegan has already worked extensively on developing a system. She has taken a fairly good photograph of a gametophyte fern, using a set up that relies on a modified flatbed scanner (image below). For a full understanding of focus stacking please refer to the flatbed scanner introduction page. The aim of this current project is to significantly improve on that first image.


This project is a collaboration between many people. The principles of the design came from the forum members at The design is particularly based on the Bratcam, by Chris Slaybaugh (below). The focus block was provided as a gift by one of the forum members (Doc.Al). Some of the electronics and programming, and some of the fitting together were carried out by Tim Deegan. He also helped with the principles of the design. Jennifer Deegan did everything else.

Results Summary

The team completed the focus stacking system on time and under budget. The camera was successfully used to take sharp, deep focus photographs of ~2mm wide gametophyte ferns (below). These were a novel contribution to the published literature, as gametophyte ferns had previously only been recorded as line drawings or as photographs of flattened specimens. The team went on to win the "Biomaker Spirit" trophy at the exhibition at the University of Cambridge, Department of Engineering.

The work is published as Deegan, J., and Deegan, T., Macrophotography of fern gametophytes
using a DIY focus stacking system (2018) The Pteridologist Magazine.

The work was continued with the support of an OpenPlant grant in 2018.


The Team


Jennifer Deegan, Department of Plant Sciences, University of Cambridge
Growing and photographing the specimens, and planning and building the system.


Matthew Couchman, Computer scientist, John Innes Centre.
Technical advisor in computer science and JI source of photographic specimens.

Tim Deegan.jpg

Tim Deegan, Computer scientist, CohoData
Computer programs and electronics driving the focus stacking system.

Richard Mortier.jpg

Richard Mortier, Cambridge University Computer Laboratory.
Technical advisor in computer science and home robotics.

Project Outputs

Project Report.png

Project Report

Project report and documentation on Github


Project Proposal

Original proposal and application

Project Resources

Software Code



Updates and Further Outputs

The team have now been given an OpenPlant grant, to expand the system to cover the full range of magnifications from x5 to x50. As part of this project they will make a YouTube channel to show others how they can build and operate their own identical copy of the focus stacking system. The channel and all other documentation and images can be accessed through