Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!33g2000vbe.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Face recognition technique for newbie
Date: Sun, 22 Nov 2009 19:09:29 -0800 (PST)
Organization: http://groups.google.com
Lines: 43
Message-ID: <d6158adf-1cdd-47db-ac9d-d8138b909977@33g2000vbe.googlegroups.com>
References: <hea3pn$qe7$1@fred.mathworks.com> <hea6t2$60j$1@fred.mathworks.com>
NNTP-Posting-Host: 75.186.70.56
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1258945769 29963 127.0.0.1 (23 Nov 2009 03:09:29 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 23 Nov 2009 03:09:29 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 33g2000vbe.googlegroups.com; posting-host=75.186.70.56; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	GTB6; CyberSafe-IWA-Enable; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 
	3.0.04506.648; .NET CLR 3.5.21022; AskTB5.5),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:587101


On Nov 21, 9:16 pm, "Ironic Prata" <lixodoiro...@hotmail.com> wrote:
>  This might be too simple for what you are looking for but in case you are using color imagens try using HSV colorspace.
>  This might sound strange, but all the races have the same skin color.
> The only thing that varies is the saturation of the color. You can detect skin by looking at it?s H(hue) value, with a low margin, and ignoring S (saturation)...
>  Will also detect other skin areas, but it?s good place to start.

-----------------------------------
I agree that this is a good, easy way to start.  Of course it won't
work in all cases but if all the faces in your database are pretty
similar, it might work well enough for you to get a decent grade in
your class.

The three dimensional color gamut of skin taken on a calibrated
instrument such as a colorimeter or spectrophotometer is very
interesting - it looks like a boomerang shape.  It goes more or less
out in one hue.  It comes back in towards the L (or H or I) axis both
at the bright end, and the dark end, and it bows out for middle
intensity individuals.  It makes sense if you think about it.  You can
have color if you're not too pale or too dark.  If your skin is very
very white, you're of course going to have a color near the V axis.
Likewise if your skin is very very black, you're also going to be near
the V axis.  Only those people in between can have different
saturations (also called chroma)  - of course they also have different
intensity values also (L, H, or I depending on which color space
you're using).  So you can convert to HSV, find H in a certain range
regardless of S or V.  Of course this will find all "flesh" colored
objects in the field of view but I assume you'll be having something
simple to practice with such as full frontal face images with little
other clutter in the field of view.  If your images are taken with
different color temperature illumination (e.g. daylight, sunlight,
fluorescent light, xenon flash, incandescent lighting, etc.) then now
your boomerang shape is going to wobble around, taking different
angles as it juts out of the V axis.  So now you're going to have to
allow a larger angular range of H values to take (remember the value
of the H channel represents the ANGLE of the hue - very important!).

You can look up my demo where I find things in monochrome.
http://www.mathworks.com/matlabcentral/fileexchange/25157
Just apply this to the hue channel after you've converted your rgb
image and that should be a good start.