static L findBrightHorizontalStreaks(BWImage img) { ret findBrightHorizontalStreaks(img, 0.5f); } static L findBrightHorizontalStreaks(BWImage img, float threshold) { new L out; int i = 0, n = img.getWidth(); while (i < n) { int j = i; while (j < n && img.getPixel(j, 0) >= threshold) ++j; if (j > i) out.add(intRange(i, j)); i = j+1; } ret out; }