Computer Vision, Speech Communication &

Signal Processing Group

NTUA | ECE
Faculty | PhD Students | Collaborators
Journal | Book Chapters | Conference
Undergraduate | Graduate | Diploma Theses

GAC++: A Toolbox for PDE-Based Image Processing

Overview

GAC++ is a toolbox written in C++ for the efficient solution of partial differential equations arising in image analysis and computer vision. The emphasis is on the solution of time-dependent models, such as anisotropic diffusion and level-set-based geometric active contours, using stable implicit schemes, as explained in detail in the related publications.

Highlight of GAC++ is the solution of these PDE models with multigrid algorithms, as exemplified by our multigrid algorithm for the fast evolution of level-set-based geometric active contours, which allows real-time performance on conventional PCs. Key for the efficiency of the technique is the solution of a big sparse linear system with multigrid techniques, which attack the problem at multiple resolutions.

Author

GAC++'s author is George Papandreou.

Architecture

The main objective in the design of GAC++ has been the clear separation of three distinct entities:

  • PDE problem definition (PdeProblem). This refers to the continuous formulation of the PDE and its discretization by a proper finite-difference spatial scheme, yielding a corresponding stencil.
  • Time-stepping method (Evolver). This refers to the particular time integration method selected; explicit schemes (e.g. Euler's method), implicit schemes (e.g. AOS, backward Euler, or Crank-Nicolson) are viable alternatives.
  • System solver (LinearSolver). A given large and sparse linear system which arises after we utilize a particular Evolver can be solved by different alternative sparse linear solvers. For example, various multigrid solvers (e.g. MGD9V or AMG1R5) can be used.
These three different entities can be selected in GAC++ during compile time independently of each other (provided of course that the selected components are mutually compatible).

Another objective has been good performance. Towards that end, we use C++ templates extensively, and also utilize optimized FORTRAN routines in critical parts of the code.

Usage

The code can be used to build two types of binaries:

  • Standalone executables, called from the command prompt.
  • MEX-dynamic libraries, called from the MATLAB environment.

Compiling

The code is written in standard C++ and makes heavy use of templates. It has been compiled successfully both on Linux using gcc and on Windows using recent versions of Microsoft's Visual Studio. Pre-compiled binaries (both standalone executables and MEX-dynamic libraries) for Linux and Microsoft Windows are also included, in case the user doesn't wish to compile the examples by herself.

Dependencies

GAC++ does not implement its own linear system solvers. Instead, I have built interfaces to external fast and robust numerical solvers. Currently, interfaces to the following solvers are available:

  • MGD9V, written by Paul M. de Zeeuw: this is a FORTRAN matrix-dependent multigrid solver for PDE problems defined on 2-D rectangular domains. Note that, although MGD9V is bundled with the GAC++ distribution, it is a separate program, subject to its own license.
  • AMG1R5, written by John Ruge, Klaus Stueben, and Rolf Hempel: this is a FORTRAN algebraic multigrid solver. Note that AMG1R5 is not freely available anymore and I am not allowed to bundle it with GAC++. AMG1R5 has been replaced by an improved solver, SAMG, which is a commercial product sold by Fraunhofer SCAI.
  • LAPACK tridiagonal solvers: I have bundled GAC++ with some LAPACK tridiagonal system solver routines in FORTRAN, which are used when the PDEs are discretized with split numerical schemes. If your system comes with optimized LAPACK routines, link the code with them.
Note that these external solvers are not part of GAC++ and are covered by their own licenses.

Apart from that, GAC++ uses ImageMagick for image input/output, although you can easily use your own routines instead.

Downloads

The easiest way to start using GAC++ is by calling it from Matlab as a MEX-dynamic library. MEX binaries for Linux (Matlab 2007a, 32/64 bits), Microsoft Windows (Matlab 2007a, 32-bits), and MacOS (Matlab 2007b) are provided here:

See the Release Notes for the change log.

To obtain the full source code of GAC++, please contact George Papandreou by email.

Publications

  • G. Papandreou and P. Maragos,
    Multigrid Geometric Active Contour Models,
    IEEE Transactions on Image Processing, vol. 16, no. 1, pp. 229-240, Jan. 2007.
    [pdf] [bib]
  • G. Papandreou and P. Maragos,
    A Fast Multigrid Implicit Algorithm for the Evolution of Geodesic Active Contours,
    Proc. Int'l Conf. on Computer Vision and Pattern Recognition (CVPR-2004), Washington DC, June 2004.
    [pdf] [bib]
If you use GAC++ in your research, please cite our journal article, which is the most up-to-date reference to GAC++'s functionality.
See also our related research web page on Multigrid Geometric Active Contours.

Related Software

If you are interested in GAC++, you might also find the following software useful:
  • CImg: an image processing toolbox also geared towards PDE-based techniques (but not supporting implicit solvers).
  • restoreInpaint: image restoration toolbox, implementing various inpainting techniques.
  • PETSc: a toolkit for scientific applications on single or multiple computers, whose architecture has inspired the design of GAC++.

Release History

GAC++ emerged from my research in multigrid algorithms for geometric active contour models (see more here). In roughly the current architecture, it is being developed and improved since 2004. The first public MEX-only version was released in January 2007, while the first open source version was distributed in May 2008.

Licensing

GAC++ is Copyright © 2004-2010 by George Papandreou. GAC++ is distributed under the GNU General Public License (GPL). If you are interested in alternative licensing options (i.e. Dual Licensing) or consulting help, please contact George Papandreou by email.

Note: GAC++ is computer vision research software and thus comprehending the code requires familiarity with computer vision ideas and active contours in particular. Also, due to time constraints, I can only provide limited user support.

Acknowledgments

Financial support for this software has been provided by the FP6 European Network of Excellence MUSCLE, under contract no. IST-FP6-507752. This is gratefully acknowledged.

Last Update: June 4, 2008
For comments or questions contact George Papandreou.

Last modified: Monday, 15 February 2010 | Created by Nassos Katsamanis and George Papandreou