OpenCV  3.4.4
Open Source Computer Vision
samples/cpp/grabcut.cpp

An example using the GrabCut algorithm

grabcut_output1.jpg
Sample Screenshot