Reputation: 1194
I have generated a graph from an image and the algorithm I am working on demands finding the min cut in the graph. But as per my understanding some nodes - source and sink, needs to be attached to the graph before applying any standard algorithm for finding the same.On what basis should I attach them and where??....I have done lot of reading on this but none specifies about this.
thanks.
Upvotes: 2
Views: 418
Reputation: 1632
I am not sure what have you read, but usually authors clearly specify what should be treated as source and sink.
Consider binary segmentation.
(image taken from here, more information can also be found there)
O and B stand for object and background respectively, so you can think of correspondence between terminals and labels.
To clarify further:
This is only one example of applying graph cut to images, there are more: multi-level segmentation, depthmap estimation, etc, where nodes and edges may have different meanings. I strongly suggest you to get more familiar with literature first, since it will help you to adapt the approaches you want to use to your needs.
Upvotes: 2