inpainting_mcfinpainting_mcfInpaintingMcfInpaintingMcfinpainting_mcf (算子)

名称

inpainting_mcfinpainting_mcfInpaintingMcfInpaintingMcfinpainting_mcf — 通过平滑水平线进行修复。MCF:Mean Curvature Flow平均曲率流。

签名

inpainting_mcf(Image, Region : InpaintedImage : Sigma, Theta, Iterations : )

Herror inpainting_mcf(const Hobject Image, const Hobject Region, Hobject* InpaintedImage, double Sigma, double Theta, const Hlong Iterations)

Herror T_inpainting_mcf(const Hobject Image, const Hobject Region, Hobject* InpaintedImage, const Htuple Sigma, const Htuple Theta, const Htuple Iterations)

void InpaintingMcf(const HObject& Image, const HObject& Region, HObject* InpaintedImage, const HTuple& Sigma, const HTuple& Theta, const HTuple& Iterations)

HImage HImage::InpaintingMcf(const HRegion& Region, double Sigma, double Theta, Hlong Iterations) const

static void HOperatorSet.InpaintingMcf(HObject image, HObject region, out HObject inpaintedImage, HTuple sigma, HTuple theta, HTuple iterations)

HImage HImage.InpaintingMcf(HRegion region, double sigma, double theta, int iterations)

def inpainting_mcf(image: HObject, region: HObject, sigma: float, theta: float, iterations: int) -> HObject

描述

算子 inpainting_mcfinpainting_mcfInpaintingMcfInpaintingMcfInpaintingMcfinpainting_mcf extends the image edges that adjoin the region RegionRegionRegionRegionregionregion of the input image ImageImageImageImageimageimage into the interior of RegionRegionRegionRegionregionregion and connects their ends by smoothing the level lines of the gray value function of ImageImageImageImageimageimage

This happens through the application of the mean curvature flow or intrinsic heat equation on the gray value function u defined in the region RegionRegionRegionRegionregionregion by the input image ImageImageImageImageimageimage at a time . The discretized equation is solved in IterationsIterationsIterationsIterationsiterationsiterations time steps of length ThetaThetaThetaThetathetatheta, so that the output image InpaintedImageInpaintedImageInpaintedImageInpaintedImageinpaintedImageinpainted_image contains the gray value function at the time IterationsIterationsIterationsIterationsiterationsiterations * ThetaThetaThetaThetathetatheta

A stationary state of the mean curvature flow equation, which is also the basis of the operator mean_curvature_flowmean_curvature_flowMeanCurvatureFlowMeanCurvatureFlowMeanCurvatureFlowmean_curvature_flow, has the special property that the level lines of u all have the curvature 0. This means that after sufficiently many iterations there are only straight edges left inside the computation area of the output image InpaintedImageInpaintedImageInpaintedImageInpaintedImageinpaintedImageinpainted_image. By this, the structure of objects inside of RegionRegionRegionRegionregionregion can be simplified, while the remaining edges are continuously connected to those of the surrounding image matrix. This allows for a removal of image errors and unwanted objects in the input image, a so called image inpainting, which is only weakly visible to a human beholder since there remain no obvious artifacts or smudges.

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 SigmaSigmaSigmaSigmasigmasigma determines the magnitude of the smoothing by means of the standard deviation of a corresponding Gaussian convolution kernel, as used in the operator isotropic_diffusionisotropic_diffusionIsotropicDiffusionIsotropicDiffusionIsotropicDiffusionisotropic_diffusion for isotropic image smoothing.

注意

请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章

执行信息

参数

ImageImageImageImageimageimage (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / uint2 / real)

输入图像。

RegionRegionRegionRegionregionregion (输入对象)  region objectHRegionHObjectHRegionHobject

Inpainting region.

InpaintedImageInpaintedImageInpaintedImageInpaintedImageinpaintedImageinpainted_image (输出对象)  image(-array) objectHImageHObjectHImageHobject * (byte / uint2 / real)

输出图像。

SigmaSigmaSigmaSigmasigmasigma (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Smoothing for derivative operator.

默认值: 0.5

建议值: 0.0, 0.1, 0.5, 1.0

限制: Sigma >= 0

ThetaThetaThetaThetathetatheta (输入控制)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Time step.

默认值: 0.5

建议值: 0.1, 0.2, 0.3, 0.4, 0.5

限制: 0 < Theta <= 0.5

IterationsIterationsIterationsIterationsiterationsiterations (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of iterations.

默认值: 10

建议值: 1, 5, 10, 20, 50, 100, 500

限制: Iterations >= 1

替代

harmonic_interpolationharmonic_interpolationHarmonicInterpolationHarmonicInterpolationHarmonicInterpolationharmonic_interpolation, inpainting_ctinpainting_ctInpaintingCtInpaintingCtInpaintingCtinpainting_ct, inpainting_anisoinpainting_anisoInpaintingAnisoInpaintingAnisoInpaintingAnisoinpainting_aniso, inpainting_cedinpainting_cedInpaintingCedInpaintingCedInpaintingCedinpainting_ced, inpainting_textureinpainting_textureInpaintingTextureInpaintingTextureInpaintingTextureinpainting_texture

参考文献

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.

模块

基础