public static MatrixData GetTranspose(this MatrixData input) { MatrixData output = input.CopyData(); output.Transpose(); return(output); }
public static MatrixData Convert18To6Px(this MatrixData input, bool favorBrightPx = true) { MatrixData output = new MatrixData(6, 6); int outR = 0; int outC = 0; for (int r = 0; r < input.Height(); r += 3) { outC = 0; for (int c = 0; c < input.Width(); c += 3) { MatrixData m = input.CopyData(r, c, 3, 3); output[outR, outC] = (favorBrightPx)? (m.MeanPixel() + m.Percentile(25)) / 2 : m.MeanPixel(); outC++; } outR++; } return(output); }