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

            IntegratedPixel.Append(pixel);
            IntegratedColor.Append(_img.Get(pixel));
        }
示例#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();
        }
示例#3
0
 public void Append(IntegratedColor c)
 {
     R += c.R;
     G += c.G;
     B += c.B;
 }
示例#4
0
 public void Realize()
 {
     AverageColor = IntegratedColor.ToColor(Pixels.Count);
     AveragePixel = IntegratedPixel.ToPixel(Pixels.Count);
 }