Inpainting

From HandWiki
Short description: Image conservation process
Original and restored image

Inpainting is a conservation process where damaged, deteriorated, or missing parts of an artwork are filled in to present a complete image.[1] This process is commonly used in image restoration. It can be applied to both physical and digital art mediums such as oil or acrylic paintings, chemical photographic prints, sculptures, or digital images and video.

With its roots in physical artwork, such as painting and sculpture, traditional inpainting is performed by a trained art conservator who has carefully studied the artwork to determine the mediums and techniques used in the piece, potential risks of treatments, and ethical appropriateness of treatment.

History

The modern use of inpainting can be traced back to Pietro Edwards (1744–1821), Director of the Restoration of the Public Pictures in Venice, Italy. Using a scientific approach, Edwards focused his restoration efforts on the intentions of the artist.[2]

It was during the 1930 International Conference for the Study of Scientific Methods for the Examination and Preservation of Works of Art, that the modern approach to inpainting was established. Helmut Ruhemann (1891–1973), a German restorer and conservator, led the discussions on the use of inpainting in conservation. Helmut Ruhemann was a leading figure in modernizing restoration and conservation.[3] His greatest contribution to the field of conservation "was his insistence on following the methods of the original painter exactly, and on understanding the painter's artistic intention".[4] After his career of over 40 years as a conservator, Ruhemann published his treatise The Cleaning of Paintings: Problems & Potentialities in 1968. In describing his method, Ruhemann states that "The surface [of the fill] should be slightly lower than that of the surrounding paint to allow for the thickness of the inpainting...Inpainting medium should look and behave like the original medium, but must not darken with age."[5] Cesare Brandi (1906–1988) developed the teoria del restauro, the inpainting approach combining aesthetics and psychology. However, this approach was used primarily by Italian restorers and conservators, with the terminology becoming widespread in the 1990s.[6]

Technological advancements led to new applications of inpainting. Widespread use of digital techniques range from entirely automatic computerized inpainting to tools used to simulate the process manually.[7] Since the mid-1990s, the process of inpainting has evolved to include digital media. More commonly known as image or video interpolation, a form of estimation, digital inpainting includes the use of computer software that relies on sophisticated algorithms to replace lost or corrupted parts of the image data.

Ethics

In order to preserve the integrity of an original artwork, any inpainting technique or treatment applied to physical or digital work should be reversible or distinguishable from the original content of the artwork.[8] Prior to any treatments, conservators proceed according to the American Institute of Conservation of Historical and Artistic Works.[9]

There are several ethic considerations before Inpainting can be justified. Various deliberation decisions over the ethical appropriateness of the amount and type of inpainting done, resides on many factors. As most conservation treatments, inpainting's ethical questions rest mainly with authenticity, reversibility and documentation.

"Any intervention to compensate for loss should be documented in treatment records and reports and should be detectable by common examination methods. Such compensation should be reversible and should not falsely modify the known aesthetic, conceptual, and physical characteristics of the cultural property, especially by removing or obscuring original material."[10]

In an age of museum tourism, new technologies and aesthetic demand for perfect images without imperfections, continue to challenge conservators' ethical practices to protect the integrity of originals.[11]

Methods

Image restoration using artificial intelligence

Inpainting method techniques depend on the desired goal and type of image being treated. Treatments to fill in the gaps are very different between physical and digital art.

With all applications of inpainting, it is important to keep detailed records of the initial state of the images, treatments done and justification for treatment, and the original copies when applicable (e.g. original digital images).

Physical Inpainting

Piero della Francesca – Scene after and before restoration

Inpainting is rooted in the restoration of painted images. In the conservation and restoration of paintings, "the term inpainting refers to the compensation of paint losses – aiming at the recomposition of the missing parts of an image in order to improve its perception by making damages less visible".[12] In other words, inpainting aims to make a visual improvement to the artwork as a whole by repairing missing or damaged parts using methods and materials equivalent to the original artist's work.

Application Techniques

By studying the painting methods of various artists, the composition of paints used historically, and taking the time to carefully study the medium one is working with, conservators are able to, using an array of methodology, restore works very closely to their original visual appearance.

Other tips of inpainting:

  • The picture as a whole determines how to fill in the gap; the purpose of inpainting is to restore the unity of the work so it is crucial to know how the repaired piece will function within the rest of the image.
  • The structure of the area surrounding the gap ought to be continued into the gap. Contour lines that end at the gap boundary are to be carried on into the gap.
  • The different regions inside a gap, as defined by the contour lines, are filled with colors matching those of its boundary although the specific materials do not have to be identical. If alternate materials are to be used, it is important to test for potential reactivity.
  • The small details are painted, i.e. "texture" is added to ensure the eye will not be drawn first to the in-painted region.

Helmut Ruhemann's Inpainting Techniques by Jessell is filled with technique choices and procedures to "preserve" the quality of Oil and early Tempera paintings.[13]

Digital inpainting

