Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c6c16f9
  • /
  • README.txt
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:f8678d0f8a4575d8096ab5779ce4e27ebdad2cd5
directory badge
swh:1:dir:c6c16f948e8f1f33bd1d65f6686d3c4b833241e6

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
README.txt
% gti: Gaussian Texture Inpainting

This software is written by
     Bruno Galerne <bruno.galerne@parisdescartes.fr>
     Arthur Leclaire <arthur.leclaire@cmla.ens-cachan.fr>

This program is free software: you can use, modify and/or
redistribute it under the terms of the simplified BSD
License. You should have received a copy of this license along
this program. If not, see
<http://www.opensource.org/licenses/bsd-license.html>.

This is the version 1.3 of gti, released August 2019.
Future versions and updates on the IPOL website.

# OVERVIEW

The program performs inpainting of texture images.
It relies on conditional simulation of a Gaussian texture model
on the mask, knowing the values of the texture on a border of the mask.
The Gaussian texture model is estimated on the mask complement.
The linear system involved in the Gaussian conditional simulation
is solved with a conjugate gradient descent.

For more information consult the corresponding paper at the address
https://www.ipol.im/pub/art/2017/198/

# COMPILATION

This software requires an ANSI C compiler and the libpng library[1-2],
version >= 1.2, and the libfftw3 library[4].
Pre-compiled versions of the libpng library are
available for Linux (libpng-dev in most distributions), Mac OS X (in
fink[1]) and Windows (provided by GnuWin32[3]).

Several parts of this software can run faster thanks to parallel
computations relying on the OpenMP library[5]. In order to use
parallel FFTW routine, you should also install libfftw3_omp.
If preferred you may use library 'fftw3_threads’ instead of ‘fftw3_omp’
but then you should edit both the source code and the compilation instructions.

To compile gti, use the makefile with simply `make`. 
Alternately you can call your C compiler with
	cc src/io_png.c src/gti.c -Wall -std=c99 -Wextra -pedantic -O3 -ftree-vectorize -funroll-loops -fopenmp -lpng -lfftw3f_omp -lfftw3f -lgomp -lm -o gti

If you do not have the OpenMP library, you should edit the makefile
and remove libraries containing "openmp" or "omp" before using make.
Alternately you can call your C compiler with
	cc src/io_png.c src/gti.c -Wall -std=c99 -Wextra -pedantic -O3 -ftree-vectorize -funroll-loops -lpng -lfftw3f -lm -o gti

You can also build a version with optimization options for gcc with
`make opti` and one with debugging symbols with `make debug`.

[1] http://www.libpng.org/pub/png/libpng.html
[2] http://pdb.finkproject.org/pdb/browse.php?summary=libpng
[3] http://gnuwin32.sourceforge.net/packages/libpng.htm
[4] http://www.fftw.org/
[5] http://www.openmp.org/

# DOCUMENTATION

You can generate the documentation for this software by going
in the doc directory and running the command
	doxygen doxygen.conf
After that, you can open the file doc/html/index.html in your
web browser.

# USAGE

This program only reads and writes PNG files. The call syntax is
    gti in.png mask.png out.png [ep niter w]
where
     in.png, mask.png	are the input images
     in.png  		is the image to be inpainted
     mask.png		is the mask image (white on inpainting domain)
     out.png		output image     
     ep, niter, w	are optional parameters
     ep	 		is the desired precision for linear solving
     niter		is the max number of iterations of gradient descent
     w			is the width of the conditioning border

The software will fill the inpainting domain (defined by the white
zone in mask.png) with a texture sample derived from the values of
in.png outside the mask. The inpainted image is stored in out.png.

# EXAMPLES

An example input image is provided in the data folder.

* simple inpainting
    gti data/in.png data/mask.png data/out.png

* inpainting with specific parameters
    gti data/in.png data/mask.png data/out.png 0.00001 10000 5

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API