public static MatrixData HistEQ(this MatrixData input) { MatrixData output = new MatrixData(input.Data); output.NormalizeAll(NormalizationMethod.StandardScore, true); output = output * 255; output = output.Clamp(0, 255); return(output); }