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

16
LINES

< > BotCompany Repo | #1005847 // Try auto-finding characters, diag = true, show grid

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

Libraryless. Click here for Pure Java version (4354L/29K/97K).

!752

p {
  BWImage img = shootScreenBW();
  int g = 3;
  AutoSegmenter as = new AutoSegmenter(3);
  as.diag = true;
  L<Rect> clips = as.go(img);
  new L<Rect> chars;
  for (Rect r : clips)
    for (Rect c : horizontalAutoSplit2(img.clip(r)))
      chars.add(translateRect(c, r.x, r.y));
      
  setFrameTitle("g = " + g, showImageWithSelections(img.getBufferedImage(), chars));
  showBWImage("Grid", as.visualizeGrid());
}

Author comment

Began life as a copy of #1005845

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: #1005847
Snippet name: Try auto-finding characters, diag = true, show grid
Eternal ID of this version: #1005847/1
Text MD5: f290268c322b064fc98459870bd5cb5c
Transpilation MD5: 62157b2ca385ebd43047d4fc1ef003ab
Author: stefan
Category: javax / ocr
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-11 04:41:08
Source code size: 440 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 458 / 591
Referenced in: [show references]