Click here to Skip to main content
15,886,664 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.9K   6K   84  
Simple algorithms of skin detection and some useful filters
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace RedMatter.Fractal
{
    public class FireRingFractal: Fractal
    {
        public FireRingFractal(int widthImage, int heightImage)
            : base(widthImage, heightImage)
        {

        }

        public override void BuildFractal()
        {
            for (int i = 0; i < FractalBitmap.Width; i++)
            {
                for (int j = 0; j < FractalBitmap.Height; j++)
                {
                    int count = 0;
                    Complex z = new Complex(X1 + ((double)((X2 - X1) * i) / (double)FractalBitmap.Width), Y1 + ((double)((Y2 - Y1) * j) / (double)FractalBitmap.Height));
                    Complex delta = z;
                    Complex z1 = z;
                    while ((count < MaxIterations) & (z.Abs < 1000000) & (delta.Abs > 0.0000001))
                    {
                        z = z * z / (z - (new Complex(1, 0))) + z * z;
                        delta = z1 - z;
                        z1 = z;
                        count++;
                    }
                    FractalBitmap.SetPixel(i, j, Color.FromArgb((int)((double)count * 255 / (double)MaxIterations), 0, 0));

                }
            }
        }
    }
}

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