Пример #1
0
        public static Color GetColorFromHSV(FastPixelHSV pixel)
        {
            int R = 0, G = 0, B = 0;

            HsvToRgb(pixel.GetHue(), pixel.GetSaturation() / 100.0, pixel.GetValue() / 100.0, out R, out G, out B);
            return(Color.FromArgb(R, G, B));
        }
Пример #2
0
        public override bool IsMatching(FastPixelHSV pixel)
        {
            int Hue        = pixel.GetHue();
            int Saturation = pixel.GetSaturation();

            return((Hue >= HueMin) && (Hue <= HueMax) &&
                   (Saturation >= SaturationMin) && (Saturation <= SaturationMax) &&
                   (pixel.Value >= ValueMin) && (pixel.Value <= ValueMax));
        }