How to determine if skin colour on a photo is correct or not?

27 views (last 30 days)
Hello all,
Often when taking a photo of people, due to a failure during white balance or significant exposure problems, the tones of people faces are somewhat red or too dark or...
Basically what I am trying to do is to determine if skin colour on a detected face is good or not.
Lets make it simple and do this analysis for one race only - i.e. white people.
I will train algorithm (i.e. SVM) with colour features characteristic for bad and good faces. For face detection I will use Viola Jones algorithm, which will give me face bounding box.
What to do next? Maybe to search for a dominant colour inside a face bounding box and to represent it in a LUV color space?
I guess that way I will (ideally) get two clusters in a 2D space, one representing "good" coloured faces and other representing "bad" coloured faces.
Best regards, Matija.
  1 Comment
Jurgen
Jurgen on 27 Feb 2013
If you want to correct for whitebalance or exposure, testing face color seems a bit roundabout? But I think your initial idea is a good one. Although you might need to cluster in 3D space if wrong exposure also affects brightness.

Sign in to comment.

Answers (2)

Jan
Jan on 27 Feb 2013
Edited: Jan on 27 Feb 2013
I do not think that there is something like a "white race". Even "white" people have very different skin colors. See:
Look at: Google Images: "face". There will neither be a safe distinction between "good" and "bad" face colors, not between "white" and "non-white" races.
To get a good white balance, concentrate on a white object. Fortunately the white area of eyes is visible frequently and it is very reliable, because only a few diseases change this color noticably. From a scientific point of view, using white objects for a white balance is much more direct, than to classify the quality of a color based on different colors.
  3 Comments
Jan
Jan on 28 Feb 2013
Moved: DGM on 29 Dec 2023
Please post comments in the comment section and not as an answer. Thanks.
I still think, that it will be impossible to solve your problem, because the natural inter-person variance will conceal the variance caused by white-balance and exposure settings of the image acquisition system. A red skin can be real (too high blood pressure, sunburn, red ambient light) or the result of a bad white balance.
But a cause for the difference between our opinions can be the exact definition of:
the tones of people faces are somewhat red or too dark or...
What problem do you want to solve? Are you looking for pictures, which contain faces with a color inside a certain range, or for pictures, whose colors are near to the real color of the persons faces? While the first problem can be solved by an automatic classification, I have strong doubts that the second problem can be solved, because you do not have information about the real colors. It is like a measurement of the value 171 and the knowledge, that this can be too high or too low - then there is no chance to estimate the quality of the measurement. Of course you can train the classification such that values near to 180 are assumed as "good", but this is a measurement of your preferences only, and the relation to the real face colors is very weak.
Matija
Matija on 1 Mar 2013
Moved: DGM on 29 Dec 2023
Hello,
I want to solve the first problem: I want to select photos containing faces with a color inside a certain range! Lets say that this range is preferred skin color based on my user study...
For example, I want to work for your company and I am trying to find a good profile photo which will be inserted in my CV. Yes, I want to make a good impression with that photo:-)
If I have 100 portrait photos on my computer (50 of them being good and 50 being bad due to poor lightning, exposure etc.), I want to automatically extract good photos from that bunch. Ideally, he will discard my photos where I am having high blood pressure, sunburn etc. together with photos taken under red ambient light, wrong white balance settings etc. I am aware that system is not capable to distinguish this variations.
Is it clear now?
Now we are back on track: I will than train algorithm (i.e. SVM) with color features characteristic for bad and good faces, good meaning preferred skin color. New face will be analyzed and then added to one of these groups.

Sign in to comment.


Image Analyst
Image Analyst on 28 Feb 2013
A paper on this was presented at the last Color Imaging Conference: http://www.imaging.org/IST/store/epub.cfm?abstrid=46635. Abstract, in part, says "....Through the experimental results, the proposed method achieves preferred skin color reproduction for each race....."
  8 Comments
Image Analyst
Image Analyst on 21 Apr 2013
Moved: DGM on 29 Dec 2023
You could try that if you want, as long as you have enough pixels there to get a representative sample.
Image Analyst
Image Analyst on 21 Apr 2013
The colors were not sampled manually. If I'm remembering the right paper they used a slight variation of a skin color detection algorithm proposed by someone else.

Sign in to comment.

Categories

Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!