Пример #1
0
 static void ForEach(forEachDelegateWithChannel <int, int, int, byte> callback, Image <Bgr, byte> img)
 {
     for (int channel = 0; channel < img.NumberOfChannels; channel++)
     {
         for (int width = 0; width < img.Width; width++)
         {
             for (int height = 0; height < img.Height; height++)
             {
                 callback(channel, height, width, img.Data[height, width, channel]);
             }
         }
     }
 }
Пример #2
0
 private void ForEach(forEachDelegateWithChannel <int, int, int, byte> callback)
 {
     for (int channel = 0; channel < SourceImage.NumberOfChannels; channel++)
     {
         for (int width = 0; width < SourceImage.Width; width++)
         {
             for (int height = 0; height < SourceImage.Height; height++)
             {
                 callback(channel, height, width, GetColor(height, width, channel));
             }
         }
     }
 }