肤色检测 [英] Skin Color Detection
问题描述
我正在使用以下算法来检测肤色,但它在不同的光照条件下效果不佳.任何人都可以提供任何建议如何改进它或提出更好的方法
I am using the following algorithm to detect skin color, but its not working real well in different lighting conditions. Can anybody offer any advice how to improve it or suggest a better approach
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
OR
R > 220 AND G > 210 AND B > 170 AND
|R – G| <= 15 AND
R > B AND G > B
http://softexpert.wordpress.com/2007/10/17/skin-color-detection/
干杯
推荐答案
你给定的算法是简单的基于颜色的阈值.这仅适用于一组非常基本的条件.对于一些图片,它可能会给出非常好的结果,但作为一个通用检测器,它会给出很差的结果.
Your given algorithm is simple colour based thresholding. This will only work for a very basic set of conditions. For a few pictures it may give really good results but as a general detector it will give poor results.
您的第一道攻击线应该是切换到对照明不变的不同颜色模型.实际上,您提供的链接明确说明了这一点!例如,恒指.就个人而言,我更喜欢用 L*a*b* 做一些事情,但是从 RGB 转换的实现会更加困难.
Your first line of attack should be to switch to a different colour model that is invariant to illumination. In fact, the link that you give explicitly says this! For example, HSI. Personally, I would prefer to do something with L*a*b* but implementation of conversion from RGB would be more difficult.
您应该考虑添加一些额外的先验术语,例如,孤立的像素不能是皮肤.
You should look at adding some additional prior terms, for example, isolated pixels cannot be skin.
这篇关于肤色检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!