!752 static class MyComparator implements BWImageSectionComparator { int step = 5; public float compare(BWImage big, BWImage pat, int x, int y, float max) { int wp = pat.getWidth(), hp = pat.getHeight(); int w = big.getWidth(), h = big.getHeight(); float diff = 0; final int _step = step; for sx to _step: for sy to _step: for (int xx = sx; xx < wp; xx += _step) for (int yy = sy; yy < hp; yy += _step) { diff += abs(big.getPixel(x+xx, y+yy)-pat.getPixel(xx, yy)); if (diff > max) ret max+1; } ret diff; } } concepts. !include #1005393 // Marked Screenshot Classes p { bwRawImageSearch_comparator = new MyComparator; BWImage screen = shootScreenBW(); loadConceptsFrom("#1005389"); float similarity = 0.999f; long start = now(); for (MarkedClip clip) time { print("Searching: " + clip.description + "..."); bwRawImageSearch_verbose = true; bwRawImageSearch(screen, clip.img, similarity); } done(start, "Total for " + n(countConcepts(MarkedClip), "images")); }