<bibtex>\r
\r
-@article{goldberg1988new,\r
+article{goldberg1988new,\r
title={A new approach to the maximum-flow problem},\r
author={Goldberg, Andrew V and Tarjan, Robert E},\r
journal={Journal of the ACM (JACM)},\r
publisher={ACM}\r
}\r
\r
-@article{Mazzoni1991257,\r
- title = "The maximum flow problem: A max-preflow approach ",\r
+@article{goldberg1988new,\r
+ AUTHOR = {Goldberg, Andrew V. and Tarjan, Robert E.},\r
+ TITLE = {A new approach to the maximum-flow problem},\r
+ JOURNAL = {J. Assoc. Comput. Mach.},\r
+ FJOURNAL = {Journal of the Association for Computing Machinery},\r
+ VOLUME = {35},\r
+ YEAR = {1988},\r
+ NUMBER = {4},\r
+ PAGES = {921--940},\r
+ ISSN = {0004-5411},\r
+ CODEN = {JACOAH},\r
+ MRCLASS = {90B10 (68Q25)},\r
+ MRNUMBER = {1072405 (92c:90050)},\r
+ MRREVIEWER = {Robert E. Beck},\r
+ DOI = {10.1145/48014.61051},\r
+ URL = {http://dx.doi.org/10.1145/48014.61051},\r
+}\r
+\r
+article{Mazzoni1991257,\r
+ title = "The maximum flow problem: {A} max-preflow approach ",\r
journal = "European Journal of Operational Research ",\r
volume = "53",\r
number = "3",\r
keywords = "experimentation "\r
}\r
\r
-@article{cherkassky1997implementing,\r
+article{cherkassky1997implementing,\r
title={On implementing the push—relabel method for the maximum flow problem},\r
author={Cherkassky, Boris V and Goldberg, Andrew V},\r
journal={Algorithmica},\r
publisher={Springer}\r
}\r
\r
-@article{ahuja1997computational,\r
+@article{cherkassky1997implementing,\r
+ AUTHOR = {Cherkassky, B. V. and Goldberg, A. V.},\r
+ TITLE = {On implementing the push-relabel method for the maximum flow problem},\r
+ JOURNAL = {Algorithmica},\r
+ FJOURNAL = {Algorithmica. An International Journal in Computer Science},\r
+ VOLUME = {19},\r
+ YEAR = {1997},\r
+ NUMBER = {4},\r
+ PAGES = {390--410},\r
+ ISSN = {0178-4617},\r
+ CODEN = {ALGOEJ},\r
+ MRCLASS = {68Q25 (68R05)},\r
+ MRNUMBER = {1470042},\r
+ DOI = {10.1007/PL00009180},\r
+ URL = {http://dx.doi.org/10.1007/PL00009180},\r
+}\r
+\r
+article{ahuja1997computational,\r
title={Computational investigations of maximum flow algorithms},\r
author={Ahuja, Ravindra K and Kodialam, Murali and Mishra, Ajay K and Orlin, James B},\r
journal={European Journal of operational research},\r
publisher={Elsevier}\r
}\r
\r
-@incollection{boykov2006graph,\r
- title={Graph cuts in vision and graphics: Theories and applications},\r
+incollection{boykov2006graph,\r
+ title={Graph cuts in vision and graphics: {T}heories and applications},\r
author={Boykov, Yuri and Veksler, Olga},\r
booktitle={Handbook of mathematical models in computer vision},\r
pages={79--96},\r
publisher={Springer}\r
}\r
\r
-@article{derigs1989implementing,\r
- title={Implementing Goldberg's max-flow-algorithm—A computational investigation},\r
+@incollection{boykov2006graph,\r
+ AUTHOR = {Boykov, Y. and Veksler, O.},\r
+ TITLE = {Graph cuts in vision and graphics: theories and applications},\r
+ BOOKTITLE = {Handbook of mathematical models in computer vision},\r
+ PAGES = {79--96},\r
+ PUBLISHER = {Springer, New York},\r
+ YEAR = {2006},\r
+ MRCLASS = {68U05 (94A08)},\r
+ MRNUMBER = {2232525},\r
+ DOI = {10.1007/0-387-28831-7_5},\r
+ URL = {http://dx.doi.org/10.1007/0-387-28831-7_5},\r
+}\r
+\r
+article{derigs1989implementing,\r
+ title={Implementing {G}oldberg's max-flow-algorithm—A computational investigation},\r
author={Derigs, Ulrich and Meier, Wolfgang},\r
journal={Zeitschrift f{\"u}r Operations Research},\r
volume={33},\r
publisher={Springer}\r
}\r
\r
+@article{derigs1989implementing,\r
+ AUTHOR = {Derigs, U. and Meier, W.},\r
+ TITLE = {Implementing {G}oldberg's max-flow-algorithm---a computational\r
+ investigation},\r
+ JOURNAL = {Z. Oper. Res.},\r
+ FJOURNAL = {Zeitschrift f\"ur Operations Research. Mathematical Methods of\r
+ Operations Research},\r
+ VOLUME = {33},\r
+ YEAR = {1989},\r
+ NUMBER = {6},\r
+ PAGES = {383--403},\r
+ ISSN = {0340-9422},\r
+ MRCLASS = {90C35 (90B10)},\r
+ MRNUMBER = {1030791 (90k:90163)},\r
+ DOI = {10.1007/BF01415937},\r
+ URL = {http://dx.doi.org/10.1007/BF01415937},\r
+}\r
+\r
@incollection{caselles2011total,\r
title={Total variation in imaging},\r
author={Caselles, Vicent and Chambolle, Antonin and Novaga, Matteo},\r
author={Rudin, Leonid I and Osher, Stanley and Fatemi, Emad},\r
journal={Physica D: Nonlinear Phenomena},\r
volume={60},\r
- number={1},\r
+ number={1--4},\r
pages={259--268},\r
year={1992},\r
publisher={Elsevier}\r
}\r
\r
-@article{darbon2006image,\r
+article{darbon2006image,\r
title={Image restoration with discrete constrained total variation part I: Fast and exact optimization},\r
author={Darbon, J{\'e}r{\^o}me and Sigelle, Marc},\r
journal={Journal of Mathematical Imaging and Vision},\r
publisher={Springer}\r
}\r
\r
+@article{darbon2006image,\r
+ AUTHOR = {Darbon, J{\'e}r{\^o}me and Sigelle, Marc},\r
+ TITLE = {Image restoration with discrete constrained total variation.\r
+ {P}art {I}: {F}ast and exact optimization},\r
+ JOURNAL = {J. Math. Imaging Vision},\r
+ FJOURNAL = {Journal of Mathematical Imaging and Vision},\r
+ VOLUME = {26},\r
+ YEAR = {2006},\r
+ NUMBER = {3},\r
+ PAGES = {261--276},\r
+ ISSN = {0924-9907},\r
+ CODEN = {JMIVEK},\r
+ MRCLASS = {68U10 (94A08)},\r
+ MRNUMBER = {2286448 (2008b:68117)},\r
+ MRREVIEWER = {Vassileios Drakopoulos},\r
+ DOI = {10.1007/s10851-006-8803-0},\r
+ URL = {http://dx.doi.org/10.1007/s10851-006-8803-0},\r
+}\r
+\r
@inproceedings{boykov2003computing,\r
title={Computing geodesics and minimal surfaces via graph cuts},\r
author={Boykov, Yuri and Kolmogorov, Vladimir},\r
organization={IEEE}\r
}\r
\r
-@book{weickert1998anisotropic,\r
+book{weickert1998anisotropic,\r
title={Anisotropic diffusion in image processing},\r
author={Weickert, Joachim},\r
volume={1},\r
publisher={Teubner Stuttgart}\r
}\r
\r
-@article{chambolle2004algorithm,\r
+@book{weickert1998anisotropic,\r
+ AUTHOR = {Weickert, Joachim},\r
+ TITLE = {Anisotropic diffusion in image processing},\r
+ SERIES = {European Consortium for Mathematics in Industry},\r
+ PUBLISHER = {B. G. Teubner, Stuttgart},\r
+ YEAR = {1998},\r
+ ISBN = {3-519-02606-6},\r
+ MRCLASS = {94A08 (65M30 68U10)},\r
+ MRNUMBER = {1666943 (2000a:94003)},\r
+ MRREVIEWER = {Gilbert Crombez},\r
+}\r
+\r
+article{chambolle2004algorithm,\r
title={An algorithm for total variation minimization and applications},\r
author={Chambolle, Antonin},\r
journal={Journal of Mathematical imaging and vision},\r
publisher={Springer}\r
}\r
\r
+@article{chambolle2004algorithm,\r
+ AUTHOR = {Chambolle, Antonin},\r
+ TITLE = {An algorithm for total variation minimization and\r
+ applications},\r
+ NOTE = {Special issue on mathematics and image analysis},\r
+ JOURNAL = {J. Math. Imaging Vision},\r
+ FJOURNAL = {Journal of Mathematical Imaging and Vision},\r
+ VOLUME = {20},\r
+ YEAR = {2004},\r
+ NUMBER = {1-2},\r
+ PAGES = {89--97},\r
+ ISSN = {0924-9907},\r
+ CODEN = {JMIVEK},\r
+ MRCLASS = {49M30 (65R32 68T45 68U10 90C30)},\r
+ MRNUMBER = {2049783 (2005m:49058)},\r
+ DOI = {10.1023/B:JMIV.0000011320.81911.38},\r
+ URL = {http://dx.doi.org/10.1023/B:JMIV.0000011320.81911.38},\r
+}\r
+\r
@incollection{kolmogorov2002energy,\r
title={What energy functions can be minimized via graph cuts?},\r
author={Kolmogorov, Vladimir and Zabih, Ramin},\r
publisher={MIT press}\r
}\r
\r
-@book{scherzer2008variational,\r
+book{scherzer2008variational,\r
title={Variational methods in imaging},\r
author={Scherzer, Otmar and Grasmair, Markus and Grossauer, Harald and Haltmeier, Markus and Lenzen, Frank},\r
volume={167},\r
publisher={Springer}\r
}\r
\r
+@book{scherzer2008variational,\r
+ AUTHOR = {Scherzer, Otmar and Grasmair, Markus and Grossauer, Harald and\r
+ Haltmeier, Markus and Lenzen, Frank},\r
+ TITLE = {Variational methods in imaging},\r
+ SERIES = {Applied Mathematical Sciences},\r
+ VOLUME = {167},\r
+ PUBLISHER = {Springer, New York},\r
+ YEAR = {2009},\r
+ ISBN = {978-0-387-30931-6},\r
+ MRCLASS = {49-02 (49J10 68U10 94A08)},\r
+ MRNUMBER = {2455620 (2009j:49001)},\r
+ MRREVIEWER = {Bogdan G. Nita},\r
+}\r
+\r
@article{opencv_library,\r
author = {Bradski, G.},\r
citeulike-article-id = {2236121},\r
year = {2000}\r
}\r
\r
-@incollection{dinitz2006dinitz,\r
+incollection{dinitz2006dinitz,\r
title={Dinitz' algorithm: The original version and Even's version},\r
author={Dinitz, Yefim},\r
booktitle={Theoretical Computer Science},\r
publisher={Springer}\r
}\r
\r
+@incollection{dinitz2006dinitz,\r
+ AUTHOR = {Dinitz, Yefim},\r
+ TITLE = {Dinitz' algorithm: the original version and {E}ven's version},\r
+ BOOKTITLE = {Theoretical computer science},\r
+ SERIES = {Lecture Notes in Comput. Sci.},\r
+ VOLUME = {3895},\r
+ PAGES = {218--240},\r
+ PUBLISHER = {Springer, Berlin},\r
+ YEAR = {2006},\r
+ MRCLASS = {90C35 (01A60 05C85 90-03)},\r
+ MRNUMBER = {2248665 (2007f:90123)},\r
+ MRREVIEWER = {Mechthild Opperud},\r
+ DOI = {10.1007/11685654_10},\r
+ URL = {http://dx.doi.org/10.1007/11685654_10},\r
+}\r
+\r
@article{boykov2004experimental,\r
title={An experimental comparison of min-cut/max-flow algorithms for energy minimization in vision},\r
author={Boykov, Yuri and Kolmogorov, Vladimir},\r
publisher={IEEE}\r
}\r
\r
+@article{cheriyan1989analysis,\r
+ title={Analysis of preflow push algorithms for maximum network flow},\r
+ author={Cheriyan, Joseph and Maheshwari, SN},\r
+ journal={SIAM Journal on Computing},\r
+ volume={18},\r
+ number={6},\r
+ pages={1057--1086},\r
+ year={1989},\r
+ publisher={SIAM}\r
+}\r
+\r
</bibtex>\r
rigorous maybe.}
\subsection{Complexity}
-Bleep bloop.
-\fixme{Edge list problematikk.}
-\fixme{We have proved that when the first phase has terminated, we can
- find the minimum cut, but should we maybe prove that the first phase
- will terminate? Using the fact that the distance labels can only
- increase? And the fact that we only push to lower vertices?
- Computing the complexity is kind of like proving termination since
- we find an upper bound on the number of operations.
-}
+
+In their original article \cite{goldberg1988new}, Goldberg and Tarjan
+analyze the complexity of the push-relabel algoritm by considering the
+maximum number of basic operations we can possibly do before the
+algorithm terminates.
+
+The number of relabelings is in $O(\abs{V}^2)$ since every time the
+procedure is applicable to a vertex $u$, the label $d(u)$ increases by
+at least one.
+
+The number of saturating pushes is in $O(\abs{V}\abs{E})$. When a push
+along $(u,v)$ is saturating, the label of $v$ has to increase with at
+least 2 before a push can saturate the same edge (and then in the
+opposite direction). Since the number of relabelings is bounded by
+$\abs{V}$, and we have $\abs{E}$ edges, this gives the stated number of
+saturating pushes.
+
+The number of non-saturating pushes is the most complicated to bound,
+and will also make up the asymptotic running time of the algorithm. The
+idea is to define
+\begin{equation}
+ \phi = \sum_{\mathclap{u \text{ active}}} d(u),
+\end{equation}
+and look at how much this number changes throughout the algorithm. It
+starts at zero and ends at zero. Every non-saturating push from $u$ to
+$v$ makes $\phi$ decrease by at least one since it makes the $u$
+inactive (but might activate $v$). The total increase in $\phi$ due to
+relabelings is less than $\abs{V}^2$. A saturating push from $u$ to $v$
+increases $\phi$ by at most $\abs{V}$, since $v$ might become active.
+
+Even if $\phi$ is always increased by relabelings and saturating pushes,
+we can bound the number of non-saturating pushes by
+\begin{equation}
+ \abs{V}^2 + c \abs{V} \underbrace{\abs{V}
+ \abs{E}}_{\mathclap{\#(\text{saturating pushes})}}
+\end{equation}
+which means that in the general case, the algorithm has a complexity of
+$O(\abs{E}\abs{V}^2)$.
\subsection{Vertex selection rules}
-\fixme{Also mention this over complexity.}
Until now we have just stated that the discharge procedure is run on
active nodes until there are no more active nodes left. The choice of
the order in which to discharge these active nodes remain, and multiple
The FIFO approach is to always maintain a queue of active vertices. When
the vertex from the beginning of the queue is discharged, other vertices
-might become active, and these are added at the end of the queue.
-\fixme{Running time and reference.}
+might become active, and these are added at the end of the queue. The
+original article of Goldberg and Tarjan \cite{goldberg1988new} contains
+a proof that this selection rule gives a complexity of $O(\abs{V}^3)$,
+which can be very good if you have a dense graph.
The highest level selection rule always discharges the vertex with the
-largest distance label.
-\fixme{Running time and reference.}
+largest distance label by always keeping track of which active vertices
+has what label. Goldberg and Tarjan state that this rule also gives a
+complexity of $O(\abs{V}^3)$ while this bound is improved to
+$O(\abs{V}^2 \sqrt{\abs{E}})$ in an article by Cheriyan and Maheshwari
+\cite{cheriyan1989analysis}.
+
+These are complexity bounds, and the actual running time of the
+algorithm, which can only be determined by implementing it and running
+it, varies a lot with how the input network looks.
+
+\fixme{No reference to ON IMPLEMENTING THE PUSH-RELABEL?}
\subsection{Heuristics}
Different heuristics exists that can speed up the algorithm
\subsection{Divide and conquer}
The possibility of re-using the network between separate level
is a very nice property of the push-relabel algorithm, but there are
-further room for improvements. Consider one pixel $x$ with value $u_x$,
+further room for improvements. Consider one pixel $x$ with value $u_x$,
and imagine we only wanted to find the value of this pixel. One could go
through all pixel values $\lambda \in (L-1, \ldots, 0)$, and see when
$u^\lambda_x$ changes from $1$ to $0$, just as we do for all the pixels
$\lambda$, we choose some $\lambda$ in the middle of the range $\{0,
\ldots, L-1\}$. The cut we obtain consists of two sets $S = \{ u \in V :
d(u) \geq N\}$ and $T = V - S$. We know that no more flow can be sent
-from $S$ to $T$, even if we decrease the value of $\lambda$ and adjust
+from $S$ to $T$, even if we decrease the value of $\lambda$ and adjust
the capacities accordingly.
The idea is now that we have halved the possible $\lambda$ interval for
-\emph{all} pixels. We continue by considering the two sets $S$ and $T$
+\emph{all} pixels. We continue by considering the two sets $S$ and $T$
separately, and applying the algorithm recursively, at each time halving
the $\lambda$ interval until we have the value of every pixel.
\subsection{Implementation}
-\cite{opencv_library}
+A \cpp\ implementation can be found in appendix
+\ref{app:c++implementation}. It uses the open computer vision library
+OpenCV \cite{opencv_library} to load and save image files.
-\subsection{Bleep bloop}
+Note that when implementing maximum flow algorithms, it is not a good
+idea, memory- and performance-wise, to actually construct the residual
+network $G_f$. Instead, every time we update the flow $f(u,v)$ we set
+the flow in the opposite direction to its negative value $f(v,u) =
+-f(u,v)$. Then we can at any time, consider the value $c(u,v) - f(u,v)$
+in the place of the residual capacity $c_f(u,v)$.
-Maybe we should delete the $u$-$t$ edge when the vertex reaches a level
-> 1?
+For the gap relabeling heuristic, we need to have a easy way of finding
+when a gap occurs. This is done by keeping track of how many vertices
+exist with each label.
+
+\subsection{Bleep bloop}
Initially proposed in \cite{goldberg1988new} where one can also find
proof that the algorithm maintains a valid labeling and that it