Walter Bell (

November 2, 2001




Recently, Ramin Zabih asked me if I could do an implementation of a graph cut algorithm that some of his students had been working on. Since I like graph theory myself, and Ramin's been pretty good to me during my stay here at Cornell, I implemented a new Max-Flow/Min-Cut algorithm tailored for computer vision applications.

This is an implementation from the paper: 

An Experimental Comparison of Min-Cut/Max-Flow algorithms for Energy Minimization in Vision

It has some nice tweaks that give it very good memory usage and cache performance, which makes it quite efficient. The algorithm has a few added optimizations that are not present in the paper, but the basic algorithm is the same. This is C++ code that should be platform neutral (if you find out otherwise, please let me know.) I have tested it under Windows 2000 as well as GNU/Linux. Please mail me if you have any questions on the use of this code.

graphcut-v1.03.tar.gz (download from

2001 walter bell