public Bitmap Matrix2ImageLog(Double[,] Matrix)
{
Bitmap img = new Bitmap(Matrix.GetLength(0), Matrix.GetLength(1));
Double max = Matrix.Cast<Double>().Max();
for (int i = 0; i < Matrix.GetLength(0); i++)
{
for (int j = 0; j < Matrix.GetLength(1); j++)
{
Double a = 255 / Math.Log10(1 + max);
int value = (int)(a * Math.Log10(1 + Matrix[i, j]));
Color p = Color.FromArgb(255, value, value, value);
img.SetPixel(i, j, p);
}
}
return img;
}