Purpose

The module RecAnisoDiffusion applies a recursive and fast, anisotropic (edge preserving) diffusion filter to an image.

The diffusion is applied using a weighting that depends on the actual and neighboring gray values in each recursion. (The higher the difference, the less the diffusion.) As a result edges with high contrast are preserved.

Usage

Use normal mode (i.e. Gaussian weighting) for best results, use wall mode (i.e. no diffusion for gray value difference greater than given parameter).

Details

Find below some images of results and the according filter settings.

../../../Modules/ML/MLFilter1/mhelp/Images/DiffusionExampleOrig.jpg

Original image.

../../../Modules/ML/MLFilter1/mhelp/Images/DiffusionExampleIso.jpg

Isotropic filter (4x4x4 passes).

../../../Modules/ML/MLFilter1/mhelp/Images/DiffusionExampleWall9.jpg

Wall anisotropic filter (s=9, 4x4x4 passes).

../../../Modules/ML/MLFilter1/mhelp/Images/DiffusionExampleNormal6.jpg

Normal isotropic filter (s=6, 4x4x4 passes).

The value s is set by the field Tolerance.

Windows

Default Panel

../../../Modules/ML/MLFilter1/mhelp/Images/Screenshots/RecAnisoDiffusion._default.png

Input Fields

input0

name: input0, type: Image

A scalar ML image.

Output Fields

output0

name: output0, type: Image

The filtered output image.

Parameter Fields

Field Index

Mode: Enum
Passes in X Dir: Integer
Passes in Y Dir: Integer
Passes in Z Dir: Integer
Tolerance: Float

Visible Fields

Mode

name: mode, type: Enum, default: Normal, deprecated name: anisotropyMode

Defines the applied diffusion weighting.

The named value s is set by the field Tolerance.

Values:

Title Name Description
Isotropic Isotropic

A pixel value is averaged with its direct neighbor, independent of the neighbors gray value.

No weighting is applied.

Wall Wall A pixel value is only averaged with its direct neighbor, if the gray value difference is less or equal to s.
Normal Normal

The degree of diffusion is weighted according to a Gaussian depending on the gray value difference.

For small differences, diffusion is close to isotropic. For large differences, diffusion is very low. s specifies sigma of the Gaussian.

Passes in X Dir

name: passesX, type: Integer, default: 2

Sets the number of passes in x-direction.

Passes in Y Dir

name: passesY, type: Integer, default: 2

Sets the number of passes in y-direction.

Passes in Z Dir

name: passesZ, type: Integer, default: 0

Sets the number of passes in z-direction.

Tolerance

name: tolerance, type: Float, default: 5, deprecated name: anisotropyWidth

Sets a factor that is used differently (as s) in each different Mode.