!7 static int width = 8, y1 = 3, y2 = 4; p-exp { L images = markedFaces_scaledToWidth(width); Recognizer recognizer = new { public Rect get(RGBImage img) { print(f2s(img.file)); RGBImage img2 = rgbClipLineRange(img, y1, y2); float[] f = rgbImageColumnBrightnesses(img2); printStruct(f); int x = indexOfSmallestFloat(f); ret rectFromPoints(x-1, y1, x+1, y2); } }; new Scorer scorer; double tolerance = width/2.0; for (RGBImageAndRect i : images) { Rect guessed = recognizer.get(i.image); print(i.rect + " - " + guessed); video_scoreRect_x(scorer, i.rect, guessed, tolerance); } print(scorer); } abstract sclass Recognizer extends F1 {}