Iterative Deconvolution
  <
Author: Bob Dougherty 
Installation: Download  Iterative_Deconvolution.class or Iterative_Deconvolution.java to the plugins folder.  (Windows users right-click to download.)  Requires ImageJ 1.32c or later.
Description: Plugin for convolution and deconvolution. Based, in part, on the DAMAS algorithm by Thomas F. Brooks and William M. Humphreys, Jr., NASA-Langley Research Center. AIAA Paper 2004-2954. Other references: Iterative Identification and Restoration of Images by Reginald L. Lagendijk and Jan Biemond, Kluwer Academic Press, Boston, 1991, and the discussion of non-negative least squares by Tim Cornwell & Alan Bridle in their Deconvolution Tutorial. . 

See also: Convolve 3D and Iterative Deconvolve 3D.

Special features:

  • Iteratively enforces a positivity constraint on deconvolution (this idea is from DAMAS).
  • Applies a low pass filter for regularization (filter code borrowed from Wayne Rasband/Joachim Walter's FFTFilter).
  • A "monotonic" option may improve the reconstruction.
  • Always pads the windows to avoid wrapping artifacts and not require power of 2 sizes (padding code also borrowed from FFTFilter).
  • Automatically centers the center of mass of the point spread function (helps the iteration to converge).
  • The scale of the psf is preserved in the results (important for post-processing acoustic beamforming results).
  • Limits the processing to the rectangular ROI of the image and the psf (Version 7 and on).
Usage: There are two modes of operation: Convolve and Deconvolve.  Both require an image argument and a point spread function.   Deconvolution also requires the number of iterations and the low pass filter diameter in pixels.   The convolution and deconvolution are not exactly the same as the methods built into ImageJ (FFT -> FD Math...) and Nick Linnenbrügger's DeconvolutionJ because Iterative Deconvolution always pads the window to avoid wrapping and centers the psf.  Mixing data between Iterative Deconvolution and the other methods may produce strange results, especially at the edges.   (Padding is optional in DeconvolutionJ.)

The monotonic deconvolution option is based on the heuristic assumption that successive convolutions with the psf will move the pixel values in a monotonically increasing or decreasing direction.  The input image is convolved with the (suitably normalized) psf.  If this causes a given pixel value to increase, then the original pixel value is taken as an lower limit for the reconstruction.  Conversely, if the convolution decreases a pixel value, then the original value is taken as a upper limit for the deconvolved result.   A way to remember this is to think that if convolution moves a pixel value in one direction, then deconvolution should move it the other way.  This constraint, as well as the deconvolution iteration itself, are applied with the psf normalied so the sum of its pixel values is unity.  The final gain of the psf is applied after the iteration.

Processing can be restricted to a rectangular portion of the image by selecting it with an ROI.  Also an ROI can be used to limit the psf.

Samples images:

Unblurred image. Point spread function (radius-6 Gaussian). Blurred image + noise (sigma = 1).
In this example, the blurred image was created with Process->Filters->Gaussian Blur... Radius = 6, and then Process->Noise->Add Specified Noise... Standard Deviation = 1.  (The image was scaled to 255.)  The point spread function was created by applying Gaussian blur to a point.  It would also have been possible to apply the blur using the Convolution mode of the plugin, but this seems like cheating and would not test the anti-wrapping feature.

Another source of an analytical psf is Diffraction Limit PSF.

Deconvolved images are shown below:

Iterations = 16, LP diam. = 1 pixel Iterations = 16, LP diam. = 3 pixels Iter. = 16, LP = 3, monotonic option
When running the code in deconvolution mode, the progress of the iteration is shown, along with the padded image.  The image is cropped to its normal size when the iteration is complete.

The deconvolution with a low pass circle diameter of one pixel shows one form of "breakup" that suggestes more regularization is needed.  Another sign (not shown) of instability is diagonal stripes.  The result of using a circle diameter of three pixels is roughly optimal in this case.  Increasing the circle diameter would decrease the noise in the result, but would also degrade the resolution.  Experimentation seems necessary to identify the proper circle diameter in each case.   In general, the circle should be somewhat smaller than the psf.   The number of iterations should probably be set high enough that convergence is observed, although there may be uses for partially converged runs, since the instability seems to set in late in the iteration.  The third reconstruction was made with the monotonic option turned on.

Limitation: This deconvolution technique does not converge for some point spread functions.  Non-peaked functions such as motion blur kernels appear to be particulary difficult for this method.
Versions: 0: 5/18/2004
1: 5/18/2004 Added the low pass filter.
2: 5/19/2004 Added the padding.
3: 5/27/2004 Fixed a bug that prevented the use of 8-bit psf images.
4: 5/27/2004 Added user preference saving.
5: 5/28/2004 Added the monotonic option.
6: 5/28/2004 Fixed a bug that could cause rotation/mirroring when the image was much larger than the psf.
7: 5/31/2004 Limit processing to ROI of image and psf, if ROIs exist.
7.1: 5/31/2004 Code does not unnecessarily copy the image or psf if there is no ROI.
7.2: 5/31/2004 Improved accuray of centering of psf.
8: 6/1/04 Reduced memory requirements.
9: 2/1/05 Fixed dB option.
6/2/2004 and 5/2005 Branched off.  See Convolve 3D and Iterative Deconvolve 3D.
License:

Copyright (c) 2005, OptiNav, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of OptiNav, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

ImageJ: ImageJ can be freely downloaded from the ImageJ web site.