I am trying to smooth output image edges using opencv framework, I am trying following steps. Steps took from here https://stackoverflow.com/a/17175381/790842
I have followed the following steps to smooth the edges of the Foreground I got from GrabCut.