Warning: session_start(): open(/var/lib/php/sessions/sess_d4q5m95t6igp7ujpdpesilia8k, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static Set thingsOnScreenMap_md5s;
static File thingsOnScreenMap_cacheFile() {
ret newFile(javaxCacheDir(), "segments-on-screen.txt");
}
static MultiMap thingsOnScreenMap() {
lock thingsOnScreenMap_lock;
pcall {
S s = loadTextFile(thingsOnScreenMap_cacheFile());
if (s != null) {
long time = parseLong(first(lines(s)));
if (now() < time+10000)
ret thin
}
ret thingsOnScreenMap(shootScreenBW());
}
static MultiMap thingsOnScreenMap(BWImage bwScreenShot) {
new TreeSet elements;
L segments = autoSegment(bwScreenShot);
new MultiMap map;
new HashSet md5s;
for (Rect r : segments) {
RGBImage clip = bwScreenShot.clip(r).toRGB();
md5s.add(rgbMD5(clip));
}
thingsOnScreenMap_md5s = md5s;
ret md5sOnScreenToNames(md5s);
SS comments = thingsOnScreenDefinitions();
S text = comments.get(md5);
if (nempty(text)) map.put(text, r);
}
ret map;
}