Binary Image Segmentation using GraphCut
Link openCV
GRAPHCUT graphCut;
graphCut.graphCut(Image, neighboursWeight, windowSize);
neighboursWeight represents the neighbours influence weight.
windowSize represents the window around each pixel, 1 means the first 8 nearst neighbours.