max-flow

Modification to Maximum Flow Algorithm

此生再无相见时 提交于 2019-12-03 15:08:40
I've tried to solve a question about the maximum-flow problem . I have one source and two sinks. I need to find a maximum flow in this network. This part is general max-flow. However, both targets have to get same amount of flow in this special version of the max-flow problem. Is there anyone who can help me what should I do to do that? Let s be your source vertex and t1 and t2 the two sinks. You can use the following algorithm: Use regular max-flow with two sinks, for example by connecting t1 and t2 to a super-sink via edges with infinite capacities. You now have the solution with maximum

Image segmentation with maxflow

六月ゝ 毕业季﹏ 提交于 2019-12-03 08:04:21
问题 I have to do a foreground/background segmentation using maxflow algorithm in C++. (http://wiki.icub.org/iCub/contrib/dox/html/poeticon_2src_2objSeg_2src_2maxflow-v3_802_2maxflow_8cpp_source.html). I get an array of pixels from a png file according to their RBG but what are the next steps. How could I use this algorithm for my problem? 回答1: I recognize that source very well. That's the Boykov-Kolmogorov Graph Cuts library. What I would recommend you do first is read their paper. Graph Cuts is

Image segmentation with maxflow

无人久伴 提交于 2019-12-02 21:31:09
I have to do a foreground/background segmentation using maxflow algorithm in C++. ( http://wiki.icub.org/iCub/contrib/dox/html/poeticon_2src_2objSeg_2src_2maxflow-v3_802_2maxflow_8cpp_source.html ). I get an array of pixels from a png file according to their RBG but what are the next steps. How could I use this algorithm for my problem? I recognize that source very well. That's the Boykov-Kolmogorov Graph Cuts library. What I would recommend you do first is read their paper . Graph Cuts is an interactive image segmentation algorithm. You mark pixels in your image on what you believe belong to

Fast max-flow min-cut library for Python

邮差的信 提交于 2019-11-29 00:24:58
问题 Is there a reliable and well-documented Python library with a fast implementation of an algorithm that finds maximum flows and minimum cuts in directed graphs? pygraph.algorithms.minmax.maximum_flow from python-graph solves the problem but it is painfully slow: finding max-flows and min-cuts in a directed graph with something like 4000 nodes and 11000 edges takes > 1 minute. I am looking for something that is at least an order of magnitude faster. Bounty : I'm offering a bounty on this

How can I find the minimum cut on a graph using a maximum flow algorithm?

瘦欲@ 提交于 2019-11-28 03:19:03
I need to find the minimum cut on a graph. I've been reading about flow networks, but all I can find are maximum flow algorithms such as Ford-Fulkerson, push-relabel, etc. Given the max flow-min cut theorem, is it possible to use one of those algorithms to find the minimum cut on a graph using a maximum flow algorithm? How? The best information I have found so far is that if I find "saturated" edges i.e. edges where flow equals capacity, those edges correspond to the minimum cut. Is that true? It doesn't sound 100% right to me. It is true that all edges on the minimum cut will be saturated,

How can I find the minimum cut on a graph using a maximum flow algorithm?

陌路散爱 提交于 2019-11-27 00:00:33
问题 I need to find the minimum cut on a graph. I've been reading about flow networks, but all I can find are maximum flow algorithms such as Ford-Fulkerson, push-relabel, etc. Given the max flow-min cut theorem, is it possible to use one of those algorithms to find the minimum cut on a graph using a maximum flow algorithm? How? The best information I have found so far is that if I find "saturated" edges i.e. edges where flow equals capacity, those edges correspond to the minimum cut. Is that true