I am new on Stackoverflow and this is my first question so please be patient.
I have an image on which I want to perform blur such that it is focused on a particular object and the rest is blurred.I am using grabcut for getting the object or foreground from the image.Now I want the blur amount should increase gradually as we move away from the object,so blur amount is minimal near the pixels marked as probable foreground by grabcut and increasing gradually as we move away from them
I filtered the original image by Gaussian Filter.I applied grabcut to segment the foreground out of the image and used it as a mask for the filtered image but the result were not satisfactory.
I read the following post but could not come up with a solution.
https://english.r2d2rigo.es/2016/02/15/iris-blur-blur-around-borders-effect-using-win2d/
I want to implement this feature in an ios app(using opencv).So if anyone can tell me the set of operations I need to perform on the obtain the desired result,I would be grateful. Thanks in advance