private void button1_Click(object sender, EventArgs e) { int[] maxAndMin = GetMaxMin(bmp); for (int i = 0; i < w; i++) { for (int j = 0; j < h; j++) { red[i, j] = ((red[i, j] - maxAndMin[1]) * 255 / (maxAndMin[0] - maxAndMin[1])); green [i, j] = ((green [i, j] - maxAndMin[1]) * 255 / (maxAndMin[0] - maxAndMin[1])); blue[i, j] = ((blue[i, j] - maxAndMin[1]) * 255 / (maxAndMin[0] - maxAndMin[1])); } } int[] histored = new int[256]; int[] histogreen = new int[256]; int[] histoblue = new int[256]; histogram(w, h, red, ref histored); histogram(w, h, green, ref histogreen); histogram(w, h, blue, ref histoblue);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)