IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Difference of Gaussian based Laplacian deblur 2d

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

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::laplacianDoGDeblur2dImg (const image::ImageConstPtr &pInImg, const ipReal32 inStdDev)
 wrapper function for 2d image deblur algorithm using Laplacian kernels based on a difference of Gaussian approximation More...
 
IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::laplacianDoGDeblur2dImg (const image::ImageConstPtr &pInImg, const ipReal32 inStdDev, const ipReal32 inOptStdDevFactor, const attr::GaussianCoverageConstPtr &pInOptSmoothingGaussianCoverage)
 wrapper function for 2d image deblur algorithm using Laplacian kernels based on a difference of Gaussian approximation More...
 
IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::laplacianDoGDeblur2dImg (const image::ImageConstPtr &pInImg, const ipReal32 inStdDev, const ipReal32 inOptStdDevFactor, const attr::GaussianCoverageConstPtr &pInOptSmoothingGaussianCoverage, const image::ImagePtr &pOutImg)
 wrapper function for 2d image deblur algorithm using Laplacian kernels based on a difference of Gaussian approximation More...
 

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.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InStdDev [Input] standard deviation used for operation along all axis X
ipsdk::imaproc::attr::InOptStdDevFactor [Input Optional] factor applied on standard deviation for laplacian difference of gaussian computation X
ipsdk::imaproc::attr::InOptSmoothingGaussianCoverage [Input Optional] Parameter allowing to specify a gaussian distribution coverage for processing X
ipsdk::imaproc::attr::OutImg [Output] image for processing operation ipsdk::imaproc::duplicateInOut (_pOutImg, _pInImg)
ipsdk::imaproc::attr::OutWk1Img [Output] Temporary working image for algorithm ipsdk::imaproc::promoteUnary (_pOutWk1Img, _pInImg, ePromoteUnaryType::ePUT_UpperSigned)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg,_pOutWk1Img) && 
ipsdk::imaproc::matchSizeAndType (_pInImg,_pOutImg) && 
ipsdk::imaproc::noInSitu (_pInImg,_pOutWk1Img) && 
ipsdk::imaproc::noInSitu (_pOutImg,_pOutWk1Img)

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

Associated library

IPSDKIPLFiltering

Header file

Code Example

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

Function Documentation

◆ laplacianDoGDeblur2dImg() [1/3]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::laplacianDoGDeblur2dImg ( const image::ImageConstPtr pInImg,
const ipReal32  inStdDev 
)

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

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ laplacianDoGDeblur2dImg() [2/3]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::laplacianDoGDeblur2dImg ( const image::ImageConstPtr pInImg,
const ipReal32  inStdDev,
const ipReal32  inOptStdDevFactor,
const attr::GaussianCoverageConstPtr pInOptSmoothingGaussianCoverage 
)

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

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ laplacianDoGDeblur2dImg() [3/3]

IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::laplacianDoGDeblur2dImg ( const image::ImageConstPtr pInImg,
const ipReal32  inStdDev,
const ipReal32  inOptStdDevFactor,
const attr::GaussianCoverageConstPtr pInOptSmoothingGaussianCoverage,
const image::ImagePtr pOutImg 
)

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

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure