Single-image Deblurring (Motion PSF Estimation)
[Click to
download a package with the executable and examples]
This is an command-line executable for
single image blind
deconvolution (including motion PSF estimation). The command is:
deblur.exe inFileName
outFileName kernelWidth kernelHeight noiseStr deblurStrength gamma
weight1 weight2 weight3 weight4 weight5
Examples
Type "deblur Examples/picassoBlurImage.png Examples/picassoOut.png 27 27
0.008 0.2 1 0 0 0 0 0" in the command line and press ENTER.
It is also allowed to omit the last 6 parameters and
the command can be like "deblur Examples/picassoBlurImage.png
Examples/picassoOut.png 27 27 0.008 0.2". The last 6 parameters in this
case will use default values.
There are two blurred images in the package.
Deblur them respectively by executing the corresponding .bat file in the
Windows.
Parameter Definition
inFileName
|
the file name of the blurred image (.bmp, .png, and .jpg
files are supported)
|
outFileName
|
the file name of the output image (.bmp, .png, and .jpg
files are supported)
|
kernelWidth
|
the estimated width (in pixel) of the blur kernel
|
kernelHeight
|
the estimated height (in pixel) of the blur kernel
|
noiseStr
|
measuring the level of image noise, 0.01 by default
|
deblurStrength
|
a parameter affecting the completeness of deblurring, 0.2 by
default
|
gamma
|
for gamma correction, 1 by default
|
weight1~weight5
|
parameters for suppressing ringings, 0,0,0,0,0
by default
|
Parameter Tuning
We suggest tuning the
parameter "noiseStr". In many cases, you can simply use the default
values for all others parameters. The guideline is as follows.
kernelWidth/kernelHeight
|
large enough to contain the ground truth PSF
|
noiseStr
|
between [0.002, 0.5]
|
gamma
|
between [1, 2.5]. gamma=1 means no gamma
correction.
|
System Requirement
Windows XP, 2003 Server, or
7.
The required memory and the computational time
depend on the size of the blur image and the estimated kernel. For
the "Picasso" example with size 800x532, the peak memory requirement
is about 490 Megabytes.
Version Information
Distribution Version 1.0. We have optimized the
code and fixed a number of bugs causing memory leak. A few
parameters are automatically adaptive or with fixed values to reduce
the difficulty of hand tuning.
This program
was extensively tested, but is still not guaranteed to be bug-free
and work properly with all versions of Windows. It is for
education and research ONLY. The algorithm is based on "High-quality
Motion Deblurring from a Single Image" published in SIGGRAPH
2008.