0

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

  • You should post the relevant code you tried, and state specifically what's wrong with what it does. The question as posed is too general. – Feldur Jun 12 '16 at 09:31
  • I am using grabcut function in openCv with a predefined rectangle ,that return me the probable foreground.Based on that I am replacing the probable and sure background pixels with blurred pixels(given by Gaussian Filter) and probable and sure foreground with the original pixels.It is not giving me the required result.What I want is there should be a smooth transition from foreground to blurred background so that human eye can see that foreground is focused. – deathstroke Jun 13 '16 at 18:49
  • In your link I understand that you blurr all image and gradient mask is used to mixed original image and blur image – LBerger Jun 14 '16 at 13:28

0 Answers0