public static double MeanPixel(this MatrixData input) { double[] colMean = new double[input.NumberOfColumns]; for (int c = 0; c < input.NumberOfColumns; c++) { colMean[c] = input.Mean(c); } return(colMean.Average()); }