grabCut isn't cutting out the background..... (C++)

may I suggest that you give your code some formatting? there’s a button for that. select the code and click the button.

image

related: