0

Hello I'm trying to detect the area of the mouth or lips. To do this I am trying to use the the method described in these papers: Paper1,Paper2. (Could only post two of the papers)

They use a method where you utilize the colorspace YCbCr because the lips have a strong red component and a weaker blue then the rest of the face. Because of this you can use this color space like this:

LipMap = (CrCr)((CrCr)-n(Cr/Cb))((CrCr)-n*(Cr/Cb))

n = 0.95*((sum(Cr*Cr)/m)/(sum(Cr/Cb)/m))

The problem is that all these sources dont really explain how the calculation is made. I know how to get the values of Cr and Cb but I am not 100% sure in what range they should be [0,1] or [0,255], the sources state both. Also after that I'm not sure how to get the correct values from the n calculation as well as the LipMap one. Are the numbers supposed the be normalized before or after the calculation has been made. Also how do you get the correct value from Cr/Cb and the normalized value, i just cant seem to get that one right.

I have been trying to get this to work for some hours but im doing something wrong. Some values in the end are always far to big. Also they are not in the ranges they are supposed to be [0,1] or [0,255].

If anyone has any input regarding this how to solve it or some tips it would be greatly appreciated.

Community
  • 1
  • 1
Holmis
  • 13
  • 3

1 Answers1

0

If you are just trying to look for where the lips appear on the face, it might be worth your while using a haar cascade to find them instead (I don't know if you have tried this, or if this is suitable for your project)

If you really need to find good settings for thresholding with YUV, you could still use a haar cascade to find the mouth, then pick a pixel within the region of interest picked out by the haar that you know will usually contain a pixel on the lip.

This pixel will provide you with a YUV value for a random region on the lip, then you can threshold the image to include all pixels that are similar to that pixels YUV value (you can figure out how strict to be on this threshold during testing) and then you should be left with all the pixels of the mouth (near enough)

Hope that I have explained that well enough for you to understand.

Good luck

Aphire
  • 1,621
  • 25
  • 55
  • Mabye i should have been more clear in my question. Right now i am using a haar cascade to get the face and also the mouth region. In the mouth region i want to detect the coners of the mouth aswell as the thop and bottom. What i want to achieve is to get a clear outline of the lips so i can get the points on the top, bottom and both corners. – Holmis Apr 29 '15 at 08:05
  • Okay, so what I would suggest is finding an area within your mouth region, that has like an "average" part of the mouth in each image, so maybe the middle, or maybe just above/below (so not to get the line in the middle), take that pixel YUV data, then threshold the image with like +/- 50 of each value (50 is just example, you can test this), which then should bring you up a mask of the lips. – Aphire Apr 29 '15 at 08:58