|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace RedMatter.SkinDetection
{
public class SimpleSkinDetector1: ISkinDetector
{
#region ISkinDetector Members
public bool IsSkin(System.Drawing.Color color)
{
if (((double)color.R/(double)color.B > 1.185)&
((double)(color.R*color.B)/(double)(DrawUtils.ChannelSum(color)*DrawUtils.ChannelSum(color))>0.107)&
((double)(color.R*color.G)/(double)(DrawUtils.ChannelSum(color)*DrawUtils.ChannelSum(color))>0.112))
{
return true;
}
return false;
}
#endregion
#region IImageSelector Members
public bool IsSelectedPoint(System.Drawing.Color color)
{
return IsSkin(color);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Hello! My name is
Maxim Subbotin.
Now I work in sphere of web-development. I'm interesting researches in SEO field.
If you interesting, you can see this tool:
KeywordCompetitor