Face Detection

This program detects skin colored pixels and movement using a webcam

Method and Implementation

Face Detection

Face detection was implemented using pixel thresholding. First, I tried thresholding by pixel values based on the Von Luschan’s chromatic scale, this didn’t work so well, it pixked up more of the wall than it picked up from my skin.

I then tried thresholding based on a methd by Jure Kovac, Peter Peer, and Franc Solina, this method was a lot more accurate and I used it for my solution.

Motion

I implemented motion detection using the previous frame and the current frame, I took the difference of the pixels in both frames and compared it agains a threshold, if the difference was different than the threshold, I marked the pixel

Images for both face and motion detection are in the experiments and results section

Experiment and Results

Experiment 1

This shows trying to do pixel thresholding using the Von Luschan scale, not very succesful

This detects motion pretty well

Experiment 2

Here I tried doing pixel thresholding using Kovac’s paper, the results were a lot better this time

Discussion and Conclusion

My method for motion detection good and accurate but it could be faster. I could try looking at areas where I found motion before instead of trying to find motion all throughout the image at every frame, also I am not taking into consideration lighting, which I could do by normalizing the image against the average pixel value, however this will double the amount of time it takes to run the algorithm

My face detection algorithm could do a lot better, (in fact it has) if I was using pixel trhesholing in combination with some kind of template matching. Also, I could have benefited from using another kind of color space, one in which lighting has its separate value

* Were you able to find a large portion of the face (“true positive detection”)?

I was able to find a large portion (a little more than 50%) of the face using the second method. Almost none using the first method

* Which pixels are missing (“false negative detection”)?

I’m missing the pixels around my eyes, facial hair, and where the light shines

* Did your method falsely label pixels in the background as faces (“false positive detection”)?

Yes my method did label a lot of the background pixels as skin, but that is because my walls are skin colored

* What are the limitations of your current skin-based face detection method? What would you do to try to overcome these difficulties and develop a reliable face detector (if you had a lot more time…)?

If I had to develop a more reliable face detector, I would use templates in order to eliminate all the false positives and be more accurate with the true positives

* How well does your method detect motion?

My method did really well under the circumstances I tested

* Are there any circumstances when your method falsely detects large patches of motion in the image?

Yes, my method will fail if there if the background and the moving object match colors

Source Code

Post a Comment

You must be logged in to post a comment.