OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
影像修補

詳細描述

影像修復演算法

列舉

列舉  {
  cv::INPAINT_NS = 0 ,
  cv::INPAINT_TELEA = 1
}
 

函式

void cv::inpaint (InputArray src, InputArray inpaintMask, OutputArray dst, double inpaintRadius, int flags)
 使用區域鄰域恢復影像中的選定區域。
 

列舉型別文件

◆ 匿名列舉

匿名列舉

#include <opencv2/photo.hpp>

列舉器
INPAINT_NS 
Python: cv.INPAINT_NS

使用基於 Navier-Stokes 的方法。

INPAINT_TELEA 
Python: cv.INPAINT_TELEA

使用 Alexandru Telea [270] 提出的演算法。

函式文件

◆ inpaint()

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

#include <opencv2/photo.hpp>

使用區域鄰域恢復影像中的選定區域。

引數
src輸入 8 位、16 位無符號或 32 位浮點 1 通道或 8 位 3 通道影像。
inpaintMask修復掩碼,8 位 1 通道影像。非零畫素表示需要修復的區域。
dst輸出影像,其大小和型別與 src 相同。
inpaintRadius每個修復點的圓形鄰域的半徑,演算法會考慮該半徑。
flags影像修復方法,可以是 cv::INPAINT_NScv::INPAINT_TELEA

該函式從區域邊界附近的畫素重建選定的影像區域。 該函式可用於去除掃描照片中的灰塵和劃痕,或去除靜態影像或影片中不需要的物件。 有關更多詳細資訊,請參見 http://en.wikipedia.org/wiki/Inpainting

注意
  • 可以在 opencv_source_code/samples/cpp/inpaint.cpp 中找到使用修復技術的示例。
  • (Python) 可以在 opencv_source_code/samples/python/inpaint.py 中找到使用修復技術的示例。