Hi all,
In the algorithm I'm developing I need to use graph cut for images.
I have to define a new graph from an Image with custom weight of arcs and then use graph cut to find the min cut.
I know that there is a the grabcut opencv function that fits well but i don' t know how to edit the graph I obtain from the image with my custom weights: here is the grab cut description
The weights of edges connecting pixels to source node/end node are defined by the probability of a pixel being foreground/background. The weights between the pixels are defined by the edge information or pixel similarity. If there is a large difference in pixel color, the edge between them will get a low weight.
Any idea?
Thank you!
P.s. I'm working with Python