public void AddPixel(Pixel pixel) { Pixels.Add(pixel); IntegratedPixel.Append(pixel); IntegratedColor.Append(_img.Get(pixel)); }
public Segment(BImage img, Pixel rootPixel) { _img = img; _w = img.W; RootPixel = rootPixel; Pixels = new List <Pixel>(); IntegratedColor = new IntegratedColor(); IntegratedPixel = new IntegratedPixel(); }
public void Append(IntegratedColor c) { R += c.R; G += c.G; B += c.B; }
public void Realize() { AverageColor = IntegratedColor.ToColor(Pixels.Count); AveragePixel = IntegratedPixel.ToPixel(Pixels.Count); }