GrabCut with OpenCV
You may want to cite the GrabCut paper below if you use this code.
@inproceedings{rother2004grabcut, title={Grabcut: Interactive foreground extraction using iterated graph cuts}, author={Rother, Carsten and Kolmogorov, Vladimir and Blake, Andrew}, booktitle={ACM transactions on graphics (TOG)}, volume={23}, number={3}, pages={309--314}, year={2004}, organization={ACM} }