Inpainting 计算照相术


枚举

enum {
cv::INPAINT_NS = 0,
cv::INPAINT_TELEA = 1
}

函数

void cv::inpaint ( InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags)
Restores the selected region in an image using the region neighborhood. 更多...

详细描述

the inpainting algorithm

枚举类型文档编制

anonymous enum

anonymous enum

#include < opencv2/photo.hpp >

枚举器
INPAINT_NS
Python: cv.INPAINT_NS

Use Navier-Stokes based method.

INPAINT_TELEA
Python: cv.INPAINT_TELEA

Use the algorithm proposed by Alexandru Telea [225] .

函数文档编制

inpaint()

void cv::inpaint ( InputArray src ,
InputArray inpaintMask ,
OutputArray dst ,
double inpaintRadius ,
int flags
)
Python:
dst = cv.inpaint( src, inpaintMask, inpaintRadius, flags[, dst] )

#include < opencv2/photo.hpp >

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

参数
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

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 了解更多细节。

注意
  • An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp
  • (Python) An example using the inpainting technique can be found at opencv_source_code/samples/python/inpaint.py