Inpainting#

Detailed Description#

the inpainting algorithm

Enumerations#

enum cv {
    INPAINT_NS = 0,
    INPAINT_TELEA = 1
}

View details

Enumeration Type Documentation#

enum#

#include <opencv2/photo.hpp>

Enumerator:

INPAINT_NS

Use Navier-Stokes based method.

INPAINT_TELEA

Use the algorithm proposed by Alexandru Telea [301].

Function Documentation#

inpaint()#

void cv::inpaint(
InputArray src,
InputArray inpaintMask,
OutputArray dst,
double inpaintRadius,
int flags )

#include <opencv2/photo.hpp>

Python:

cv.inpaint(src, inpaintMask, inpaintRadius, flags[, dst]) -> dst

Restores the selected region in an image using the region neighborhood.

The function reconstructs the selected image area from the pixel near the area boundary. The function may be used to remove dust and scratches from a scanned photo, or to remove undesirable objects from still images or video. See http://en.wikipedia.org/wiki/Inpainting for more details.

Note

Parameters

  • src — Input 8-bit, 16-bit unsigned or 32-bit float 1-channel or 8-bit 3-channel image.

  • inpaintMask — Inpainting mask, 8-bit 1-channel image. Non-zero pixels indicate the area that needs to be inpainted.

  • dst — Output image with the same size and type as src .

  • inpaintRadius — Radius of a circular neighborhood of each point inpainted that is considered by the algorithm.

  • flags — Inpainting method that could be cv::INPAINT_NS or cv::INPAINT_TELEA