Example #1
0
        public void DrawAverageTo(BImage img, Color color)
        {
            var w = _img.W;
            var h = _img.H;

            var N = PixelNeighbours(AveragePixel, w, h);

            foreach (var n in N)
            {
                img.Set(color, n);
            }
            img.Set(color, AveragePixel);
        }
Example #2
0
 public void DrawTo(BImage img)
 {
     foreach (var p in Pixels)
     {
         img.Set(AverageColor, p);
     }
 }
Example #3
0
        public void DrawBoundaryTo(BImage img, ImageUniverse u, Color color)
        {
            var w = _img.W;
            var h = _img.H;

            foreach (var p in Pixels)
            {
                var N = PixelNeighbours(p, w, h);
                if (N.All(n => u.Parent(n.Index(w)) == RootPixel.Index(w)))
                {
                    continue;
                }

                img.Set(color, p);
            }
        }