The skin detection algorithm is very simple.
I read about it in a hackaday article about an FPGA Real time video anonymizer project.
It considers a pixel is skin if 50 < R - G < 250, where R and G are the red and green channels from a 8-bit RGB pixel representation. Since the algorithm is based on the difference between R and G and not their absolute values, it does a pretty good job of detecting skin of various shades.
Surprised by the simplicity of this algorithm, and wanting to see it in action myself I decided to try to implement it in GLSL, which seems perfect for the task.
I continued to tweak the values and added the additional requirements of B < G and a minimal G value to further reduce false-positives. However, often I was able to get acceptable performace by tweaking only the initial requirements for a specific scene.
In conclusion, the algorithm seems to perform pretty well in most of the test cases I was able to throw at it, but it is by no means perfect. It can probably be used with reasonable reliability when deployed under controlled and optimal lighting conditions.
I encourage you to play with it and evaluate it by trying it out yourself using the LIVE VIDEO INPUT. Be sure to share your results and findings here blog.thygate.com
2015 November 30, Bob Thiry (email@example.com)[close]