Many programs are able to reconstruct missing or damaged areas of digital photographs and videos. Most widely known for use with digital images is Adobe Photoshop. Since the digital files are able to be duplicated, any restorative alterations should be made to the duplicate file, while maintaining the original files in an archive. Given the various abilities of the digital camera and the digitization of old photos, inpainting has become an automatic process that can be performed on digital images. More than mere scratch removal, the inpainting techniques can also be applied to object removal, text removal, and other automatic modifications of images and videos. In video special effects inpainting is usually performed after video matting. Furthermore, they can also be observed in applications like image compression and super resolution.

In photography and cinema, it is used for film restoration to reverse, repair, or mitigate deterioration (e.g. physical damage such as cracks in photographs or scratches and dust spots in film or chemical damage resulting in image loss; see infrared cleaning). It can also be used for removing red-eye, the stamped date from photographs, and removing objects for creative effect.

Digital Image Restoration and Reconstruction

This technique can be used to replace any lost blocks in the coding and transmission of images, for example, in a streaming video. It can also be used to remove logos in videos.

Deep learning neural network based inpainting can be used for decensoring images.[14]

Deep Image Prior based techniques can be used for digital image inpainting, where a trained deep learning model is either unavailable or infeasible.

Three main groups of 2D image inpainting algorithms can be found in literature. The first one to be noted is structural (or geometric) inpainting, the second one is texture inpainting, and the last one is a combination of these two techniques. All these inpainting methods have one thing in common: they use the information of the known or non-destroyed image areas in order to fill the gap, similar to how physical images are restored.

Structural

Structural or geometric inpainting is used for smooth images that have strong, defined borders.[15] There are many different approaches to geometric inpainting, but they all stem from the same idea that geometry can be recovered from similar areas or domains. Bertalmio[15] proposed a method of structural inpainting that mimics how conservators address painting restoration. Bertalmio proposed that by progressively transferring similar information from the borders of an inpainting domain inwards, the gap can be filled.[16]

Textural

While structural/geometric inpainting works to repair smooth images, textural inpainting works best with images that are heavily textured.[17] Texture has a repetitive pattern which means that a missing portion cannot be restored by continuing the level lines into the gap; level lines provide a complete, stable representation of an image.[18] To repair texture in an image, one can combine frequency and spatial domain information to fill in a selected area with a desired texture. This method, while the most simple and very effective, works well when selecting a texture to be in-painted. For a texture that covers a wider area or a larger frame one would have to go through the image segmenting the areas to be in-painted and selecting the corresponding textures from throughout the image; there are programs that can help find the corresponding areas that work in a similar way as 'find and replace' works in a word processor.[19]

Combined structural and textural

Combined structural and textural inpainting approaches simultaneously try to perform texture- and structure-filling in regions of missing image information. Most parts of an image consist of texture and structure and the boundaries between image regions contain a large amount of structural information. This is the result when blending different textures together. That is why state-of-the-art methods attempt to combine structural and textural inpainting.

