Michael Parra – Update 6

I have been working on some algorithms on skin detection… I am debating which methods I should take.  So far I have tried using RGB, YCrCb, YUV, YPrPb, and am starting to look closer into HSV.  Here are some equations I will try to work out.

For Normal Lighting use the algorithm below

(R > 95)
AND (G > 40)
AND (B > 20)
AND (max{R, G, B} − min{R, G, B} > 15)
AND (|R − G| > 15)
AND (R > G) AND (R > B)

Flashlight or Daylight Lateral Illumination use algorithm below

(R > 220)
AND (G > 210)
AND (B > 170)
AND (|R − G| ≤ 15)
AND (R > B)
AND (G > B)

both these algorithms should be used.
To combine both we use a logical OR

For YCrCb I was trying to implement these algorithms

Cr ≤ 1.5862 × Cb + 20
Cr ≥ 0.3448 × Cb + 76.2069
Cr ≥ -4.5652 × Cb + 234.5652
Cr ≤ -1.15 × Cb + 301.75
Cr ≤ -2.2857 × Cb + 432.85

These algorithms are slightly more challenging to use in Verilog as opposed to the RGB values.  The reason is because of the real decimal numbers that denote the slope of the cb/cr lines.  Also before doing this one must convert the

5bit Red
6bit Green
5bit Blue


8bit Red
8bit Green
8bit Blue

Then convert these values  to

8bit Y
8bit Cr
8bit Cb

…. by losing 8 bits of data the YCrCb skin detection seems to be more tricky….
also one must change the RGB Skin Detection Test Parameters to acknowledge the loss of the 8 bits.

For instance converting 5 bits of Red to 8 bits of Red means you are losing 3 bits of valuable pixel data.  This means that you must take into account the 3 LSB of the new 8bit Red.  This also means that Red can only increase and decrease in increments of 8.

00000_000          0
00001_000           8
00010_000          16
00011_000          24


To acknowledge this we must some how add 7 to the values being tested.  However this should be only treated for values 1,2,3,4,5,6,7.  I would like to spend some more thought process on this approach.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s