Hi all, I need your help to solve a problem I’m thinking of.

I currently need a graph cut algorithm (ideally push-relabel) and it seems like nppiGraphcut can do the trick with the 4neighbor and 8neighbor as described in grabcut algorithm :

http://www.nvidia.com/content/GTC/documents/1060_GTC09.pdf

I want to know if npp’s graph cut can help me solve for the logical graph cut outputs for {S,T} (i.e. source set and sink set) needed according to the height (distance) solved on the following graph input.

IN matlab, I have the following going into the BK graph cut ‘mxMaxFlow.mex’ algorithm:

[output, flow]=mxMaxFlow2(nNodes,int32(eFrom2),int32(eTo2),weights(:,1),weights(:,2),sourceWeights,sinkWeights);

- nNodes is the total number of nodes (not including source/sink), usually in the order of 3000 or more
- eFrom2 are the ‘from’ nodes of the arc
- eTo2 are the ‘to’ nodes of the arc
- weights(:,1) = 1e15 or infinite, for the forward capacities between non-st nodes (i.e. n2->n3->n4…etc)
- weights(:,2) = 0 or zero, for the reverse capacities between non-st nodes (i.e. n2<-n3<-n4…etc)

-sourceWeights are the capacities/weights of the source branching to all nodes (excluding target/sink node) - sourceWeights are the capacities/weights of the all nodes towards sink (excluding source node)

Can npp graphcut help me solve for the output (i.e. logical 1’s for source set, and 0’s for sink set based on height/distance of each non-st node)? And can it solve for the max flow / min cut?

Or would the thrust library be better to construct my graph?

If so, how do I go about constructin the graph based on the inputs above?

Your help will be super appreciated!

Thanks!