Skip to content

mean_curvature_flowmean_curvature_flowMeanCurvatureFlowMeanCurvatureFlowmean_curvature_flowmean_curvature_flowπŸ”—

Short descriptionπŸ”—

mean_curvature_flowmean_curvature_flowMeanCurvatureFlowMeanCurvatureFlowmean_curvature_flowmean_curvature_flow β€” Apply the mean curvature flow to an image.

SignatureπŸ”—

mean_curvature_flow( image Image, out image ImageMCF, real Sigma, real Theta, integer Iterations )mean_curvature_flow( Image : ImageMCF : Sigma, Theta, Iterations : )void MeanCurvatureFlow( const HObject& Image, HObject* ImageMCF, const HTuple& Sigma, const HTuple& Theta, const HTuple& Iterations )static void HOperatorSet.MeanCurvatureFlow( HObject image, out HObject imageMCF, HTuple sigma, HTuple theta, HTuple iterations )def mean_curvature_flow( image: HObject, sigma: float, theta: float, iterations: int ) -> HObject

Herror mean_curvature_flow( const Hobject Image, Hobject* ImageMCF, double Sigma, double Theta, const Hlong Iterations )

Herror T_mean_curvature_flow( const Hobject Image, Hobject* ImageMCF, const Htuple Sigma, const Htuple Theta, const Htuple Iterations )

HImage HImage::MeanCurvatureFlow( double Sigma, double Theta, Hlong Iterations ) const

HImage HImage.MeanCurvatureFlow( double sigma, double theta, int iterations )

DescriptionπŸ”—

The operator mean_curvature_flowMeanCurvatureFlow applies the mean curvature flow or intrinsic heat equation

\[\begin{eqnarray*} u_{t} = div(\frac{\nabla u}{|\nabla u|}) |\nabla u| = curv(u) |\nabla u|\end{eqnarray*}\]

to the gray value function \(u\) defined by the input image Imageimageimage at a time \(t_{0} = 0\). The discretized equation is solved in Iterationsiterationsiterations time steps of length Thetathetatheta, so that the output image contains the gray value function at the time Iterationsiterationsiterations \(\cdot\) Thetathetatheta.

The mean curvature flow causes a smoothing of Imageimageimage in the direction of the edges in the image, i.e. along the contour lines of \(u\), while perpendicular to the edge direction no smoothing is performed and hence the boundaries of image objects are not smoothed. To detect the image direction more robustly, in particular on noisy input data, an additional isotropic smoothing step can precede the computation of the gray value gradients. The parameter Sigmasigmasigma determines the magnitude of the smoothing by means of the standard deviation of a corresponding Gaussian convolution kernel, as used in the operator isotropic_diffusionIsotropicDiffusion for isotropic image smoothing.

The following images show the effect of the parameters Sigmasigmasigma, Thetathetatheta, and Iterationsiterationsiterations. First, the input image is shown together with the result that is achieved if all parameters are set to their default values.

Β 
(1) (2)

(1) Input image. (2) Result when using the default values.

In the following images, the results are shown that are achieved if one parameter is varied while setting the other two parameters to their default values.

Sigmasigmasigma controls the amount of smoothing, prior to the computation of the gray value gradient. Be careful with very large values for Sigmasigmasigma, because they may lead to undesired effects.

Β 
(1) (2) (3)

(1) Sigma = 0.0. (2) Sigma = 1.0. (3) Sigma = 10.0.

Thetathetatheta controls the step size during the iterative smoothing process. Larger values lead to a stronger smoothing.

Β 
(1) (2) (3)

(1) Theta = 0.1. (2) Theta = 0.2. (3) Theta = 0.4.

Iterationsiterationsiterations controls the number of iterations that are performed. With an increasing number of iterations, the runtime increases, as well. Furthermore, a large number of iterations may lead to a loss of structure in the smoothed image.

Β 
(1) (2) (3)

(1) Iterations = 1. (2) Iterations = 50. (3) Iterations = 100.

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πŸ”—

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πŸ”—

Imageimageimage (input_object) (multichannel-)image(-array) β†’ object (byte / uint2 / real)object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject (byte / uint2 / real)

Input image.

ImageMCFimageMCFimage_mcf (output_object) image(-array) β†’ object (byte / uint2 / real)object (byte / uint2 / real)HObject (byte / uint2 / real)HImage (byte / uint2 / real)HObject (byte / uint2 / real)Hobject * (byte / uint2 / real)

Output image.

Sigmasigmasigma (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Smoothing parameter for derivative operator.

Default: 0.50.5
Suggested values: 0.0, 0.1, 0.5, 1.00.0, 0.1, 0.5, 1.0
Restriction: Sigma >= 0

Thetathetatheta (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Time step.

Default: 0.50.5
Suggested values: 0.1, 0.2, 0.3, 0.4, 0.50.1, 0.2, 0.3, 0.4, 0.5
Restriction: 0 < Theta <= 0.5

Iterationsiterationsiterations (input_control) integer β†’ (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of iterations.

Default: 1010
Suggested values: 1, 5, 10, 20, 50, 100, 5001, 5, 10, 20, 50, 100, 500
Restriction: Iterations >= 1

ReferencesπŸ”—

M. G. Crandall, P. Lions; ``Convergent Difference Schemes for Nonlinear Parabolic Equations and Mean Curvature Motionβ€™β€˜; Numer. Math. 75 pp. 17-41; 1996.

G. Aubert, P. Kornprobst; ``Mathematical Problems in Image Processingβ€™β€˜; Applied Mathematical Sciences 147; Springer, New York; 2002.

ModuleπŸ”—

Foundation