Advanced Image Systhesis
-
Mini Project SS 2006
 


Participants of the Project: Andri Bühler  &   André Schmidt
Idea: Play around and get some knowledge on Graph Cut algorithms.

Main Goal: To produce either a plugin for photoshop or a stand-alone version of the graph cut algorithm.

Possible Extensions: A possible extension would be to try to perform matting on the cut edges and to integrate the tool into an existing graph library.

Sources: Papers presented in the class, in detail this source. Further reading material will be added.

Final Remarks:

We intend to present our progress here in terms of working binaries and/or some documentations on problems and solutions. This discription may change over time and as we see the abstract at this moment in a draft status. The main goal is going to remain as formulated.

Requirements:

In order to run the program you need a linux machine (binaries for windows computers eventually will be added later). Additionally a glut and a tiff library need to be installed on your system. We assume that you know how this has to be done ;-)

 


11th May 2006:
 
  After reading few papers and playing around with an implementation of he maxflow algorithm we got our first results. Here a small binary (for linux) showing the result of a graph cut.

ais (21 kb)

For playing around please also download the source files from here (60 kb). For tuning parameters as vertex and edge weights edit test.cpp.
 


18th June 2006:
 
  First version of the batch algorithm ready. In this version only pictures up to 300x300 pixels are supported due to the computational complexity.

ais.exe (168 kb)

How the program works: The program will look for two bitmaps in its directory. One is the original image, the other one would be a bitmap with some green and red stripes in it, the selection bitmap. As examples take these two images: picture.bmp and selection.bmp

               


23th June 2006:
 
  Final Version: We rewrote the program to use it as a plug-in for the "Painter" framework supported by Michael Waschbsch. In order to do so we made a few extensions on the ais.cpp as "Painter" only supports the TIFF image format.

painter (204 kb)

How the program works: You will need read/write access to the directory since the program will write data to the disk. To start by console:

      ./painter input_image.tif

How to use the graph cut plugin in a few steps:

   1  Start painter.
   2  Press 'c' start the graph cut plugin. Note the messages displayed on the console.
   3  Press 'f' and select the foreground (object). Use F1 to F10 to variate the brush size.
   4  Press 'b' and select the background. Use F1 to F10 to variate the brush size.
   5  Press 'enter' to start the cut. To save the image press 's'.
   6  Press 'C' to go back to the last selection. To invert the selection press 'i'.
   7  To start over press 'o'. To save the result press 's'.


Messages are displayed on the console. Remember to use TIFF images only! To display a help message press '?'.

               


29th June 2006:
 
  Because the deadline got postponed we decided to add a few additional features:

painter (207 kb)

It's now possible to undo the selection of background and foreground. To do so hit the 'RightMouse' button.

For more detailed instructions press '?'.

               


30th June 2006:
 
  Final remarks:

The project was fun. To round things up we provide here the source code.

painter_v1.tar.gz (2.7 mb)

For questions please do not hesitate to email either Andri  or  myself.