{"id":13824699,"url":"https://github.com/zavolokas/Inpainting","last_synced_at":"2025-07-08T19:33:10.434Z","repository":{"id":42187133,"uuid":"114730683","full_name":"zavolokas/Inpainting","owner":"zavolokas","description":"Want to remove something(someone) from a photo as it never was there? This is .NET implementation of content-aware fill. It smartly fills in unwanted or missing areas of photographs.","archived":false,"fork":false,"pushed_at":"2022-08-03T19:58:12.000Z","size":77210,"stargazers_count":367,"open_issues_count":17,"forks_count":47,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-20T02:36:29.562Z","etag":null,"topics":["computer-vision","content-aware-fill","hacktoberfest","image-completion","image-processing","inpaint","inpainting","photo-editing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zavolokas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-19T06:59:29.000Z","updated_at":"2024-11-04T10:26:19.000Z","dependencies_parsed_at":"2022-09-05T03:00:59.706Z","dependency_job_id":null,"html_url":"https://github.com/zavolokas/Inpainting","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zavolokas/Inpainting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavolokas%2FInpainting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavolokas%2FInpainting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavolokas%2FInpainting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavolokas%2FInpainting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zavolokas","download_url":"https://codeload.github.com/zavolokas/Inpainting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zavolokas%2FInpainting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264334206,"owners_count":23592380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","content-aware-fill","hacktoberfest","image-completion","image-processing","inpaint","inpainting","photo-editing"],"created_at":"2024-08-04T09:01:07.589Z","updated_at":"2025-07-08T19:33:10.418Z","avatar_url":"https://github.com/zavolokas.png","language":"C#","funding_links":["https://www.paypal.me/zavolokas"],"categories":["C# #"],"sub_categories":[],"readme":"# Inpainting\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)]()\n[![Build Status](https://travis-ci.org/zavolokas/Inpainting.svg?branch=master)](https://travis-ci.org/zavolokas/Inpainting)\n[![Drone Status](https://cloud.drone.io/api/badges/zavolokas/Inpainting/status.svg)](https://cloud.drone.io/zavolokas/Inpainting)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/zavolokas)\n[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=CSharp+project+that+allows+to+remove+an+unwanted+object+from+photo+smartly+as+it+never+was+there\u0026url=https://github.com/zavolokas/Inpainting\u0026hashtags=contentawarefill,csharp,inpainting,imageprocessing,opensource)\n\n.NET implementation of content-aware fill (also known as inpainting or image completion) in image processing domain.\n\n## What is it for?\nContent 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:\n\n| Original image | Processed image |\n|----------------|-----------------|\n| ![t009] | ![r009] |\n\n## Try in Docker\n\n```bash\ndocker run -p 5000:80 -it --rm zavolokas/inpainter:latest\n```\n\nNavigate to http://localhost:5000\n\n## How to use it?\n\n```csharp\nvar inpainter = new Inpainter();\nvar result = inpainter.Inpaint(imageArgb, markupArgb, donors);\nresult\n    .FromArgbToBitmap()\n    .SaveTo(resultPath, ImageFormat.Png)\n    .ShowFile();\n```\n\nThe `Inpainter` takes as input \n- an image to inpaint\n- a simitransparent image with a mask\n- optionally it takes a set of simitransparent images that define donor areas for the parts of the area to inpaint.\n- optionally it takes an instance of settings.\n\n\u003e Note: the images are not GDI+ images but images in an internal format and can be obtained from GDI+ `Bitmap`s using extensions.\n\n### Examples\n\n| Original | Markup | Process|\n| ----------- | ------ |-------|\n| ![t009]   | ![m009]|![p009]|\n| ![t020]   | ![m020]|![p020]|\n| ![t023]   | ![m023]|![p023]|\n| ![t058]   | ![m058]|![p058]|\n| ![t067]   | ![m067]|![p067]|\n\n## Settings\nThe execution of the algorithm can be customized by adjusting the settings. \n- **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.\n- **PatchDistanceCalculator**: determines algorithm to use for calculating a metrics how much one color is different from another. Possible values are:\n  - Cie76 - fastest\n  - Cie2000 - more accurate\n\n\n### Donors\n\n# Credits\nThe implementation is based on following publications:\n- Yonatan Wexler, Eli Schechtman and Michal Irani *Space-time completion of video* IEEE. Trans. Pattern Analysis and Machine Intelligence, 29 (2007)\n- 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\n\n\n[t009]: images/t009.jpg \"original image\"\n[r009]: images/r009.png \"original image\"\n[m009]: images/m009.png \"markup\"\n[p009]: images/t009.gif \"process\"\n\n[t020]: images/t020.jpg \"original image\"\n[m020]: images/m020.png \"markup\"\n[p020]: images/t020.gif \"process\"\n\n[t023]: images/t023.jpg \"original image\"\n[m023]: images/m023.png \"markup\"\n[p023]: images/t023.gif \"process\"\n\n[t058]: images/t058.jpg \"original image\"\n[m058]: images/m058_1.png \"markup\"\n[p058]: images/t058.gif \"process\"\n\n[t067]: images/t067.jpg \"original image\"\n[m067]: images/m067.png \"markup\"\n[p067]: images/t067.gif \"process\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzavolokas%2FInpainting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzavolokas%2FInpainting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzavolokas%2FInpainting/lists"}