waveblend - Focus enhancing by image fusion using the dualtree complex
by Sebastian Nowozin
Waveblend is a tool implementing an image fusion algorithm. It can combine a
number of input pictures having all the same size into one output picture.
While this could be useful for a number of purposes, waveblend focuses on only
one: to enhance the focus of the combined image.
Focus enhancing can be explained roughly like this: Take a number of input
images, all taken from the same point of view with different depth-of-focus
(that is, they are sharp at different depths). All the images are combined
into one image, which spans the whole depth-of-focus of all images, so that
the resulting image is "sharp" everywhere.
This has a number of applications: in microscopy, astronomy and photography
you can improve the results of a sample image by combining a number of sample
images. A description of the techniques used is given below.
Everybody likes screenshots, so here are some screenshots of waveblend.
Although waveblend is a command line program, the distribution has two
debugging output windows you can view:
This is the blending stage debugging output you get if you enable the
" option. First three input images are shown, then
the grayscale fused image (already in focus) is displayed. From this image, a
topology map is reconstructed, which is shown underneath. Finally, the fused
color image is constructed from the topology image and the input images, which
is shown as the last picture:
Another view is not shown here. When developing the complex dualtree wavelet
transform, I wrote a program to display the wavelet coefficients and wavelets.
As my implementation is modelled after the Matlab implementation (referenced
below), the debug output is similar. You can see the individual wavelet stages
by running the "TestWavelet.exe" program included in the
The program uses the complex dual-tree 2D discrete wavelet transform as
invented by Nick Kingsbury
detailed in his paper
Processing with Complex Wavelets"
. My implementation is based on the
Matlab implementation done by Shihua Cai, Keyong Li, Farras Abdelnour and
Prof. Ivan Selesnick, which is available at the
Wavelet Software website
, which I highly recommend.
The focus enhancing algorithm used is detailed in the paper
"Extended Depth-of-Focus for
Multi-Channel Microscopy Images: A Complex Wavelet Approach"
B. Forster, D. Van De Ville, J. Berent, D. Sage and M. Unser.
The whole program was developed under
, a free implementation of the
and compilers. The source is written completely in
- a .NET runtime environment, I prefer
Mono, using version 1.0 here
- a fairly recent version of
Gtk#, version ≥= 1.0
works for me
- lots of RAM: depending on the image size (but not on the number of
images). To fuse 1.2 MP images you will need at least 512MB of RAM.
I have not tested the program on Windows, but in principle it should run just
fine. You might want to try the new combined Mono and Gtk# installer Novell
Combined Windows Mono 1.0 and Gtk# 1.0 installer (19mb)
The whole program is opensource
. It is released under the
conditions of the GNU General
. The license is included in the distribution in the
'LICENSE' file. Please read and acknowledge this license before using this
Usage and Documentation
The documentation is available in the tarball in form of a README file and a
manpage. Here you can find the latest documentation as PDF and in text format:
I thank the following persons for their helpful advice, implementation of
algorithms or helpful texts:
I am curious about user-, developer- and mathematicans feedback, so please
mail me your thoughts to
last update: Monday, 12 Jul 2004