IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Richardson-Lucy deblur 2dSee full documentation
imagerichardsonLucyDeblur2dImg (inImg,inNbIter,inStdDev)
imagerichardsonLucyDeblur2dImg (inImg,inNbIter,inStdDevX,inStdDevY,inOptSmoothingGaussianCoverage)

Detailed Description

2d image deblur algorithm using Laplacian kernels based on the Richardson-Lucy algorithm

Two dimensional image deblur algorithm based on the Richardson-Lucy algorithm.

This is an iterative algorithm wich can be described as follows :

\[ f^{n+1} = f^n H \left( \frac{InImg}{H f^n} \right) \]

Where $f^n$ is the calculated image at the iteration $ n $, $ f^0 = InImg $ and $ H $ is the blur filter (PSF). It is assumed that the PSF is a Gaussian filter. Thus, it is possible to specify the parameters of the Gaussian (see Gaussian Smoothing 2d for more details).

Defining more than 10 iterations does not provide an interesting ratio between edge-enhancement and calculation time.

Here is an example of a deblurring operation applied to two 8-bits different images:

richardsonLucyDeblur2d_lena.png
richardsonLucyDeblur2d_eye.png

(second image by Ru_dagon (Own work) [GFDL (http://www.gnu.org/copyLeft/fdl.html), CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/ ), via Wikimedia Commons])

See also
"A Comprehensive Study on Fast image Deblurring Techniques", Z. Al-Ameen et al., International Journal of Advanced Science and Technology, Vol. 44, pp. 1-10, 2012.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# richardson and lucy deblur filter 2d computation
outImg = filter.richardsonLucyDeblur2dImg(inImg, 5, 1.0)

Example of C++ code :

Example informations

Header file

#include <IPSDKIPL/IPSDKIPLFiltering/Processor/RichardsonLucyDeblur2dImg/RichardsonLucyDeblur2dImg.h>

Code Example

// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// compute laplacian based deblurring on input image
ImagePtr pOutImg = richardsonLucyDeblur2dImg(pInImg, 10, 1.0f);