static void imageNormalize(double[][] u, double[][] out, int width, int height) {
		int i, j;

		double max = -10000000.0, min = 1000000000.0;

		for (i = 0; i < height; i++) {
			for (j = 0; j < width; j++) {
				if (u[i][j] > max)
					max = u[i][j];
				if (u[i][j] < min)
					min = u[i][j];
			}
		}
		for (i = 0; i < height; i++) {
			for (j = 0; j < width; j++) {
				if ((u[i][j] - min) / (max - min) * 255 < 0) {
					System.out.println((u[i][j] - min) / (max - min) * 255);
				}
				out[i][j] = 255 - ((u[i][j] - min) / (max - min) * 255);
			}
		}
	}