1

I have an image, and I can obtain a mask of the image as so

Original Image

Mask of the image

Now the mask is nearly perfect, but it is still clearly rough around the edges. For example, if I apply a blur effect to the background, there are portions around the ROI that are from the background, and look quite bad (Notice the area around the arms and right hip)

Blurred image

Could someone tell me how to refine the mask further to encompass only the ROI and not any part of the background? I'm using OpenCV and Tensorflow currently. The Grabcut algorithm of OpenCV wasn't too much help.

Hemant Menon
  • 180
  • 6
  • Try applying erosion on the image. It should help regarding the areas near the hair and heap. http://docs.opencv.org/2.4/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.html – Tahlil Jul 30 '17 at 15:24
  • Maybe you can try this: https://stackoverflow.com/questions/4993082/how-to-sharpen-an-image-in-opencv – Nils Schlüter Jul 30 '17 at 15:41
  • @Tahlil I tried this, in fact I had tried erosion and dilation previously too, I had forgotten to mention it. The end result is not much of an improvement. – Hemant Menon Jul 30 '17 at 16:37
  • @NilsSchlüter I tried the method described, not much help in this case – Hemant Menon Jul 30 '17 at 16:38

0 Answers0