Table of Contents

Method Inpaint

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Inpaint(Mat, Mat, Mat, InpaintTypes)

The function implements different single-image inpainting algorithms.

public static void Inpaint(Mat src, Mat mask, Mat dst, InpaintTypes algorithm)

Parameters

src Mat

source image, it could be of any type and any number of channels from 1 to 4. In case of 3- and 4-channels images the function expect them in CIELab colorspace or similar one, where first color component shows intensity, while second and third shows colors. Nonetheless you can try any colorspaces.

mask Mat

mask (CV_8UC1), where non-zero pixels indicate valid image area, while zero pixels indicate area to be inpainted

dst Mat

destination image

algorithm InpaintTypes

see OpenCvSharp.XPhoto.InpaintTypes