Graphic STI
logo EPFL
Text EPFL
english only
Biomedical Imaging Group
Imaging Web Demonstrations
BIG > Demos > Extended Depth of Field
CONTENTS

Home Page

News

Events

Seminars

People

Research

Publications

Tutorials and Reviews

Demos

Extended Depth of Field

Extended Depth of Field

EDF illustrationDue to the limited depth of field of brightfield microscopes, it is usually impossible to image large 3-D organisms and objects entirely in focus. By optically sectioning the specimen, however, the in-focus information at the specimen's surface can be acquired over a range of images, which can then be processed to generate a single in-focus image. We have developed different algorithms to achieve this, and provide free software that implements and demonstrates these methods.

Algorithm Outline

The idea is to merge a stack of micrographs taken at different focal positions (aligned along the optical axis) into a single, entirely focused composite image, as illustrated on the right. Traditional extended depth of field algorithms rely on a high-pass criterion that is applied to each image in the stack; in-focus regions are then identifed based on local energy. An efficient approach consists in using a wavelet transform, where a selection rule based on maximum absolute coefficient values leads to good results. Our complex wavelet-based method expands on this concept and demonstrates state-of-the-art performance for this class of algorithms. Unfortunately, the topography provided by these techniques is limited to a map of selected in-focus pixel positions and is inherently discretized along the axial direction, which motivated the development of a more advanced approach based on an image formation model.

Interpretation of the composite extended depth of field specimen can be difficult; to this end we provide software for the 3-D visualization of in-focus image/topography pairs. Such pairs can also be visualized using anaglyphs.

Complex wavelet-based method

Model-based method

Principle

The complex wavelet transform leads to improved extended depth of field results over other wavelet-based approaches. In order to further improve the quality of the results, we introduced post-processing steps that enforce local smoothness of the topography, avoid saturation and accumulation of noise further improve the quality of the results. In order to process color data efficiently, an RGB to grayscale conversion method that preserves contrast and intensity has been implemented; in this way, the selection of in-focus pixels is performed in a single channel. The color values of the composite image are then retrieved from the original stack.

Reference

B. Forster, D. Van De Ville, J. Berent, D. Sage, M. Unser, "Complex Wavelets for Extended Depth-of-Field: A New Method for the Fusion of Multichannel Microscopy Images," Microsc. Res. Tech., 65(1-2), pp. 33-42, September 2004.

Principle

In order to recover an accurate, continuous representation of the specimen topography, extended depth of field is stated as an optimization problem where the texture and topography are jointly estimated in an iterative process. Image formation is modeled as the convolution of a thick specimen model with the microscope's point spread function. The method acts as a deconvolution when the in-focus PSF has a blurring effect, or when the true in-focus position falls in between two optical sections. The resulting in-focus composite image and topography are of very high quality, albeit at a larger computational cost when compared to wavelet-based approaches.

Reference

F. Aguet, D. Van De Ville, and M. Unser "Model-based 2.5-D deconvolution for extended depth-of-field in brightfield microscopy," IEEE Trans. Image Process., 17(7), pp. 1144-1153, July 2008.

Software

Software

Features

This software implements different wavelet-based algorithms for extended depth of field. Two interfaces are provided for adjusting the algorithm parameters: a simplified, easy-to-use mode and an expert mode that gives access to the complete set of parameters. A 3D topology viewer plugin is inlcuded.

This software was developed by Alex Prudencio, Jesse Berent and Daniel Sage (contact). The 3-D view was developped by Kai Uwe Barthel.

Demo applet

Try our web demo, which allows you to apply the extended depth of field to a specific z-stack of images. You can adjust the parameters and rerun the algorithm.

ImageJ plugin

  1. Download and install ImageJ.
  2. Download the plugin Extended_Depth_Field.jar (version 11.07.2011) and place it in the "plugins" folder of ImageJ.

The whole process should not take more than a few minutes.

ImageJ plugin developer distribution

  1. Download and install ImageJ.
  2. Download the plugin package EDF.zip (version 11.07.2011) and unzip it.
  3. Place the "EDF" folder in the "plugins" folder of ImageJ.

The whole process should not take more than a few minutes.

  • The plugin is callable from an ImageJ macro, in "easy" mode.
  • The parameters are described and an example is given in EDF-demo.txt

