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.
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.
Feel free to contact me if you have any problems using the 2D Inpainter, or if you'd like to report a bug.
- 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
)
- 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
- Put the masks into the "demo_inpaint" folder
- Give them the shared suffix, "mcw" (e.g.,
demo_inpaint\1_mcw.png
)
- 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.