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

22
LINES

< > BotCompany Repo | #1005841 // Test autoSegment with g = 3 [grid size: 3*3 pixels]

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

Libraryless. Click here for Pure Java version (5152L/35K/122K).

1  
!752
2  
3  
static ImageSurface is;
4  
5  
p {
6  
  final BWImage img = shootScreenBW();
7  
  int g = 3;
8  
  setFrameTitle("g = " + g, is = showImageWithSelections(img.getBufferedImage(), autoSegment(img, g)));
9  
  
10  
  installTimer(is, 100, new Runnable {
11  
    Rect lastRect;
12  
    
13  
    public void run() {
14  
      Rect r = showImageWithSelections_highlighted.get();
15  
      if (neq(r, lastRect) && r != null) {
16  
        lastRect = r;
17  
        S md5 = md5OfBWImage(img.clip(r));
18  
        print(r + ", bw md5: " + md5);
19  
      }
20  
    }
21  
  });
22  
}

Author comment

Began life as a copy of #1005836

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: #1005841
Snippet name: Test autoSegment with g = 3 [grid size: 3*3 pixels]
Eternal ID of this version: #1005841/1
Text MD5: 40971d329f6e22f8327581af21fcd1e7
Transpilation MD5: 72e8c7cd8a3eb0f66741f7811d2e8f1d
Author: stefan
Category: javax / ocr
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-01-05 10:57:26
Source code size: 528 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 531 / 678
Referenced in: [show references]