This package performs image deblurring and alignment using a series of images (from dozens to thousands). This method is highly effective for series of many low exposure images that contiain blurring or spatial shifting of an object of interest. This task has classically been carried out using cross-correlation for and subsequent averaging. However, this method fails when the images are too noisy; perfect alignment of frames is impossible in this case and the benefit of averaging is limited. deblurTC utilizes a method in which alignment of images is implicit; in other words, alignment of the different frames is a direct result of the mathematical transforms used.
Written in C and utilizing MPI for parallelization, this scientific computing package is suitable for a computing cluster. This package was originally developed and used for speckle interferometry by astrophysics studying the sun and was originally coded by Friedrich Wöger and Oskar von der Lühe II: http://proceedings.spiedigitallibrary.org/proceeding.aspx?articleid=1336991
This package was developed and altered by Blake Milner and Wen Jiang as part of a project through Discovery Park at Purdue.
The portions of this code pertaining to astrophysics (such as telescope diffraction, modeling of atmospheric aberrations, etc.) has been stripped out to allow for general use.
This method first transforms all frames into their Bispectrum - a type of 4-D power spectrum that is the Fourier Transform of the Triple Correlation (related to regular correlation used to register images). The Bispectrum is insensitive to translations of the original object. From this Bispectral average, the phase component of the original object can be reconstructed in an iterative fashion, thus undoing any effects due to translation or blurring of the image. The averaged Bispectrum can then be combined with the reconstructed phase and transformed back into the space domain, producing a single, deblurred image that is a composite of all frames.
The method has been well-established since the 60's in the field of astrophysics: http://adsabs.harvard.edu/abs/1993A%26A...278..328H
Other papers detailing the original code base and the mathemetical theory behind this method:
-
Speckle Masking (using bispectrum) paper: Lohmann, A. W., Weigelt, G., Wirnitzer, B., “Speckle masking in astronomy: triple correlation theory and applications,” Applied Optics, Vol. 22, Issue 24, pp. 4028-4037 (1983).
-
Paper discussing phase recovery algorithm: Matson, C., “Weighted-least-squares phase reconstruction from the bispectrum,” J. Opt. Soc., Vol. 8, No. 12 (1991).
-
Paper by authors: Woeger, F. and von der Luehe, O., “KISIP: A Software Package for Speckle Interferometry of Adaptive Optics Corrected Solar Data,” SPIE 7019 (2008).
-
Speckle Interferometry paper by authors (including kisip): Woeger, F., von der Luehe, O., and Reardon, K., “Speckle interferometry with adaptive optics corrected solar data,” Astronomy & Astrophysics 488, 375-381 (2008).
-
Thesis discussing speckle reconstruction and kisip: Mikurda, K., “High Resolution Spectroscopy of Photospheric Bright Points,” Albert-Ludwigs University (2005).
Requirements:
- OpenMPI -- An open Message Passing Interface Library
- FFTW -- Fastest Fourier Transform in the West
- GSL -- The GNU Scientific Library
- CMake -- A cross-platform, open-source build system
Building and installing:
ccmake CMakeLists.txt
cmake CMakeLists.txt
make
make install
Command-line usage:
./deblurTC _SWITCH_ _ARG_ ... _FRAMES_
Image format:
Unfortunately, this software package does not yet support typical image formats. Image inputs must be a plain, binary, greyscale image format that uses 4 bytes for each pixel.
Command-line options:
--o (-output) NAME
name of output file
--x (-xsize) XSIZE
number of x-pixels in each frame
--y (-ysize) YSIZE
number of y-pixels in each frame
--h (-headersize) HSIZE
number of bytes in header of each frame (will be skipped)
--s (-subsize) SSIZE
side length of square subfields used to dissect image, later sent to
different slave nodes. Must be a power of two - otherwise, will be rounded
to nearest power of two.
--v (-bs1length) BS1LENGTH
length in u-direction of bispectrum (translates to increased resolution of
final image).
--u (-bs2length) BS1LENGTH
length in v-direction of bispectrum (translates to increased resolution of
final image).
--r (-maxrad) MAXRAD
maximum phase reconstruction radius (translates to increased resolution of
final image).
--p (-maxiter) MAXITER
maximum number of iterations for phase reconstruction algorithm.
--e (-weightexp) WEXP
value of exponential power used during phase reconstruction (Advanced).
--a (-apod) APOD
percent of field that is windowed before transformation to bispectrum
(between 0 and 100). Image must be apodized to prevent artifacts in final
image, though too much may degrade quality.