static double[] bwImage_standardDeviationPerRow(BWImage img) { int w = img.getWidth(), h = img.getHeight(); double[] l = new[h]; double[] row = new[w]; for y to h: { for x to w: row[x] = img.getFloatPixel(x, y); l[y] = standardDeviation(row); } ret l; }