static float findThingsOnScreen_1_scale = 0.25f; // scale image static SS findThingsOnScreen_1_db; static L<S> 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<ConnectedComponent> components = fhSegment(image); } L<S> found = lookupAllOpt(findThingsOnScreen_1_db, md5sOfImageComponents(img, components)); print("Found " + n(found, "thing") + " on screen: " + sfu(found)); ret found; }
Began life as a copy of #1010171
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010183 |
Snippet name: | findThingsOnScreen_1 |
Eternal ID of this version: | #1010183/4 |
Text MD5: | 3aa085f04cc64d432d74e459cce7eb81 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-05 21:04:32 |
Source code size: | 805 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 476 / 473 |
Version history: | 3 change(s) |
Referenced in: | [show references] |