Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1006166 // screenQuickSelect, auto-segment, recognize text

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (11037L/77K/258K).

!752

p {
  screenQuickSelect(voidfunc(BufferedImage screen, Rect r) {
    r = intersectRects(new Rect(0, 0, screen.getWidth(), screen.getHeight()), growRect(r, 20));
    final BufferedImage img = clipBufferedImage(screen, r);
    final L<Rect> rects = autoSegment(img);
    showImageWithSelections(img, rects);
    thread {
      BWImage bw = new BWImage(img);
      SimpleRecognizer sr = filledSimpleRecognizer();
      for i over rects:
        print((i+1) + ": " + sr.recognize(bw.clip(rects.get(i))));
    }
  });
}

Author comment

Began life as a copy of #1006161

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006166
Snippet name: screenQuickSelect, auto-segment, recognize text
Eternal ID of this version: #1006166/1
Text MD5: 99bd25ae297a358a597c9e030faf4603
Transpilation MD5: a5a08a1ed829a2d15bab9a24a8ba4f16
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-25 19:24:30
Source code size: 535 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 527 / 806
Referenced in: #1006334 - Find snippet source on screen, recognize, step 1