ClassesClassesClassesClasses | | | | Operators

anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion (Operator)


anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion — Perform an anisotropic diffusion of an image.


anisotropic_diffusion(Image : ImageAniso : Mode, Contrast, Theta, Iterations : )

Herror anisotropic_diffusion(const Hobject Image, Hobject* ImageAniso, const char* Mode, double Contrast, double Theta, const Hlong Iterations)

Herror T_anisotropic_diffusion(const Hobject Image, Hobject* ImageAniso, const Htuple Mode, const Htuple Contrast, const Htuple Theta, const Htuple Iterations)

Herror anisotropic_diffusion(Hobject Image, Hobject* ImageAniso, const HTuple& Mode, const HTuple& Contrast, const HTuple& Theta, const HTuple& Iterations)

HImage HImage::AnisotropicDiffusion(const HTuple& Mode, const HTuple& Contrast, const HTuple& Theta, const HTuple& Iterations) const

HImageArray HImageArray::AnisotropicDiffusion(const HTuple& Mode, const HTuple& Contrast, const HTuple& Theta, const HTuple& Iterations) const

void AnisotropicDiffusion(const HObject& Image, HObject* ImageAniso, const HTuple& Mode, const HTuple& Contrast, const HTuple& Theta, const HTuple& Iterations)

HImage HImage::AnisotropicDiffusion(const HString& Mode, double Contrast, double Theta, Hlong Iterations) const

HImage HImage::AnisotropicDiffusion(const char* Mode, double Contrast, double Theta, Hlong Iterations) const

void HOperatorSetX.AnisotropicDiffusion(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*ImageAniso, [in] VARIANT Mode, [in] VARIANT Contrast, [in] VARIANT Theta, [in] VARIANT Iterations)

IHImageX* HImageX.AnisotropicDiffusion(
[in] BSTR Mode, [in] double Contrast, [in] double Theta, [in] Hlong Iterations)

static void HOperatorSet.AnisotropicDiffusion(HObject image, out HObject imageAniso, HTuple mode, HTuple contrast, HTuple theta, HTuple iterations)

HImage HImage.AnisotropicDiffusion(string mode, double contrast, double theta, int iterations)


The operator anisotropic_diffusionanisotropic_diffusionAnisotropicDiffusionanisotropic_diffusionAnisotropicDiffusionAnisotropicDiffusion performs an anisotropic diffusion on the input image ImageImageImageImageImageimage according to the model of Perona and Malik. This procedure is also referred to as nonlinear isotropic diffusion. Considering the image as a gray value function u, the algorithm is a discretization of the partial differential equation

  u_t = div(g(|grad u|^2, c) grad u)

with the initial value u = u_0 defined by ImageImageImageImageImageimage at a time t_0. The equation is iterated IterationsIterationsIterationsIterationsIterationsiterations times in time steps of length ThetaThetaThetaThetaThetatheta, so that the output image ImageAnisoImageAnisoImageAnisoImageAnisoImageAnisoimageAniso contains the gray value function at the time t_0 + IterationsIterationsIterationsIterationsIterationsiterations * ThetaThetaThetaThetaThetatheta .

The goal of the anisotropic diffusion is the elimination of image noise in constant image patches while preserving the edges in the image. The distinction between edges and constant patches is achieved using the threshold ContrastContrastContrastContrastContrastcontrast on the size of the gray value differences between adjacent pixels. ContrastContrastContrastContrastContrastcontrast is referred to as the contrast parameter and abbreviated with the letter c.

The variable diffusion coefficient g can be chosen to follow different monotonically decreasing functions with values between 0 and 1 and determines the response of the diffusion process to an edge. With the parameter ModeModeModeModeModemode, the following functions can be selected:

  g_1(x,c) = 1/sqrt( 1 + 2*x/c^2 )

Choosing the function g_1 by setting ModeModeModeModeModemode to 'parabolic'"parabolic""parabolic""parabolic""parabolic""parabolic" guarantees that the associated differential equation is parabolic, so that a well-posedness theory exists for the problem and the procedure is stable for an arbitrary step size ThetaThetaThetaThetaThetatheta. In this case however, there remains a slight diffusion even across edges of a height larger than c.

  g_2(x,c) = 1/( 1 + (x/c^2) )

The choice of 'perona-malik'"perona-malik""perona-malik""perona-malik""perona-malik""perona-malik" for ModeModeModeModeModemode, as used in the publication of Perona and Malik, does not possess the theoretical properties of g_1, but in practice it has proved to be sufficiently stable and is thus widely used. The theoretical instability results in a slight sharpening of strong edges.

  g_3(x,c) = 1-exp(-C*c^8/x^4)

The function g_3 with the constant C=3.31488, proposed by Weickert, and selectable by setting ModeModeModeModeModemode to 'weickert'"weickert""weickert""weickert""weickert""weickert" is an improvement of g_2 with respect to edge sharpening. The transition between smoothing and sharpening happens very abruptly at x = c^2.



ImageImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHImageHImageXHobject (byte / uint2 / real)

Input image.

ImageAnisoImageAnisoImageAnisoImageAnisoImageAnisoimageAniso (output_object)  image(-array) objectHImageHImageHImageHImageXHobject * (byte / uint2 / real)

Output image.

ModeModeModeModeModemode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Diffusion coefficient as a function of the edge amplitude.

Default value: 'weickert' "weickert" "weickert" "weickert" "weickert" "weickert"

List of values: 'parabolic'"parabolic""parabolic""parabolic""parabolic""parabolic", 'perona-malik'"perona-malik""perona-malik""perona-malik""perona-malik""perona-malik", 'weickert'"weickert""weickert""weickert""weickert""weickert"

ContrastContrastContrastContrastContrastcontrast (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Contrast parameter.

Default value: 5.0

Suggested values: 2.0, 5.0, 10.0, 20.0, 50.0, 100.0

Restriction: Contrast > 0

ThetaThetaThetaThetaThetatheta (input_control)  real HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Time step.

Default value: 1.0

Suggested values: 0.5, 1.0, 3.0

Restriction: Theta > 0

IterationsIterationsIterationsIterationsIterationsiterations (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Number of iterations.

Default value: 10

Suggested values: 1, 3, 10, 100, 500

Restriction: Iterations >= 1


J. Weickert; “'Anisotropic Diffusion in Image Processing'; PhD Thesis; Fachbereich Mathematik, Universität Kaiserslautern; 1996.
P. Perona, J. Malik; “Scale-space and edge detection using anisotropic diffusion”; Transactions on Pattern Analysis and Machine Intelligence 12(7), pp. 629-639; IEEE; 1990.
G. Aubert, P. Kornprobst; “Mathematical Problems in Image Processing”; Applied Mathematical Sciences 147; Springer, New York; 2002.



ClassesClassesClassesClasses | | | | Operators