Beispiel #1
0
 public static double[] GreyscaleHistogram(DevImage img)
 {
     double[] histogram = new double[256];
     img.LockBitmap();
     for (int y = 0; y < img.Width; y++)
     {
         for (int x = 0; x < img.Height; x++)
         {
             histogram[img.GetGreyPixel(y, x)]++;
         }
     }
     img.UnlockBitmap();
     return histogram;
 }