A more traditional method is to use differential equations (such as Laplace's equation) with Dirichlet boundary conditions for continuity so as to create a seemingly seamless fit. This works well if missing information lies within the homogeneous portion of an object area.[20]

Other methods follow isophote directions (in an image, a contour of equal luminance), to do the inpainting.[21]

Model based inpainting follows the Bayesian approach for which missing information is best fitted or estimated from the combination of the models of the underlying images, as well as the image data actually being observed. In deterministic language, this has led to various variational inpainting models.[22]

Manual computer methods include using a clone tool to copy existing parts of the image to restore a damaged texture. Texture synthesis may also be used.[23]

Exemplar-based image inpainting attempts to automate the clone tool process. It fills "holes" in the image by searching for similar patches in a nearby source region of the image, and copying the pixels from the most similar patch into the hole. By performing the fill at the patch level as opposed to the pixel level, the algorithm reduces blurring artifacts caused by prior techniques.[24][25]

See also

References

  1. Newman, Richard (2011). Conservation and care of museum collections (1st ed.). MFA publications. pp. 29. ISBN 978-0-87846-729-7. 
  2. Darrow, E.J.. "Pietro Edwards and the restoration of the public pictures of Venice, 1778–1819: necessity introduced these arts". University of Washington. https://digital.lib.washington.edu/researchworks/handle/1773/6223. 
  3. National Gallery,(2019), Helmut Ruhemann Papers: 1939–1979, https://www.nationalgallery.org.uk/archive/record/NG29. Retrieved November 2. 2019.
  4. Jessell, Bettina, (1977), Helmut Ruhemann's Inpainting Techniques, Journal of the American Institute for Conservation, Volume 17, Number 1, Article 1 (pp. 01 to 08), http://cool.conservation-us.org/jaic/articles/jaic17-01-001.html, Retrieved November 2, 2019.
  5. Garland, Patricia, 2011, Chapter 3, Tradition of retouching Practices in America, pp 34–52, in Painting Conservation Catalog, Volume III Inpainting, The Paintings Specialty Group of the American Institute for Conservation, https://www.culturalheritage.org/docs/default-source/resource-guides/painting-conservation-catalog-volume-3-(inpainting).pdf, Retrieved November 2, 2019.
  6. Idelson, Antonia Iaccarino; Severini, Leonardo (18 June 2018). "Inpainting". The Encyclopedia of Archaeological Sciences: 1–4. doi:10.1002/9781119188230.saseas0330. ISBN 9780470674611. 
  7. Bertalmio, Marcelo; Sapiro, Guillermo. "Image Inpainting". https://www.ima.umn.edu/sites/default/files/1655.pdf. [|permanent dead link|dead link}}]
  8. "Inpainting | Museu Nacional d'Art de Catalunya". 25 March 2014. https://www.museunacional.cat/en/inpainting. 
  9. (1994) “AIC Code of Ethics and Guidelines for Practice”[1] https://www.culturalheritage.org/docs/default-source/administration/governance/code-of-ethics-and-guidelines-for-practice.pdf. Retrieved November 3, 2019.
  10. American Institute of Conservation of Historical and Artistic Works. (1994). "AIC Code of Ethics and Guidelines for Practice". https://www.nps.gov/training/tel/Guides/HPS1022_AIC_Code_of_Ethics.pdf. Retrieved March 27, 2020.
  11. Antonio laccarino Idelson. (28 June 2018). "Inpainting". The Encyclopedia of Archaeological Sciences. https://onlinelibrary.wiley.com/doi/full/10.1002/9781119188230.saseas0330 Retrieved March 26, 2020.
  12. Idelson, Antonio; Severini, Leonardo (28 June 2018). "Inpainting". The Encyclopedia of Archeological Sciences: 1–4. https://onlinelibrary.wiley.com/doi/full/10.1002/9781119188230.saseas0330. Retrieved October 30, 2019.
  13. Bettina Jessell. (1977). "Helmut Ruhemann's Inpainting Techniques". Journal of the American Institute for Conservation, JAIC 1977, Vol. 17, Number 1, Article 1 (pp. 08 - 08). Retrieved March 26, 2020.
  14. "This Researcher Created 'DeepCreamPy,' a Machine Learning Algorithm That Uncensors Hentai – Motherboard". 2018-10-31. https://motherboard.vice.com/en_us/article/43ekxg/machine-learning-algorithm-that-uncensors-hentai-porn-deepcreampy. 
  15. 15.0 15.1 Bugeau, Aurelie & Marcelo Bertalmio(2011).Combining Texture Synthesis and Diffusion for Image Inpainting.Hal Archives https://hal.archives-ouvertes.fr/hal-00551587/ Retrieved November 1 2019.
  16. Cao, Frederic et al. (2011) "Geometrically Guided Exemplar-Based Inpainting." SIAM Journal of Imaging Sciences Vol 4. no.4 pp. 1143–1179. https://perso.telecom-paristech.fr/gousseau/inpaintingSIAM.pdf reterieved November 2 2019.
  17. Bugeau, Aurelie & Marcelo Bertalmio(2011).Combining Texture Synthesis and Diffusion for Image Inpainting.Hal Archives https://hal.archives-ouvertes.fr/hal-00551587/
  18. Cao, Frederic et al. (2011) "Geometrically Guided Exemplar-Based Inpainting." SIAM Journal of Imaging Sciences Vol 4. no. 4 pp. 1143–1179. https://perso.telecom-paristech.fr/gousseau/inpaintingSIAM.pdf retrieved November 2 2019.
  19. Bertalmio, Marcelo & Guillermo Saprio."Image Inpainting" https://conservancy.umn.edu/bitstream/handle/11299/3365/1/1655.pdf
  20. Peterson, Ivars (11 May 2002). "Filling in Blanks". Science News 161 (19): 299–300. doi:10.2307/4013521. 
  21. Bertalmío, M.; Sapiro, G.; Caselles, V.; Ballester, C. (2000). "Image Inpainting". Proceedings of the 27th annual conference on Computer graphics and interactive techniques – SIGGRAPH '00. pp. 417–424. doi:10.1145/344779.344972. ISBN 1581132085. 
  22. Chan, T. F.; Shen, J. (2001). "Mathematical Models for Local Nontexture Inpainting". SIAM J. Appl. Math. 62 (3): 1019–1043. doi:10.1137/S0036139900368844. 
  23. Igehy, Homan; Pereira, Lucas (1997). "Image Replacement through Texture Synthesis". Proceedings of International Conference on Image Processing. 3. pp. 186–189. doi:10.1109/ICIP.1997.632049. ISBN 0-8186-8183-7. 
  24. Criminisi, A.; Perez, P.; Toyama, K. (2003). "Object Removal by Exemplar-Based Inpainting". 2003 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2003. Proceedings. 2. pp. II-721–II-728. doi:10.1109/CVPR.2003.1211538. ISBN 0-7695-1900-8. 
  25. Lorenzi, L.; Melgani, F.; Mercier, G. (2011). "Inpainting Strategies for Reconstruction of Missing Data in VHR Images". IEEE Geoscience and Remote Sensing Letters 8 (5): 914–918. doi:10.1109/LGRS.2011.2141112. Bibcode2011IGRSL...8..914L. 

External links