Instructions

  1. Launch ImageJ and open an image stack. Select "Plugins > Extended Depth of Field > Easy mode..." for a simplified user interface, or "Expert mode..." for more control over the parameters.
  2. In "easy" mode, select a trade-off between quality and processing speed, as well as the desired level of smoothness for the topography.
  3. Click on the "Run" button and wait for the output.

Features

This software implements our new, model-based algorithm for extended depth of field. The following functionalities are provided:

  • Joint estimation of the in-focus composite image and topography of the sample.
  • Generation of simulated EDF acquisitions, given a texture and topography.
  • 3-D visualization of the in-focus texture-mapped topography.

Developed by François Aguet.

ImageJ plugin

  1. Download and install ImageJ.
  2. Download the plugin edf_3D.jar (version 28.11.2008) and place it in the "plugins" folder of ImageJ.
  3. Download the package ijtools.jar (version 25.07.2008) and place it in the "plugins" folder of ImageJ.

Instructions

  1. Launch ImageJ and open an image stack. Select "Plugins > Edf3D".
  2. The "PSF parameters" panel controls the behavior of the point spread function. These parameters might need to be adjusted in order to produce a satisfying result.
  3. Select an input stack in the "EDF" panel and click on "Run".
  4. After the result appears, select the appropriate texture and topography in the "3-D visualization" panel, and set the correct ratio for the "x" and "z" sampling steps. Click on "Display" to launch the 3-D visualizer.
  5. In order to generate phantom data, select an appropriate texture and topography in the "Forward model" panel, select the desired number of slices, and click on "Generate". The result depends on the PSF parameters.

Conditions & terms of use

Applications

Mattheddleite

The images are courtesy of Rick Turner, British Micromount Society.

These images was obtained using an Olympus DP12 camera attached to a Wild M7A stereomicroscope. FoV is approx 1mm. The light blue is the mattheddleite, the dark blue linarite, and the white mostly leadhillite. The specimen comes from Red Gill Mine, in the English Lake District. The whole stack is composed of 10 color images of 1024x768 pixels.

View results ...

Image stack of a fly's eye

The images are courtesy of Philippe Thévenaz, EPFL, Lausanne

The whole stack is composed of 32 14-bits images of 1280x1024 pixels. The images have been realigned first using: StackReg our registration software.

The huge dataset of original images can be provided on request.

View results ...

Study of the imapact of laser welding

The images are courtesy of Thomas Sidler, EPFL, Lausanne.

The whole stack is composed of 13 color images of 1024x768 pixels.

The huge dataset of original images can be provided on request.

View results ...

Study of the retinal pigment epithelium

The images are courtesy of Peter Lundh von Leithner and Heba Ahmad, Institute of Ophthalmology, London.

The whole stack is composed of 4 color images of 1024x768 pixels.

View results ...

Mouse intestin's Peyer's patches

The images are courtesy of Nathalie Garin, ISREC, Lausanne.

The whole stack is composed of 20 color images of 1996x1450 pixels. Images shows mouse intestin's Peyer's patches.

The huge dataset of original images can be provided on request.

View results ...

Pancreas

The images are courtesy of Claude Bonnard, ISREC, Lausanne

Stack of images of a pancreas.

The huge dataset of original images can be provided on request.

View results ...

 

Technical issues

Performance

The Extended Depth of Field plugin implements some other algorithms also mentioned in the reference. The table below shows some performance results comparing the different algorithms.

Performance results (tests were performed on a Pentium 4, 3Ghz, 1GB RAM computer)
  Memory Elapsed Time [s]
low resolution (256 x 256 pixels, # Slices = 15)
high resolution (1024x1024 pixels, #Slices=15)
Sobel
~3 times the stack size
3
34
Variance
~3 times the stack size
4
56
Real Wavelets
~3 times the stack size
5
83
Complex Wavelets
~8 times the stack size
23
385

 

Windows and Macintosh Screenshots

screenshot screenshot

 

3D visualization

Anaglyphs

Another option for 3-D visualization of the topography is to use the Anaglyph ImageJ plugin written by Gabriel Landini. This plugin creates (color or greyscale) red-cyan or red-green anaglyphs, stereo pairs (crossed view) and depth map images from the topography and in-focuse image generated by the Extended Depth of Field plugin. Details and lastest version of the plugin and can be obtained at G. Landini's Software page.