Click here to Skip to main content
15,885,032 members
Articles / Multimedia / GDI+

Image Processing: Skin Detection, Some Filters and EXIF Tags

Rate me:
Please Sign up or sign in to vote.
4.93/5 (19 votes)
17 Jul 2009CPOL2 min read 87.8K   6K   84  
Simple algorithms of skin detection and some useful filters
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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Russian Federation Russian Federation
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

Comments and Discussions