IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

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

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::richardsonLucyDeblur2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inNbIter, const ipReal32 inStdDev)
 wrapper function for 2d image deblur algorithm using Laplacian kernels based on the Richardson-Lucy algorithm More...
 
IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::richardsonLucyDeblur2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inNbIter, const ipReal32 inStdDevX, const ipReal32 inStdDevY, const attr::GaussianCoverageConstPtr &pInOptSmoothingGaussianCoverage)
 wrapper function for 2d image deblur algorithm using Laplacian kernels based on the Richardson-Lucy algorithm More...
 
IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::richardsonLucyDeblur2dImg (const image::ImageConstPtr &pInImg, const ipUInt32 inNbIter, const ipReal32 inStdDevX, const ipReal32 inStdDevY, const attr::GaussianCoverageConstPtr &pInOptSmoothingGaussianCoverage, const image::ImagePtr &pOutImg)
 wrapper function for 2d image deblur algorithm using Laplacian kernels based on the Richardson-Lucy algorithm More...
 

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.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InNbIter [Input] Number of iterations for an iterative algorithm X
ipsdk::imaproc::attr::InStdDevX [Input] standard deviation used for operation along X axis X
ipsdk::imaproc::attr::InStdDevY [Input] standard deviation used for operation along Z axis 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::OutWk1RealImg [Output] Temporary working image for algorithm ipsdk::imaproc::duplicateInOut (_pOutWk1RealImg, _pInImg, ipsdk::image::eImageBufferType::eIBT_Real32)
ipsdk::imaproc::attr::OutOptWk1Img [Output Optional] Temporary working image for algorithm X

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSize (_pInImg,_pOutWk1RealImg) && 
ipsdk::imaproc::matchSizeAndType (_pInImg,_pOutImg) && 
ipsdk::imaproc::noInSitu (_pInImg,_pOutWk1RealImg) && 
ipsdk::imaproc::noInSitu (_pOutImg,_pOutWk1RealImg) && 
ipsdk::processor::ifIsSet (_pOutOptWk1Img,
 ipsdk::imaproc::matchSizeAndType (_pInImg,_pOutOptWk1Img))

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

Associated library

IPSDKIPLFiltering

Header file

Code Example

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

Function Documentation

◆ richardsonLucyDeblur2dImg() [1/3]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::richardsonLucyDeblur2dImg ( const image::ImageConstPtr pInImg,
const ipUInt32  inNbIter,
const ipReal32  inStdDev 
)

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

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ richardsonLucyDeblur2dImg() [2/3]

IPSDKIPLFILTERING_API image::ImagePtr ipsdk::imaproc::filter::richardsonLucyDeblur2dImg ( const image::ImageConstPtr pInImg,
const ipUInt32  inNbIter,
const ipReal32  inStdDevX,
const ipReal32  inStdDevY,
const attr::GaussianCoverageConstPtr pInOptSmoothingGaussianCoverage 
)

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

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ richardsonLucyDeblur2dImg() [3/3]

IPSDKIPLFILTERING_API void ipsdk::imaproc::filter::richardsonLucyDeblur2dImg ( const image::ImageConstPtr pInImg,
const ipUInt32  inNbIter,
const ipReal32  inStdDevX,
const ipReal32  inStdDevY,
const attr::GaussianCoverageConstPtr pInOptSmoothingGaussianCoverage,
const image::ImagePtr pOutImg 
)

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

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure