static float findThingsOnScreen_1_scale = 0.25f; // scale image static SS findThingsOnScreen_1_db; static L findThingsOnScreen_1() { bool consoleVisible = consoleVisible(); hideConsole(); sleep(500); BufferedImage bigImg = shootScreen2(); if (consoleVisible) showConsole(); BufferedImage img; time "Make MBFImage" { MBFImage image = readMBF(img = scaleImage(bigImg, findThingsOnScreen_1_scale)); } if (findThingsOnScreen_1_db == null) findThingsOnScreen_1_db = imageDB_md5ToNameMap(); time "Segment" { L components = fhSegment(image); } L found = lookupAllOpt(findThingsOnScreen_1_db, md5sOfImageComponents(img, components)); print("Found " + n(found, "thing") + " on screen: " + sfu(found)); ret found; }