Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 1.85 KB

README.md

File metadata and controls

34 lines (29 loc) · 1.85 KB

Pythonic implementation of Gaussian Texture Inpainting

A tool for image reparation and inpainting using Gaussian Conditional Simulation. Implementation of the research paper, Texture Inpainting Using Efficient Gaussian Conditional Simulation, Bruno Galerne, Arthur Leclaire.

Development: Penelope Tay
Special Thanks: Gautier LOVEIKO for discussing his implementation. Au Khai Xiang for providing mathematical insight.

Description

This tool lets you repair 2D images with missing, damaged or undesirable areas. Such areas are filled with coherent, context-aware new content in order to produce a repaired image.

Results (Microtextures)

1

Results (Height maps)

2

Development

Current Progress: Complete with Maintenance

Feel free to contact me if you have any problems using the 2D Inpainter, or if you'd like to report a bug.

Usage

  1. Put the images you wish to repair into the "demo_inpaint" folder.
  • Give them the shared suffix, "opening" (e.g., demo_inpaint\1_opening.png)
  1. Create masks for the images.
  • Masks should hold information as follows,
    Red area = area you wish to inpaint
    Cyan (green+blue) area = conditioning area. If in doubt, set it to a 3 pixel border around the red area
    blue area = remaining known area
  1. Put the masks into the "demo_inpaint" folder
  • Give them the shared suffix, "mcw" (e.g., demo_inpaint\1_mcw.png)
  1. Simply run: python repair_2d.py Gaussian inpainting will produce 2 images with suffix "F_result.png" and "full_result.png". These refer to the ADSN-only and ADSN+Kriging+Innovation inpainting results respectively.