0

I need to blur skin of face in the video input. Using built-in functions I can find the face. Moreover, I find facial landmarks using dlib (I need it for another purpose). What is the fastest way to detect skin, if in any case, I detect face and facial landmarks? Is there any algorithm that uses face position (or facial landmarks) to find skin?

dlib facial landmarks

Anna Kuzmina
  • 49
  • 3
  • 7
  • If you already have facial landmarks, you know where is the skin.. What do you need? – Ja_cpp Jul 24 '17 at 18:31
  • @ROS_OPENCV, yes, I'm sorry it's not really clear from the question. Facial landmarks don't give forehead, so I need to separate hair from the face. Also in front of the face could appear objects that are not skin and I shouldn't blur it. – Anna Kuzmina Jul 24 '17 at 18:37
  • Forehead is always above the eyebrow. You can look for the color of a small region above eyebrows (to get the color of the forehead) then apply blurring to everything above the eyebrow that has that color you defined. Of course you're gonna limit yourself with some threshold to not blur hair or you get out of the face. That a project kind of questions so you need to in the state of the art and see what people are doing in the literature – Ja_cpp Jul 24 '17 at 18:49
  • @ROS_OPENCV ok, thank you! – Anna Kuzmina Jul 24 '17 at 18:58
  • dlib gives you forehead points also I guess.. – arqam Jul 25 '17 at 05:18

1 Answers1

1

Given that hair and facial hair can be inside the region surrounded by the dlib landmarks, I suggest:

  1. Extracting the polygon surrounded by dlib points (1, 29, 17.16, 15, 31, 3,2 ,1*)

  2. Cutting out 15% of the width from both left and right

  3. Convert the pixels to HSV and estimate the ranges

  4. Analyze pixels in the region detected by dlib, and above the eyebrows and around the chin (if needed) to extract all skin regions.

I have used this in a few applications, and it generally works.

Totoro
  • 3,398
  • 1
  • 24
  • 39