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).

1  
!752
2  
3  
p {
4  
  screenQuickSelect(voidfunc(BufferedImage screen, Rect r) {
5  
    r = intersectRects(new Rect(0, 0, screen.getWidth(), screen.getHeight()), growRect(r, 20));
6  
    final BufferedImage img = clipBufferedImage(screen, r);
7  
    final L<Rect> rects = autoSegment(img);
8  
    showImageWithSelections(img, rects);
9  
    thread {
10  
      BWImage bw = new BWImage(img);
11  
      SimpleRecognizer sr = filledSimpleRecognizer();
12  
      for i over rects:
13  
        print((i+1) + ": " + sr.recognize(bw.clip(rects.get(i))));
14  
    }
15  
  });
16  
}

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: 526 / 806
Referenced in: [show references]