!7 static float ppt = 0f; p { RGBImage a = loadRGBImage(#1006818), b = loadRGBImage(#1006819); compare(a, b); } svoid compare(RGBImage a, RGBImage b) { //new HashSet deltas; new Best best; repeat { Rect r = randomScreenRect(50, 50); RGBImage clip = a.clip(r); if (rgbInnerPrecision(clip) >= 0.5f) { Rect r2 = rgbSearchPrecise(b, clip); if (r2 != null && neq(r, r2)) { Pt delta = new Pt(r2.x-r.x, r2.y-r.y); Rect match = rgbExpandMatch(a, b, r, r2, ppt); if (best.put(match, match.w*match.h)) { print("New best. Movement: " + delta + ". Match size: " + match.w + "/" + match.h); packFrameInTopRightCorner(quickShowImage(rgbScale(a.clip(match), 1))); } } } } }