Beispiel #1
0
        public void AddPixel(Pixel pixel)
        {
            Pixels.Add(pixel);

            IntegratedPixel.Append(pixel);
            IntegratedColor.Append(_img.Get(pixel));
        }
Beispiel #2
0
        public Segment(BImage img, Pixel rootPixel)
        {
            _img = img;
            _w   = img.W;

            RootPixel = rootPixel;
            Pixels    = new List <Pixel>();

            IntegratedColor = new IntegratedColor();
            IntegratedPixel = new IntegratedPixel();
        }
Beispiel #3
0
 public void Append(IntegratedColor c)
 {
     R += c.R;
     G += c.G;
     B += c.B;
 }
Beispiel #4
0
 public void Realize()
 {
     AverageColor = IntegratedColor.ToColor(Pixels.Count);
     AveragePixel = IntegratedPixel.ToPixel(Pixels.Count);
 }