Energy minimization problem

Dear all,

I recently discoverd the graph-tool library so first of all congratulation
for this development and the nice documentation.

As a non "graph" guy I'm currently facing some trouble trying to adapt an
energy minimization problem using the boykov_kolmogorov_max_flow function.
The goal is to reproduced the work of this paper
<https://www.cis.uab.edu/kddm/seminar_home/Lin_Sept25_tree-camera-ready.pdf&gt;
(page 3) which uses the max flow function on an 8 connected image where
each pixels are discribed by a discrete value (0 or 1) and a probability.
I'm still wondering what's the best way to create an 8-connected graph from
an array and how to deal with the dual description of the pixels.
I some of you have some tips to share, i would gladely listen to them.

Thanks in advance,

attachment.html (939 Bytes)

I don't fully understand what you are trying to do. It seems to me you
are just having problems with the general approach described in the
paper you cited, and not with the use of graph-tool. If you want any
practical advice on using the library, it would be better if you went
into more detail.

Best,
Tiago