百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
I

Inpainting

> 编程语言
开源

想要从照片中移除某物(某人),因为它们从未存在于照片中?这是基于 .NET 的内容感知填充功能。它能智能地填充不需要的或缺失的内容。

379 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

想要从照片中移除某物(某人),因为它们从未存在于照片中?这是基于 .NET 的内容感知填充功能。它能智能地填充不需要的或缺失的内容。

Inpainting

.NET implementation of content-aware fill (also known as inpainting or image completion) in image processing domain.

What is it for?

Content aware fill is used to fill in unwanted or missing areas of photographs. See an example of such fill below where we don't want to have the man in blue t-shirt on our picture:

Original image Processed image
t009 r009

Try in Docker

bash
docker run -p 5000:80 -it --rm zavolokas/inpainter:latest

Navigate to http://localhost:5000

How to use it?

csharp
var inpainter = new Inpainter();
var result = inpainter.Inpaint(imageArgb, markupArgb, donors);
result
    .FromArgbToBitmap()
    .SaveTo(resultPath, ImageFormat.Png)
    .ShowFile();

The Inpainter takes as input

  • an image to inpaint
  • a simitransparent image with a mask
  • optionally it takes a set of simitransparent images that define donor areas for the parts of the area to inpaint.
  • optionally it takes an instance of settings.

Note: the images are not GDI+ images but images in an internal format and can be obtained from GDI+ Bitmaps using extensions.

Examples

Original Markup Process
t009 m009 p009
t020 m020 p020
t023 m023 p023
t058 m058 p058
t067 m067 p067

Settings

The execution of the algorithm can be customized by adjusting the settings.

  • MaxInpaintIterations: determines how many iterations will be run to find better values for the area to fill. The more iterations you run, the better result you'll get.
  • PatchDistanceCalculator: determines algorithm to use for calculating a metrics how much one color is different from another. Possible values are:
    • Cie76 - fastest
    • Cie2000 - more accurate

Donors

Credits

The implementation is based on following publications:

  • Yonatan Wexler, Eli Schechtman and Michal Irani Space-time completion of video IEEE. Trans. Pattern Analysis and Machine Intelligence, 29 (2007)
  • Connelly Barnes, Eli Shechtman, Adam Finkelstein, and Dan B Goldman. PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing. ACM Transactions on Graphics (Proc. SIGGRAPH) 28(3), August 2009

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#computer-visioncontent-aware-fillhacktoberfestimage-completion

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言