I have an image like this:

enter image description here

I am trying to build a semantic segmentation and matting model which currently gives an output like this:

enter image description here

One can see that some regions between the hair strands are fuzzy. This is because the value of the alpha channel in between those regions are non-zero. Is it possible to somehow adjust the alpha values in just those regions as a post-processing step, in order to make the hair strands sharper?

My expected output would be something like this. Notice how the hair strands are sharper and the regions between the strands are completely transparent (alpha value 0):

enter image description here

  • $\begingroup$ Your question isn't clear. $\endgroup$ – Royi Sep 28 '19 at 9:29
  • $\begingroup$ Well you already defined the filter yourself. Check if a pixel has an alpha value < 1 and filter them out. $\endgroup$ – Tyathalae Oct 1 '19 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.