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

23
LINES

< > BotCompany Repo | #1006095 // getLearnedChars_fullImages (from #1005726)

JavaX fragment (include)

// TODO: test class renaming during unstructure
concept Result {
  BWImage inputImage;
  float horizontalSplitThreshold;
  L<BWImage> characters;
  S text;
}

static MultiMap<BWImage, S> getLearnedChars_fullImages() {
  Concepts in = new Concepts("#1005726").load();
  new MultiMap<BWImage, S> imageToChar;
  for (Result r : in.list(Result)) {
    //imageToChar.setPut(autoCroppedBWImage(r.inputImage), r.text);
    S text = contains(r.text, "[") ? "" : r.text;
    for (int i = 0; i < l(r.characters); i++) {
      BWImage clip = autoCroppedBWImage(r.characters.get(i));
      S c = substring(text, i, i+1);
      if (nempty(c))
        imageToChar.setPut(clip, c);
    }
  }
  ret imageToChar;
}

Author comment

Began life as a copy of #1006094

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: #1006095
Snippet name: getLearnedChars_fullImages (from #1005726)
Eternal ID of this version: #1006095/1
Text MD5: d8831a0adab86eb3102258c1ea6cdbe8
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-18 01:29:18
Source code size: 719 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 485 / 464
Referenced in: [show references]