IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Difference of Gaussian based Laplacian deblur 2dSee full documentation
imagelaplacianDoGDeblur2dImg (inImg,inStdDev)
imagelaplacianDoGDeblur2dImg (inImg,inStdDev,inOptStdDevFactor,inOptSmoothingGaussianCoverage)

Detailed Description

2d image deblur algorithm using Laplacian kernels based on a difference of Gaussian approximation

Two dimensional image deblur algorithm based on an approximation of the Laplacian filtering. Hence, the algorithm needs the parameters of the Laplacian filter, at least the input standard deviation $ \sigma $. The restored image $ OutImg $ is computed as follows :

\[ OutImg = InImg + \left( InImg \ast LK \right)\]

Where $ \ast $ is the convolution operator, $ LK $ is the Laplacian kernel and the Laplacian DoG 2d filtering algorithm is used to compute $ InImg \ast LK $.

The principle of the debluring algorithm is illustrated as described in the following figure in the 1d case :

laplacianDeblurPlot.png

The convolution of the blurred signal with the Laplacian kernel (in red) is added to the blurred signal itself (in black). The edge is enhanced in the resulting signal (in green).

The algorithm yields edge-enhanced images with ipsdk::imaproc::attr::InStdDev < 1.2, ipsdk::imaproc::attr::InOptStdDevFactor > 1.4 and an gaussian ratio > 0.7 (see ipsdk::imaproc::attr::InOptGradientGaussianCoverage).

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

laplacianDogDeblur2d_lena.png
laplacianDogDeblur2d_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)
# laplacian difference of gaussian deblur filter 2d computation
outImg = filter.laplacianDoGDeblur2dImg(inImg, 1.5)

Example of C++ code :

Example informations

Header file

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

Code Example

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