IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Anisotropic diffusion 2d
imageanisotropicDiffusion2dImg (inImg,inNbTimeSteps,inSharpness,inAnisotropy)

Detailed Description

Anisotropic diffusion smoothing filter on 2d images.

The anisotropic diffusion filter is a non-linear iterative smoothing filter that allows to eliminate noise and small-scale details from an image while preserving or even enhancing the edge structure.

Filter parametrization

Main parameters

The main parameters of this filter are :

Note
Note that $InSharpness$ and $InAnisotropy$ are highly correlated since one can increase first one and decrease second one to increase image smoothing while preserving algorithm edge enhancing properties. It is generally a good idea for user to start with following parameter values :
  • $InNbTimeSteps=10$
  • $InSharpness=1.0$
  • $InAnisotropy=0.6$

Then user should try to modify $InSharpness$ and $InAnisotropy$ values to find an adpated cupple of value.

Here is an example of $InSharpness$ influence on an image with very high frequency area (in this case $InNbTimeSteps=10$ and $InAnisotropy=0.6$).

anisotropicDiffusion2dImg_sharpness.png

Here is an example of $InAnisotropy$ influence on an image (in this case $InNbTimeSteps=10$ and $InSharpness)=1.2$).

anisotropicDiffusion2dImg_anisotropy.png

Please note edge enhancement while anisotropy value increase.

Secondary parameters

Some secondary parameters are also associated to this filter (user should modify these parameters with caution since some of them can generate heavy computation cost) :

See also
Joachil Weickert, Theorical foundations of anisotropic diffusion in image processing, Computing, Suppl. 141, pp. 221-236, 1996.
D. Tschumperle, Curvature-Preserving Regularization of Multi-Valued Images using PDE's, European Conference on Computer Vision (ECCV'06), LNCS Vol. 3952, pp. 295-307, Graz/Austria, May 2006, ISSN : 302-9743.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# anisotropic diffusion computation
outImg = filter.anisotropicDiffusion2dImg(inImg, 10, 0.9, 0.6)

Example of C++ code :

Example informations

Header file

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

Code Example

// compute anisotropic diffusion smoothing on input image
ImagePtr pOutImg = anisotropicDiffusion2dImg(pInImg, inNbTimeSteps, inSharpness, inAnisotropy);