
   
   An Image Inpainting Technique based on the Fast Marching Method
   ===============================================================
   A. C. Telea, Eindhoven University of Technology, 2003-2004


   This is a C++ sample implementation of the inpainting technique
   based on the Fast Marching Method (FMM). The purpose of the inpainting 
   method is simple: given some target image, containing some drawing, and a
   'scratch' image, containing some areas on the target image marked as
   'garbage', the inpainting method will try to restore the garbage pixels using
   only information from the other (non-garbage) image pixels. This method is
   useful when one has an image and wants to restore, or remove, some details.

   The C++ sources can be compiled with Microsoft's Visual Studio 2005 (or newer).
   Projects (or makefiles) can be easily created for other platforms/compilers,
   as needed - like gcc or Borland C++.



   How to run
   ==========

   The following assumes you either have compiled the software for your own
   platform, or you are using the already provided Windows 32-bit executable,
   called AFMM.exe. You also should have a machine supporting basic OpenGL
   graphics (any PC manufactured in the last 5..6 years should be OK).

   Once you have this executable, proceed as follows.

   a) Start the executable.

   b) The executable expects two file names for two images in 24-bit BMP format:

   - the 'target image', i.e. the image to inpaint. This image needs to contain
     valid data ONLY in the pixels NOT marked as 'scratch' in the scratch image
     (see more about that scratch image next).

   - the 'scratch image', i.e. the image containing the region to inpaint
     marked with black pixels, and the known image area marked with white pixels.
     Basically, all pixels in the target image are supposed to be correct for
     corresponding white scratch-image pixels, and can be anything (like, garbage
     pixels) for corresponding black-image pixels.  

   Only the original image pixels corresponding to white scratch image pixels
   will be used. The original image pixels corresponding to black scratch
   image pixels can be anything, they will not be used during inpainting.
   The two images must have exactly the same dimension.


   Results
   =======
  
   After the inpainting completes, which should take just a few seconds on a modern PC,
   an image of the restored drawing will be shown in a graphics window.


   More information
   ================

   The actual inpainting method is described in detail in the paper

   
   An Image Inpainting Technique Based on the Fast Marching Method
   (A. C. Telea, Journal of Graphics Tools, vol. 9, no. 1, 2004, pp. 25-36

   The paper is easily accessible on the internet (google for it).

 