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.
.NET implementation of content-aware fill (also known as inpainting or image completion) in image processing domain.
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 |
---|---|
docker run -p 5000:80 -it --rm zavolokas/inpainter:latest
Navigate to http://localhost:5000
var inpainter = new Inpainter();
var result = inpainter.Inpaint(imageArgb, markupArgb, donors);
result
.FromArgbToBitmap()
.SaveTo(resultPath, ImageFormat.Png)
.ShowFile();
The Inpainter
takes as input
Note: the images are not GDI+ images but images in an internal format and can be obtained from GDI+
Bitmap
s using extensions.
Original | Markup | Process |
---|---|---|
The execution of the algorithm can be customized by adjusting the settings.
The implementation is based on following publications: