static Set thingsOnScreenMap_md5s; static MultiMap thingsOnScreenMap() { ret thingsOnScreenMap(shootScreenBW()); } static MultiMap thingsOnScreenMap(BWImage bwScreenShot) { SS comments = thingsOnScreenDefinitions(); L segments = autoSegment(bwScreenShot); new MultiMap map; new HashSet md5s; for (Rect r : segments) { RGBImage clip = bwScreenShot.clip(r).toRGB(); S md5 = rgbMD5(clip); md5s.add(md5); S text = comments.get(md5); if (nempty(text)) map.put(text, r); } thingsOnScreenMap_md5s = md5s; ret map; }