Operator Reference

isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion (Operator)

isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion — Perform an isotropic diffusion of an image.

Signature

isotropic_diffusion(Image : SmoothedImage : Sigma, Iterations : )

Herror isotropic_diffusion(const Hobject Image, Hobject* SmoothedImage, double Sigma, const Hlong Iterations)

Herror T_isotropic_diffusion(const Hobject Image, Hobject* SmoothedImage, const Htuple Sigma, const Htuple Iterations)

void IsotropicDiffusion(const HObject& Image, HObject* SmoothedImage, const HTuple& Sigma, const HTuple& Iterations)

HImage HImage::IsotropicDiffusion(double Sigma, Hlong Iterations) const

static void HOperatorSet.IsotropicDiffusion(HObject image, out HObject smoothedImage, HTuple sigma, HTuple iterations)

HImage HImage.IsotropicDiffusion(double sigma, int iterations)

def isotropic_diffusion(image: HObject, sigma: float, iterations: int) -> HObject

Description

The operator isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion performs an isotropic diffusion of the input image ImageImageImageimageimage. This corresponds to a convolution of the image matrix with a Gaussian mask of standard deviation SigmaSigmaSigmasigmasigma. If the parameter IterationsIterationsIterationsiterationsiterations is set to 0, such a convolution is performed explicitly. For input images with a full ROI, isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion returns the same results as the operator derivate_gaussderivate_gaussDerivateGaussDerivateGaussderivate_gauss when choosing 'none'"none""none""none""none" for its parameter ComponentComponentComponentcomponentcomponent. If the gray value matrix is larger than the ROI of ImageImageImageimageimage the two operators differ since derivate_gaussderivate_gaussDerivateGaussDerivateGaussderivate_gauss takes the gray values outside of the ROI into account, while isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion mirrors the values at the boundary of the ROI in any case. The computational complexity increases linearly with the value of SigmaSigmaSigmasigmasigma.

If IterationsIterationsIterationsiterationsiterations has a positive value the smoothing process is considered as an application of the heat equation on the gray value function u with the initial value defined by the gray values of ImageImageImageimageimage at a time . This equation is then solved up to a time , which is equivalent to the above convolution, using an iterative procedure for parabolic partial differential equations. The computational complexity is proportional to the value of IterationsIterationsIterationsiterationsiterations and independent of SigmaSigmaSigmasigmasigma in this case. For small values of IterationsIterationsIterationsiterationsiterations, the computational accuracy is very low, however. For this reason, choosing IterationsIterationsIterationsiterationsiterations < 3 is not recommended.

For smaller values of SigmaSigmaSigmasigmasigma, the convolution implementation is typically the faster method. Since the runtime of the partial differential equation solver only depends on the number of iterations and not on the value of SigmaSigmaSigmasigmasigma, it is typically faster for large values of SigmaSigmaSigmasigmasigma if few iterations are chosen (e.g., IterationsIterationsIterationsiterationsiterations = 3).

For an explanation of the concept of smoothing filters see the introduction of chapter Filters / Smoothing.

Attention

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Automatically parallelized on tuple level.
  • Automatically parallelized on channel level.

Parameters

ImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHObjectHobject (byte / uint2 / real)

Input image.

SmoothedImageSmoothedImageSmoothedImagesmoothedImagesmoothed_image (output_object)  image(-array) objectHImageHObjectHObjectHobject * (byte / uint2 / real)

Output image.

SigmaSigmaSigmasigmasigma (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Standard deviation of the Gauss distribution.

Default: 1.0

Suggested values: 0.1, 0.5, 1.0, 3.0, 10.0, 20.0, 50.0

Restriction: Sigma > 0

IterationsIterationsIterationsiterationsiterations (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of iterations.

Default: 10

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

Restriction: Iterations >= 0

Module

Foundation