harmonic_interpolationharmonic_interpolationHarmonicInterpolationHarmonicInterpolationharmonic_interpolation (算子名称)

名称

harmonic_interpolationharmonic_interpolationHarmonicInterpolationHarmonicInterpolationharmonic_interpolation — Perform a harmonic interpolation on an image region.

参数签名

harmonic_interpolation(Image, 区域 : InpaintedImage : Precision : )

Herror harmonic_interpolation(const Hobject Image, const Hobject 区域, Hobject* InpaintedImage, double Precision)

Herror T_harmonic_interpolation(const Hobject Image, const Hobject 区域, Hobject* InpaintedImage, const Htuple Precision)

void HarmonicInterpolation(const HObject& Image, const HObject& 区域, HObject* InpaintedImage, const HTuple& Precision)

HImage HImage::HarmonicInterpolation(const HRegion& 区域, double Precision) const

static void HOperatorSet.HarmonicInterpolation(HObject image, HObject 区域, out HObject inpaintedImage, HTuple precision)

HImage HImage.HarmonicInterpolation(HRegion 区域, double precision)

def harmonic_interpolation(image: HObject, 区域: HObject, precision: float) -> HObject

描述

该算子 harmonic_interpolationharmonic_interpolationHarmonicInterpolationHarmonicInterpolationHarmonicInterpolationharmonic_interpolation reconstructs the destroyed image data of ImageImageImageImageimageimage inside the region 区域区域区域区域区域区域 by solving the discrete Laplace equation for the corresponding gray value function u. The unique solution, which exists under Dirichlet boundary conditions given by ImageImageImageImageimageimage outside of 区域区域区域区域区域区域, is returned in InpaintedImageInpaintedImageInpaintedImageInpaintedImageinpaintedImageinpainted_image.

This technique is called harmonic interpolation since in function theory the solutions of the Laplace equation are referred to as harmonic functions.

If 区域区域区域区域区域区域 touches the border of the gray value matrix of ImageImageImageImageimageimage and thus some Dirichlet boundary values do not exist, von Neumann boundary conditions are used instead. This means that the gray values are mirrored at the border of ImageImageImageImageimageimage. If no Dirichlet boundary values exist at all, a constant image with gray value 0 is returned.

The spatial derivatives are discretized as and . The equation is solved by an iterative conjugate gradient solver, which iteratively improves the computational error until the maximum norm of its update step becomes a smaller fraction than PrecisionPrecisionPrecisionPrecisionprecisionprecision of the norm of the input data or a maximum of 1000 iterations is reached. PrecisionPrecisionPrecisionPrecisionprecisionprecision = 0.01 thus means a relative computational accuracy of 1%.

注意

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

运行信息

参数表

ImageImageImageImageimageimage (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / uint2 / real)

Input image.

区域区域区域区域区域区域 (input_object)  region objectHRegionHObjectHRegionHobject

Inpainting region.

InpaintedImageInpaintedImageInpaintedImageInpaintedImageinpaintedImageinpainted_image (output_object)  image(-array) objectHImageHObjectHImageHobject * (byte / uint2 / real)

Output image.

PrecisionPrecisionPrecisionPrecisionprecisionprecision (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Computational accuracy.

Default: 0.001

Suggested values: 0.0, 0.0001, 0.001, 0.01

Restriction: Precision >= 0.0

可替代算子

inpainting_ctinpainting_ctInpaintingCtInpaintingCtInpaintingCtinpainting_ct, inpainting_anisoinpainting_anisoInpaintingAnisoInpaintingAnisoInpaintingAnisoinpainting_aniso, inpainting_mcfinpainting_mcfInpaintingMcfInpaintingMcfInpaintingMcfinpainting_mcf, inpainting_textureinpainting_textureInpaintingTextureInpaintingTextureInpaintingTextureinpainting_texture, inpainting_cedinpainting_cedInpaintingCedInpaintingCedInpaintingCedinpainting_ced

References

L.C. Evans; “Partial Differential Equations”; AMS, Providence; 1998.
W. Hackbusch; “Iterative Lösung großer schwachbesetzter Gleichungssysteme”; Teubner, Stuttgart;1991.

模块

Foundation