In this program RGB image is converted to L*a*b color space.Green & purple mode of this color space are chosen & then convert them into binary.AND operation is performed on the images so a matrix is obtained having 1 & 0.One(1) indicate the presence of face.
First i would really appreciate the hard work that you made. But this approach fails for african ethnic people. I tried to extract skin for african people with different skin values. But unfortunately it fails.